termux-packages/packages/erlang/lib-crypto-c_src-otp_test_engine.c.patch

32 lines
1.1 KiB
Diff
Raw Normal View History

2018-12-28 23:35:23 +01:00
diff -u -r ../otp-OTP-21.2.1/lib/crypto/c_src/otp_test_engine.c ./lib/crypto/c_src/otp_test_engine.c
--- ../otp-OTP-21.2.1/lib/crypto/c_src/otp_test_engine.c 2018-12-20 12:27:00.000000000 +0000
+++ ./lib/crypto/c_src/otp_test_engine.c 2018-12-28 22:18:50.617050960 +0000
@@ -46,7 +46,8 @@
2018-08-24 02:34:07 +02:00
#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \
&& !defined(OPENSSL_NO_EC) \
&& !defined(OPENSSL_NO_ECDH) \
- && !defined(OPENSSL_NO_ECDSA)
+ && !defined(OPENSSL_NO_ECDSA) \
+ && !defined(OPENSSL_NO_ENGINE)
# define HAVE_EC
#endif
2018-12-28 23:35:23 +01:00
@@ -375,7 +376,7 @@
} */
if ((sizeof(fake_flag) == m_len)
- && bcmp(m,fake_flag,m_len) == 0) {
+ && memcmp(m,fake_flag,m_len) == 0) {
printf("To be faked\r\n");
/* To be faked */
slen = RSA_size(rsa);
@@ -397,7 +398,7 @@
printf("test_rsa_verify (dtype=%i) called m_len=%u siglen=%u\r\n", dtype, m_len, siglen);
if ((sizeof(fake_flag) == m_len)
- && bcmp(m,fake_flag,m_len) == 0) {
+ && memcmp(m,fake_flag,m_len) == 0) {
printf("To be faked\r\n");
return (siglen == RSA_size(rsa))
&& chk_test_data(sigret, siglen);