Actions
Bug #12182
closedopenssl: NPN may be disabled by OpenSSL configuration
    Bug #12182:
    openssl: NPN may be disabled by OpenSSL configuration
  
Description
OpenSSL's NPN support can be disabled, and Ruby doesn't work well when it is disabled.
% make test-all TESTS="test/openssl"
...
# Running tests:
[274/358] OpenSSL::TestSSL#test_npn_advertised_protocol_too_long./test/runner.rb: OpenSSL::TestSSL#test_npn_advertised_protocol_too_long: symbol lookup error: /work/ruby-src/.ext/x86_64-linux/openssl.so: undefined symbol: SSL_CTX_set_next_proto_select_cb
uncommon.mk:607: recipe for target 'yes-test-all' failed
make: *** [yes-test-all] Error 127
We should detect that the OpenSSL has NPN support by checking existence of SSL_CTX_set_next_proto_select_cb, not of OPENSSL_NPN_NEGOTIATED.
This is because OPENSSL_NPN_NEGOTIATED macro always exists even if NPN is disabled.
I attached a patch which fixes this.
Files
        
           Updated by nobu (Nobuyoshi Nakada) over 9 years ago
          Updated by nobu (Nobuyoshi Nakada) over 9 years ago
          
          
        
        
      
      - Status changed from Open to Closed
Applied in changeset r54258.
openssl: fix build when NPN is disabled by OpenSSL
- ext/openssl/extconf.rb: check SSL_CTX_set_next_proto_select_cb
 function rather than OPENSSL_NPN_NEGOTIATED macro. it exists
 even if it is disabled by OpenSSL configuration.
 [ruby-core:74384] [Bug #12182]
- ext/openssl/ossl_ssl.c: update #ifdef(s) as above.
- test/openssl/test_ssl.rb: skip NPN tests if NPN is disabled.
        
           Updated by usa (Usaku NAKAMURA) over 9 years ago
          Updated by usa (Usaku NAKAMURA) over 9 years ago
          
          
        
        
      
      - Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
        
           Updated by usa (Usaku NAKAMURA) over 9 years ago
          Updated by usa (Usaku NAKAMURA) over 9 years ago
          
          
        
        
      
      - Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: DONE, 2.2: REQUIRED, 2.3: REQUIRED
ruby_2_1 r54397 merged revision(s) 54258.
        
           Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago
          Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago
          
          
        
        
      
      - Backport changed from 2.1: DONE, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: DONE, 2.2: DONE, 2.3: REQUIRED
Backported into ruby_2_2 branch at r54428.
        
           Updated by naruse (Yui NARUSE) over 9 years ago
          Updated by naruse (Yui NARUSE) over 9 years ago
          
          
        
        
      
      - Backport changed from 2.1: DONE, 2.2: DONE, 2.3: REQUIRED to 2.1: DONE, 2.2: DONE, 2.3: DONE
ruby_2_3 r54551 merged revision(s) 54258.
Actions