pike.git / lib / modules / SSL.pmod / Session.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Session.pike:86:   array(array(int)) signature_algorithms = ({    // RFC 5246 7.4.1.4.1:    // Note: this is a change from TLS 1.1 where there are no explicit    // rules, but as a practical matter one can assume that the peer    // supports MD5 and SHA-1.    ({ HASH_sha, SIGNATURE_rsa }),    ({ HASH_sha, SIGNATURE_dsa }),    ({ HASH_sha, SIGNATURE_ecdsa }),   });    + //! Supported finite field diffie-hellman groups in order of preference. + //! + //! @mixed + //! @type int(0..0) + //! Zero indicates that none have been specified. + //! @type array(zero) + //! The empty array indicates that none are supported. + //! @type array(int) + //! List of supported groups, with the most preferred first. + //! @endmixed + array(int) ffdhe_groups; +    //! Supported elliptical curve cipher curves in order of preference.   array(int) ecc_curves = ({});      //! The selected elliptical curve point format.   //!   //! @note   //! May be @expr{-1@} to indicate that there's no supported overlap   //! between the server and client.   int ecc_point_format = POINT_uncompressed;   
pike.git/lib/modules/SSL.pmod/Session.pike:283:    [object(Crypto.Hash)]HASH_lookup[CIPHER_SUITES[suite][2]];    if (hash && (hash->digest_size() > h_max)) {    h_max = hash->digest_size();    }    }    }      #if constant(Crypto.ECC.Curve)    if (!sizeof(ecc_curves)) {    // The client may claim to support ECC, but hasn't sent the -  // required extension, so don't believe it. +  // required extension or any curves that we support, so +  // don't believe it.    ke_mask &= ~((1<<KE_ecdh_ecdsa)|(1<<KE_ecdhe_ecdsa));    }   #endif       // Filter any certs that the client doesn't support.    certs = [array(CertificatePair)]    filter(certs, is_supported_cert, ke_mask, h_max, version, ecc_curves);       if( version<PROTOCOL_TLS_1_2 && sizeof(certs)>1 )    {
pike.git/lib/modules/SSL.pmod/Session.pike:333: Inside #if constant(Crypto.ECC.Curve)
     #if constant(Crypto.ECC.Curve)    if (!sizeof(ecc_curves)) {    // The client may claim to support ECC, but hasn't sent the    // required extension, so don't believe it.    ke_mask &= ~((1<<KE_ecdh_rsa)|(1<<KE_ecdhe_rsa)|    (1<<KE_ecdh_anon));    }   #endif    +  if (!sizeof(ffdhe_groups)) { +  // The client doesn't support the same set of Finite Field +  // Diffie-Hellman groups as we do, so filter DHE. +  ke_mask &= ~((1<<KE_dhe_dss)|(1<<KE_dhe_rsa)| +  (1<<KE_dh_anon)|(1<<KE_dhe_psk)); +  } +     // Given the set of certs, filter the set of client_suites,    // to find the best.    cipher_suites =    filter(cipher_suites, is_supported_suite, ke_mask, version);       if (!sizeof(cipher_suites)) {    SSL3_DEBUG_MSG("No suites left after certificate filtering.\n");    return 0;    }