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

version» Context lines:

pike.git/lib/modules/SSL.pmod/Context.pike:282: Inside #if constant(Crypto.SHA512)
   SIGNATURE_ecdsa_secp521r1_sha512,   #endif    SIGNATURE_rsa_pkcs1_sha512,   #endif   #if constant(Crypto.SHA384)   #if constant(Crypto.ECC.Curve)    SIGNATURE_ecdsa_secp384r1_sha384,   #endif    SIGNATURE_rsa_pkcs1_sha384,   #endif + #if constant(Crypto.ECC.Curve25519) +  SIGNATURE_ed25519, + #endif   #if constant(Crypto.ECC.Curve)    SIGNATURE_ecdsa_secp256r1_sha256,   #endif    HASH_sha256 | SIGNATURE_dsa,    SIGNATURE_rsa_pkcs1_sha256,   #if constant(Crypto.SHA224)   #if constant(Crypto.ECC.Curve)    HASH_sha224 | SIGNATURE_ecdsa,   #endif    HASH_sha224 | SIGNATURE_dsa,
pike.git/lib/modules/SSL.pmod/Context.pike:311:   //!   //! @seealso   //! @[signature_algorithms]   array(int) get_signature_algorithms(array(int)|void signature_algorithms)   {    if (!signature_algorithms) {    signature_algorithms = this_program::signature_algorithms;    }      #if constant(Crypto.ECC.Curve) && constant(Crypto.SHA512) && \ -  constant(Crypto.SHA384) && constant(Crypto.SHA224) +  constant(Crypto.SHA384) && constant(Crypto.SHA224) && \ +  constant(Crypto.ECC.Curve25519)    return signature_algorithms;   #else -  return [array(array(int))] +  return [array(int)]    filter(signature_algorithms, -  lambda(array(int) pair) { -  [int hash, int sign] = pair; +  lambda(SignatureScheme scheme) {   #if !constant(Crypto.ECC.Curve) -  if (sign == SIGNATURE_ecdsa) return 0; +  if ((scheme & SIGNATURE_MASK) == SIGNATURE_ecdsa) return 0;   #endif -  + #if constant(Crypto.ECC.Curve25519) +  if (scheme == SIGNATURE_ed25519) return 1; + #endif    if ((<   #if !constant(Crypto.SHA512)    HASH_sha512,   #endif   #if !constant(Crypto.SHA384)    HASH_sha384,   #endif   #if !constant(Crypto.SHA224)    HASH_sha224,   #endif -  >)[hash]) return 0; +  HASH_intrinsic, +  >)[scheme & HASH_MASH]) return 0;    return 1;    });   #endif   }      // Generate a sort key for a cipher suite.   //   // The larger the value, the stronger the cipher suite.   protected int cipher_suite_sort_key(int suite)   {