[前][次][番号順一覧][スレッド一覧]

ruby-changes:43086

From: rhe <ko1@a...>
Date: Wed, 25 May 2016 17:46:45 +0900 (JST)
Subject: [ruby-changes:43086] rhe:r55160 (trunk): openssl: remove check of OPENSSL_FIPS macro in extconf.rb

rhe	2016-05-25 17:46:39 +0900 (Wed, 25 May 2016)

  New Revision: 55160

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55160

  Log:
    openssl: remove check of OPENSSL_FIPS macro in extconf.rb
    
    * ext/openssl/extconf.rb: Remove check of OPENSSL_FIPS macro. This is
      unneeded because we can check the macro directly in source code,
      just as we already do for OPENSSL_NO_* macros.
    
    * ext/openssl/ossl.c: Replace occurrences of HAVE_OPENSSL_FIPS with
      OPENSSL_FIPS.

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/extconf.rb
    trunk/ext/openssl/ossl.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55159)
+++ ChangeLog	(revision 55160)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed May 25 17:42:58 2016  Kazuki Yamaguchi  <k@r...>
+
+	* ext/openssl/extconf.rb: Remove check of OPENSSL_FIPS macro. This is
+	  unneeded because we can check the macro directly in source code,
+	  just as we already do for OPENSSL_NO_* macros.
+
+	* ext/openssl/ossl.c: Replace occurrences of HAVE_OPENSSL_FIPS with
+	  OPENSSL_FIPS.
+
 Wed May 25 17:13:35 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* class.c (rb_scan_args): merge code for n_trail.
Index: ext/openssl/extconf.rb
===================================================================
--- ext/openssl/extconf.rb	(revision 55159)
+++ ext/openssl/extconf.rb	(revision 55160)
@@ -154,7 +154,6 @@ have_struct_member("CRYPTO_THREADID", "p https://github.com/ruby/ruby/blob/trunk/ext/openssl/extconf.rb#L154
 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"
Index: ext/openssl/ossl.c
===================================================================
--- ext/openssl/ossl.c	(revision 55159)
+++ ext/openssl/ossl.c	(revision 55160)
@@ -495,7 +495,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L495
 ossl_fips_mode_set(VALUE self, VALUE enabled)
 {
 
-#ifdef HAVE_OPENSSL_FIPS
+#ifdef OPENSSL_FIPS
     if (RTEST(enabled)) {
 	int mode = FIPS_mode();
 	if(!mode && !FIPS_mode_set(1)) /* turning on twice leads to an error */
@@ -1162,7 +1162,7 @@ Init_openssl(void) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L1162
     /*
      * Boolean indicating whether OpenSSL is FIPS-enabled or not
      */
-#ifdef HAVE_OPENSSL_FIPS
+#ifdef OPENSSL_FIPS
     rb_define_const(mOSSL, "OPENSSL_FIPS", Qtrue);
 #else
     rb_define_const(mOSSL, "OPENSSL_FIPS", Qfalse);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]