1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-03 00:26:59 +02:00

Update CipherType/CipherMode to StringId.

As in 6cc521b, this allows option values and enums to be easily mapped together.
This commit is contained in:
David Steele
2021-04-28 11:36:20 -04:00
committed by GitHub
parent c3b15fc3bd
commit 85fc3da4c3
36 changed files with 128 additions and 189 deletions

View File

@ -45,15 +45,6 @@ testRun(void)
TEST_ERROR(cryptoError(true, "no error"), CryptoError, "no error: [0] no details available");
// -------------------------------------------------------------------------------------------------------------------------
TEST_ERROR(cipherType(strNew(BOGUS_STR)), AssertError, "invalid cipher name 'BOGUS'");
TEST_RESULT_UINT(cipherType(strNew("none")), cipherTypeNone, "none type");
TEST_RESULT_UINT(cipherType(strNew("aes-256-cbc")), cipherTypeAes256Cbc, "aes-256-cbc type");
TEST_ERROR(cipherTypeName((CipherType)2), AssertError, "invalid cipher type 2");
TEST_RESULT_STR_Z(cipherTypeName(cipherTypeNone), "none", "none name");
TEST_RESULT_STR_Z(cipherTypeName(cipherTypeAes256Cbc), "aes-256-cbc", "aes-256-cbc name");
// Test if the buffer was overrun
// -------------------------------------------------------------------------------------------------------------------------
unsigned char buffer[256] = {0};