summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r--ext/openssl/ossl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index da7d08ad49..ebd2b5d13a 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -936,6 +936,7 @@ Init_openssl()
* Version of OpenSSL the ruby OpenSSL extension was built with
*/
rb_define_const(mOSSL, "OPENSSL_VERSION", rb_str_new2(OPENSSL_VERSION_TEXT));
+
/*
* Version number of OpenSSL the ruby OpenSSL extension was built with
* (base 16)
@@ -943,6 +944,15 @@ Init_openssl()
rb_define_const(mOSSL, "OPENSSL_VERSION_NUMBER", INT2NUM(OPENSSL_VERSION_NUMBER));
/*
+ * Boolean indicating whether OpenSSL runs in FIPS mode or not
+ */
+#ifdef HAVE_OPENSSL_FIPS
+ rb_define_const(mOSSL, "OPENSSL_FIPS", Qtrue);
+#else
+ rb_define_const(mOSSL, "OPENSSL_FIPS", Qfalse);
+#endif
+
+ /*
* Generic error,
* common for all classes under OpenSSL module
*/