diff options
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/extconf.rb | 1 | ||||
-rw-r--r-- | ext/openssl/ossl_cipher.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 3d411e0da6..848e1f2bdc 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -148,6 +148,7 @@ have_struct_member("EVP_CIPHER_CTX", "flags", "openssl/evp.h") have_struct_member("EVP_CIPHER_CTX", "engine", "openssl/evp.h") have_struct_member("X509_ATTRIBUTE", "single", "openssl/x509.h") have_macro("OPENSSL_FIPS", ['openssl/opensslconf.h']) && $defs.push("-DHAVE_OPENSSL_FIPS") +have_macro("EVP_CTRL_GCM_GET_TAG", ['openssl/evp.h']) && $defs.push("-DHAVE_AUTHENTICATED_ENCRYPTION") Logging::message "=== Checking done. ===\n" diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c index 832cce9953..03374372ad 100644 --- a/ext/openssl/ossl_cipher.c +++ b/ext/openssl/ossl_cipher.c @@ -482,6 +482,7 @@ ossl_cipher_set_iv(VALUE self, VALUE iv) return iv; } +#ifdef HAVE_AUTHENTICATED_ENCRYPTION /* * call-seq: * cipher.auth_data = string -> string @@ -644,6 +645,12 @@ ossl_cipher_is_authenticated(VALUE self) return Qfalse; } } +#else +#define ossl_cipher_set_auth_data rb_f_notimplement +#define ossl_cipher_get_auth_tag rb_f_notimplement +#define ossl_cipher_set_auth_tag rb_f_notimplement +#define ossl_cipher_is_authenticated rb_f_notimplement +#endif /* * call-seq: |