diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-19 23:16:42 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-27 23:07:40 +0900 |
commit | 4a4a6f8999594a056ad03451646143016ec9a5d1 (patch) | |
tree | 278bbe770db06aca77953a3ef8c0ec49853e8d9c /ext/openssl/openssl_missing.h | |
parent | c71e02bd07b1ae7211ee2cafad39e9b13f9d33d3 (diff) | |
download | ruby-4a4a6f8999594a056ad03451646143016ec9a5d1.tar.gz |
ext/openssl: check if SSL_CTX_clear_options() is available
Fix build with very very old versions of OpenSSL.
SSL_CTX_clear_options() is new in OpenSSL 0.9.8m but some Linux
distributions still uses 0.9.8e.
Diffstat (limited to 'ext/openssl/openssl_missing.h')
-rw-r--r-- | ext/openssl/openssl_missing.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h index 2dc49d3fd2..6cf45a0d82 100644 --- a/ext/openssl/openssl_missing.h +++ b/ext/openssl/openssl_missing.h @@ -188,6 +188,11 @@ int PEM_def_callback(char *buf, int num, int w, void *key); int ASN1_put_eoc(unsigned char **pp); #endif +#if !defined(HAVE_SSL_CTX_CLEAR_OPTIONS) +# define SSL_CTX_clear_options(ctx, op) do \ + (ctx)->options &= ~(op); while (0) +#endif + #if defined(__cplusplus) } #endif |