1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-07 02:10:05 +00:00

Support encrypted repo of V4 (#411)

* Support encrypted repo of V4

* Use aes128 for V3 encrypted repo
This commit is contained in:
feiniks
2020-09-22 17:06:15 +08:00
committed by GitHub
parent 56e8554b57
commit 7ff3282975
5 changed files with 43 additions and 25 deletions

View File

@@ -758,6 +758,14 @@ commit_from_json_object (const char *commit_id, json_t *object)
if (!salt || strlen(salt) != 64)
return NULL;
break;
case 4:
if (!magic || strlen(magic) != 64)
return NULL;
if (!random_key || strlen(random_key) != 96)
return NULL;
if (!salt || strlen(salt) != 64)
return NULL;
break;
default:
seaf_warning ("Unknown encryption version %d.\n", enc_version);
return NULL;