diff options
author | Technorama team <oss-ruby@technorama.net> | 2004-02-25 05:22:03 +0000 |
---|---|---|
committer | Technorama team <oss-ruby@technorama.net> | 2004-02-25 05:22:03 +0000 |
commit | 9fb00dff659016d25ba739aaadfeaef423bfb7f2 (patch) | |
tree | 542563bade7cd1cf1f464804f8b48214abe857a0 | |
parent | 93425dd538a7100cbd4843edaecdbff018970af4 (diff) | |
download | ruby-openssl-history-9fb00dff659016d25ba739aaadfeaef423bfb7f2.tar.gz |
add openssl version check for Cipher.set_padding
-rw-r--r-- | ossl_cipher.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ossl_cipher.c b/ossl_cipher.c index b5452a8..43a8a00 100644 --- a/ossl_cipher.c +++ b/ossl_cipher.c @@ -341,7 +341,10 @@ ossl_cipher_set_iv(VALUE self, VALUE iv) static VALUE ossl_cipher_set_padding(VALUE self, VALUE padding) { -#if defined(HAVE_ST_FLAGS) +/* EVP_CIPHER_CTX_set_padding existed in an earlier versions of openssl. + I don't know the exact version number, but it does exist in 0x0090702fL. +*/ +#if defined(HAVE_ST_FLAGS) || OPENSSL_VERSION_NUMBER >= 0x0090702fL EVP_CIPHER_CTX *ctx; GetCipher(self, ctx); |