You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Add helper function for adding CipherBlock filters to groups.
Reviewed by Cynthia Shang.
This commit is contained in:
@ -285,6 +285,18 @@ testRun(void)
|
||||
TEST_ERROR(ioFilterProcessInOut(blockDecryptFilter, NULL, decryptBuffer), CryptoError, "unable to flush");
|
||||
|
||||
ioFilterFree(blockDecryptFilter);
|
||||
|
||||
// Helper function
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
IoFilterGroup *filterGroup = ioFilterGroupNew();
|
||||
|
||||
TEST_RESULT_PTR(
|
||||
cipherBlockFilterGroupAdd(filterGroup, cipherTypeNone, cipherModeEncrypt, NULL), filterGroup, " no filter add");
|
||||
TEST_RESULT_UINT(ioFilterGroupSize(filterGroup), 0, " check no filter add");
|
||||
|
||||
TEST_RESULT_VOID(
|
||||
cipherBlockFilterGroupAdd(filterGroup, cipherTypeAes256Cbc, cipherModeEncrypt, STRDEF("X")), " filter add");
|
||||
TEST_RESULT_UINT(ioFilterGroupSize(filterGroup), 1, " check filter add");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
|
Reference in New Issue
Block a user