diff options
author | lloyd <[email protected]> | 2015-04-28 13:13:54 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-04-28 13:13:54 +0000 |
commit | 2c1d2e671cb7a2417b22ec88f333236aa700420e (patch) | |
tree | d52e00b259b91c2d75c382dd2ae1c7c76d4602fa /src | |
parent | 44a04ee7ed896ea92295c8d2c4b8c9d294892c1c (diff) |
Comparison was inverted
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_pubkey.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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(...) {} |