diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-20 01:16:45 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-27 23:07:40 +0900 |
commit | 35f8edeedc0e42d040e2b5823a300aaa2e3ff13f (patch) | |
tree | bc24606db97e14a1fb7fdc46b01c802e4043d6a3 /ext/openssl/openssl_missing.h | |
parent | 4a4a6f8999594a056ad03451646143016ec9a5d1 (diff) | |
download | ruby-35f8edeedc0e42d040e2b5823a300aaa2e3ff13f.tar.gz |
ext/openssl: always use our implementation of SSL_SESSION_cmp()
Implement CRYPTO_memcmp() if it is not available.
Always use our SSL_SESSION_cmp() (renamed to ossl_SSL_SESSION_cmp()).
SSL_SESSION_cmp() was removed in OpenSSL 1.0.0 and we have used a
reimplemented one. However our implementation is better than the
original (it uses CRYPTO_memcmp() instead of plain memcmp).
Diffstat (limited to 'ext/openssl/openssl_missing.h')
-rw-r--r-- | ext/openssl/openssl_missing.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h index 6cf45a0d82..8271f3ef2e 100644 --- a/ext/openssl/openssl_missing.h +++ b/ext/openssl/openssl_missing.h @@ -144,6 +144,10 @@ int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data); int X509_CRL_set_version(X509_CRL *x, long version); #endif +#if !defined(HAVE_CRYPTO_MEMCMP) +int CRYPTO_memcmp(const volatile void * volatile in_a, const volatile void * volatile in_b, size_t len); +#endif + #if !defined(HAVE_X509_CRL_SET_ISSUER_NAME) int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); #endif |