diff options
author | Doug Hogan <[email protected]> | 2019-01-05 13:42:54 -0800 |
---|---|---|
committer | Doug Hogan <[email protected]> | 2019-01-08 01:11:59 -0800 |
commit | 85e979749ad60c7c3ddd160ca2673a8bf8a581e7 (patch) | |
tree | 01a3de2e0e3d2430c08bd8553e78ed9c524945ba /lib/crypto/c_src/otp_test_engine.c | |
parent | f03e582f0cdc2518ecd3b231c721d45b48381fed (diff) | |
download | otp-85e979749ad60c7c3ddd160ca2673a8bf8a581e7.tar.gz otp-85e979749ad60c7c3ddd160ca2673a8bf8a581e7.tar.bz2 otp-85e979749ad60c7c3ddd160ca2673a8bf8a581e7.zip |
Revamp test_rsa_verify()
Diffstat (limited to 'lib/crypto/c_src/otp_test_engine.c')
-rw-r--r-- | lib/crypto/c_src/otp_test_engine.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index f971dbc3ca..4557eaa877 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -430,8 +430,13 @@ int test_rsa_verify(int dtype, if ((sizeof(fake_flag) == m_len) && bcmp(m,fake_flag,m_len) == 0) { + int size; + + if ((size = RSA_size(rsa)) < 0) + return 0; + printf("To be faked\r\n"); - return (siglen == RSA_size(rsa)) + return (siglen == (unsigned int)size) && chk_test_data(sigret, siglen); } return 0; |