<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7085</bug_id>
          
          <creation_ts>2014-12-16 07:24:15 +0000</creation_ts>
          <short_desc>openssl: compile openSSL with OPENSSL_NO_SSL3 flag</short_desc>
          <delta_ts>2015-02-23 17:16:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>1.7</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Backport 1.7.1</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sona Sarmadi">sona.sarmadi</reporter>
          <assigned_to name="Brendan Le Foll">brendan.le.foll</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47586</commentid>
    <comment_count>0</comment_count>
    <who name="Sona Sarmadi">sona.sarmadi</who>
    <bug_when>2014-12-16 07:24:15 +0000</bug_when>
    <thetext>To disable SSLv3 in Python (7015), OpenSSL needs to be compiled with the OPENSSL_NO_SSL3 flag.

See https://docs.python.org/2/library/ssl.html

 ssl.PROTOCOL_SSLv3

    Selects SSL version 3 as the channel encryption protocol.
    This protocol is not be available if OpenSSL is compiled with the
    OPENSSL_NO_SSLv3 flag.
====================================
SSLV3 support can be disabled in openssl by adding &quot;-no-ssl3&quot; in the openssl recipes:

meta/recipes-connectivity/openssl/openssl_1.0.1g.bb:
EXTRA_OECONF = &quot; -no-ssl2 -no-ssl3&quot;

After building openssl this define is in the include/openssl/opensslconf.h:

#ifndef OPENSSL_NO_SSL3
# define OPENSSL_NO_SSL3
#endif

Openssl compiled with this define:
===================================
root@p2020rdb:~# openssl s_client -connect 173.252.120.6:443 -ssl3
unknown option -ssl3
usage: s_client args

......

root@p2020rdb:~# openssl s_client -connect 173.252.120.6:443 -tls1
CONNECTED(00000003)
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert High Assurance CA-3
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
 0 s:/C=US/ST=CA/L=Menlo Park/O=Facebook, Inc./CN=*.facebook.com
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
 1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCer

Openssl NOT compiled with this define:
=======================================
root@p2020rdb:~# openssl s_client -connect 173.252.120.6:443 -ssl3
CONNECTED(00000003)
3079103692:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1292:SSL alert number 40
3079103692:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:615:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : SSLv3
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1418713871
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---
root@p2020rdb:~# 


It would be good to document this</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48992</commentid>
    <comment_count>1</comment_count>
    <who name="Brendan Le Foll">brendan.le.foll</who>
    <bug_when>2015-02-23 17:16:51 +0000</bug_when>
    <thetext>Fix pushed with 0a5395738b0c5c41e48b882a5fb7c671b98dc732</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>