From 2c1d2e671cb7a2417b22ec88f333236aa700420e Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 28 Apr 2015 13:13:54 +0000 Subject: Comparison was inverted --- src/tests/test_pubkey.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tests/test_pubkey.cpp b/src/tests/test_pubkey.cpp index 7d96d3a14..05119baa5 100644 --- a/src/tests/test_pubkey.cpp +++ b/src/tests/test_pubkey.cpp @@ -211,7 +211,11 @@ size_t validate_encryption(PK_Encryptor& e, PK_Decryptor& d, std::cout << hex_encode(ctext) << " -> " << hex_encode(decrypted) << "\n"; // Ignore PKCS #1 failures as they do occur occasionally (million message attack) - if(algo.find("/EME-PKCS1-v1_5") != std::string::npos) + const bool is_pkcs1 = algo.find("/EME-PKCS1-v1_5") != std::string::npos; + + if(is_pkcs1) + std::cout << "Ignoring PKCS #1 failure\n"; + else ++fails; } catch(...) {} -- cgit v1.2.3