1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-09 00:45:49 +02:00

Fix difference in cipher type reporting missed in 8304d452.

The C code can't get the cipher type from the storage object because the C storage object does not have encryption baked in like the Perl code does.

Instead, check backup.info to see if encryption is enabled.  This will need to rethought if another cipher type is added but for now it works fine.
This commit is contained in:
David Steele
2019-01-16 22:16:50 +02:00
parent e68d1e7304
commit 7d4bbf290c
2 changed files with 16 additions and 4 deletions

View File

@ -72,10 +72,13 @@ testRun(void)
String *content = strNew
(
"[backrest]\n"
"backrest-checksum=\"51774ffab293c5cfb07511d7d2e101e92416f4ed\"\n"
"backrest-checksum=\"80798255547bafa3eee805ab0fccaa1da03cab0e\"\n"
"backrest-format=5\n"
"backrest-version=\"2.04\"\n"
"\n"
"[cipher]\n"
"cipher-pass=12345\n"
"\n"
"[db]\n"
"db-catalog-version=201409291\n"
"db-control-version=942\n"
@ -145,7 +148,7 @@ testRun(void)
" }\n"
" ],\n"
" \"backup\" : [],\n"
" \"cipher\" : \"none\",\n"
" \"cipher\" : \"aes-256-cbc\",\n"
" \"db\" : [\n"
" {\n"
" \"id\" : 1,\n"
@ -170,7 +173,7 @@ testRun(void)
TEST_RESULT_STR(strPtr(infoRender()),
"stanza: stanza1\n"
" status: error (no valid backups)\n"
" cipher: none\n"
" cipher: aes-256-cbc\n"
"\n"
" db (current)\n"
" wal archive min/max (9.4-3): none present\n",