diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:22:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:22:08 +0000 |
commit | 55fffa809312f6c0ae40528fd1ee66b7559c4650 (patch) | |
tree | bb6b3e63b35220d36bdc654f784a985e88ba1cd2 /src/tests/generatekey.cpp | |
parent | Releasing progress-linux version 0.17.0-3~progress7.99u1. (diff) | |
download | rnp-55fffa809312f6c0ae40528fd1ee66b7559c4650.tar.xz rnp-55fffa809312f6c0ae40528fd1ee66b7559c4650.zip |
Merging upstream version 0.17.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/generatekey.cpp')
-rw-r--r-- | src/tests/generatekey.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/generatekey.cpp b/src/tests/generatekey.cpp index b846ebb..dd0aaff 100644 --- a/src/tests/generatekey.cpp +++ b/src/tests/generatekey.cpp @@ -96,12 +96,11 @@ hash_supported(const std::string &hash) } static bool -hash_secure(rnp_ffi_t ffi, const std::string &hash, uint32_t action) +hash_secure(rnp_ffi_t ffi, const std::string &hash, uint32_t action, uint64_t time) { uint32_t flags = action; uint32_t level = 0; - rnp_get_security_rule( - ffi, RNP_FEATURE_HASH_ALG, hash.c_str(), global_ctx.time(), &flags, NULL, &level); + rnp_get_security_rule(ffi, RNP_FEATURE_HASH_ALG, hash.c_str(), time, &flags, NULL, &level); return level == RNP_SECURITY_DEFAULT; } @@ -185,7 +184,8 @@ TEST_F(rnp_tests, rnpkeys_generatekey_testSignature) cfg.set_bool(CFG_OVERWRITE, true); cfg.set_str(CFG_INFILE, "dummyfile.dat.pgp"); cfg.set_str(CFG_OUTFILE, "dummyfile.verify"); - if (!hash_secure(rnp.ffi, hashAlg[i], RNP_SECURITY_VERIFY_DATA)) { + if (!hash_secure( + rnp.ffi, hashAlg[i], RNP_SECURITY_VERIFY_DATA, global_ctx.time())) { assert_false(cli_rnp_process_file(&rnp)); rnp.end(); assert_int_equal(rnp_unlink("dummyfile.dat.pgp"), 0); @@ -361,7 +361,7 @@ TEST_F(rnp_tests, rnpkeys_generatekey_verifySupportedHashAlg) assert_true(keycount > 0); rnp_key_handle_t handle = NULL; assert_rnp_success(rnp_locate_key(rnp.ffi, "userid", hashAlg[i], &handle)); - if (hash_secure(rnp.ffi, hashAlg[i], RNP_SECURITY_VERIFY_KEY)) { + if (hash_secure(rnp.ffi, hashAlg[i], RNP_SECURITY_VERIFY_KEY, global_ctx.time())) { assert_non_null(handle); bool valid = false; rnp_key_is_valid(handle, &valid); |