Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings about the OPENSSL_FIPS macro in OpenSSL 1.1. #621

Merged
merged 1 commit into from
May 16, 2023

Commits on May 16, 2023

  1. Fix warnings about the OPENSSL_FIPS macro in OpenSSL 1.1.

    The commit <c5b2bc1268bcb946ff2eb52904a85278a1dac12c> made the warnings below
    in the case of OpenSSL 1.1 where the `OPENSSL_FIPS` macro is not defined.
    
    ```
    $ bundle install --standalone
    
    $ bundle exec rake compile -- \
      --with-openssl-dir=$HOME/.local/openssl-1.1.1t-debug \
      --with-cflags="-Wundef"
    mkdir -p tmp/x86_64-linux/openssl/3.2.1
    cd tmp/x86_64-linux/openssl/3.2.1
    /usr/local/ruby-3.2.1/bin/ruby -I. -r.rake-compiler-siteconf.rb ../../../../ext/openssl/extconf.rb -- --with-openssl-dir=/home/jaruga/.local/openssl-1.1.1t-debug --with-cflags=-Wundef
    ...
    gcc -I. -I/usr/local/ruby-3.2.1/include/ruby-3.2.0/x86_64-linux -I/usr/local/ruby-3.2.1/include/ruby-3.2.0/ruby/backward -I/usr/local/ruby-3.2.1/include/ruby-3.2.0 -I../../../../ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -I/home/jaruga/.local/openssl-1.1.1t-debug/include    -fPIC -Wundef  -o ossl.o -c ../../../../ext/openssl/ossl.c
    ../../../../ext/openssl/ossl.c: In function ‘ossl_fips_mode_get’:
    ../../../../ext/openssl/ossl.c:425:7: warning: "OPENSSL_FIPS" is not defined, evaluates to 0 [-Wundef]
      425 | #elif OPENSSL_FIPS
          |       ^~~~~~~~~~~~
    ../../../../ext/openssl/ossl.c: In function ‘ossl_fips_mode_set’:
    ../../../../ext/openssl/ossl.c:460:7: warning: "OPENSSL_FIPS" is not defined, evaluates to 0 [-Wundef]
      460 | #elif OPENSSL_FIPS
          |       ^~~~~~~~~~~~
    ../../../../ext/openssl/ossl.c: In function ‘Init_openssl’:
    ../../../../ext/openssl/ossl.c:1218:7: warning: "OPENSSL_FIPS" is not defined, evaluates to 0 [-Wundef]
     1218 | #elif OPENSSL_FIPS
          |       ^~~~~~~~~~~~
    ...
    cp tmp/x86_64-linux/openssl/3.2.1/openssl.so tmp/x86_64-linux/stage/lib/openssl.so
    ```
    junaruga committed May 16, 2023
    Configuration menu
    Copy the full SHA
    b4228cb View commit details
    Browse the repository at this point in the history