diff --git a/src/tests/key-protect.cpp b/src/tests/key-protect.cpp index 15286598d5..30e4c67c0d 100644 --- a/src/tests/key-protect.cpp +++ b/src/tests/key-protect.cpp @@ -231,7 +231,6 @@ TEST_F(rnp_tests, test_key_protect_load_pgp) TEST_F(rnp_tests, test_key_protect_sec_data) { - RNP_LOG("Here 0"); rnp_keygen_primary_desc_t pri_desc = {}; pri_desc.crypto.key_alg = PGP_PKA_RSA; pri_desc.crypto.rsa.modulus_bit_len = 1024; @@ -244,7 +243,6 @@ TEST_F(rnp_tests, test_key_protect_sec_data) sub_desc.crypto.ctx = &global_ctx; /* generate raw unprotected keypair */ - RNP_LOG("Here 1"); pgp_key_t skey, pkey, ssub, psub; pgp_password_provider_t prov = {}; assert_true(pgp_generate_primary_key(pri_desc, true, skey, pkey, PGP_KEY_STORE_GPG)); @@ -263,10 +261,8 @@ TEST_F(rnp_tests, test_key_protect_sec_data) memcpy(raw_ssub, ssub.pkt().sec_data, 32); pgp_key_pkt_t *skeypkt; pgp_key_pkt_t *ssubpkt; - RNP_LOG("Here 2"); #if defined(__has_feature) #if !__has_feature(address_sanitizer) - RNP_LOG("Here 3"); /* copy keys and delete, making sure secret data is wiped*/ pgp_key_t *skeycp = new pgp_key_t(skey); pgp_key_t *ssubcp = new pgp_key_t(ssub); @@ -294,7 +290,7 @@ TEST_F(rnp_tests, test_key_protect_sec_data) raw_ssub_ptr = ssub.pkt().sec_data; #endif #endif - RNP_LOG("Here 4"); + /* protect key and subkey */ pgp_password_provider_t pprov(string_copy_password_callback, (void *) "password"); rnp_key_protection_params_t prot = {}; @@ -304,12 +300,10 @@ TEST_F(rnp_tests, test_key_protect_sec_data) assert_int_not_equal(memcmp(raw_ssub, ssub.pkt().sec_data, 32), 0); #if defined(__has_feature) #if !__has_feature(address_sanitizer) - RNP_LOG("Here 5"); assert_int_not_equal(memcmp(raw_skey, raw_skey_ptr, 32), 0); assert_int_not_equal(memcmp(raw_ssub, raw_ssub_ptr, 32), 0); #endif #endif - RNP_LOG("Here 6"); /* make sure rawpkt is also protected */ skeypkt = new pgp_key_pkt_t(); pgp_source_t memsrc = {}; @@ -328,7 +322,6 @@ TEST_F(rnp_tests, test_key_protect_sec_data) assert_int_not_equal(memcmp(raw_ssub, ssubpkt->sec_data, 32), 0); assert_int_equal(ssubpkt->sec_protection.s2k.specifier, PGP_S2KS_ITERATED_AND_SALTED); delete ssubpkt; - RNP_LOG("Here 7"); /* unlock and make sure sec_data is not decrypted */ assert_true(skey.unlock(pprov)); @@ -353,7 +346,6 @@ TEST_F(rnp_tests, test_key_protect_sec_data) assert_true(skey.lock()); assert_true(ssub.lock()); /* make sure rawpkt is also protected */ - RNP_LOG("Here 8"); skeypkt = new pgp_key_pkt_t(); assert_rnp_success( init_mem_src(&memsrc, skey.rawpkt().raw.data(), skey.rawpkt().raw.size(), false));