Lines Matching refs:cipher

477   const SSL_CIPHER *cipher;  member
562 size_t *out_fixed_iv_len, const SSL_CIPHER *cipher, in ssl_cipher_get_evp_aead() argument
571 if (cipher->algorithm_mac == SSL_AEAD) { in ssl_cipher_get_evp_aead()
572 if (cipher->algorithm_enc == SSL_AES128GCM) { in ssl_cipher_get_evp_aead()
581 } else if (cipher->algorithm_enc == SSL_AES256GCM) { in ssl_cipher_get_evp_aead()
590 } else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) { in ssl_cipher_get_evp_aead()
602 } else if (cipher->algorithm_mac == SSL_SHA1) { in ssl_cipher_get_evp_aead()
603 if (cipher->algorithm_enc == SSL_eNULL) { in ssl_cipher_get_evp_aead()
605 } else if (cipher->algorithm_enc == SSL_3DES) { in ssl_cipher_get_evp_aead()
612 } else if (cipher->algorithm_enc == SSL_AES128) { in ssl_cipher_get_evp_aead()
619 } else if (cipher->algorithm_enc == SSL_AES256) { in ssl_cipher_get_evp_aead()
639 const SSL_CIPHER *cipher) { in ssl_get_handshake_digest() argument
640 switch (cipher->algorithm_prf) { in ssl_get_handshake_digest()
716 for (const SSL_CIPHER &cipher : kCiphers) { in ssl_cipher_collect_ciphers() local
718 if (cipher.algorithm_mkey != SSL_kGENERIC) { in ssl_cipher_collect_ciphers()
719 co_list[co_list_num].cipher = &cipher; in ssl_cipher_collect_ciphers()
787 void SSLCipherPreferenceList::Remove(const SSL_CIPHER *cipher) { in Remove() argument
789 if (!sk_SSL_CIPHER_find(ciphers.get(), &index, cipher)) { in Remove()
853 cp = curr->cipher; in ssl_cipher_apply_rule()
940 SSL_CIPHER_get_bits(curr->cipher, NULL) > max_strength_bits) { in ssl_cipher_strength_sort()
941 max_strength_bits = SSL_CIPHER_get_bits(curr->cipher, NULL); in ssl_cipher_strength_sort()
956 number_uses[SSL_CIPHER_get_bits(curr->cipher, NULL)]++; in ssl_cipher_strength_sort()
1081 const SSL_CIPHER *cipher = &kCiphers[j]; in ssl_cipher_process_rulestr() local
1082 if (rule_equals(cipher->name, buf, buf_len) || in ssl_cipher_process_rulestr()
1083 rule_equals(cipher->standard_name, buf, buf_len)) { in ssl_cipher_process_rulestr()
1084 cipher_id = cipher->id; in ssl_cipher_process_rulestr()
1255 if (!sk_SSL_CIPHER_push(cipherstack.get(), curr->cipher)) { in ssl_create_cipher_list()
1283 uint16_t ssl_cipher_get_value(const SSL_CIPHER *cipher) { in ssl_cipher_get_value() argument
1284 uint32_t id = cipher->id; in ssl_cipher_get_value()
1304 bool ssl_cipher_uses_certificate_auth(const SSL_CIPHER *cipher) { in ssl_cipher_uses_certificate_auth() argument
1305 return (cipher->algorithm_auth & SSL_aCERT) != 0; in ssl_cipher_uses_certificate_auth()
1308 bool ssl_cipher_requires_server_key_exchange(const SSL_CIPHER *cipher) { in ssl_cipher_requires_server_key_exchange() argument
1311 return (cipher->algorithm_mkey & SSL_kECDHE) != 0; in ssl_cipher_requires_server_key_exchange()
1314 size_t ssl_cipher_get_record_split_len(const SSL_CIPHER *cipher) { in ssl_cipher_get_record_split_len() argument
1316 switch (cipher->algorithm_enc) { in ssl_cipher_get_record_split_len()
1329 assert(cipher->algorithm_mac == SSL_SHA1); in ssl_cipher_get_record_split_len()
1378 uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *cipher) { return cipher->id; } in SSL_CIPHER_get_id() argument
1380 int SSL_CIPHER_is_aead(const SSL_CIPHER *cipher) { in SSL_CIPHER_is_aead() argument
1381 return (cipher->algorithm_mac & SSL_AEAD) != 0; in SSL_CIPHER_is_aead()
1384 int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_cipher_nid() argument
1385 switch (cipher->algorithm_enc) { in SSL_CIPHER_get_cipher_nid()
1405 int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_digest_nid() argument
1406 switch (cipher->algorithm_mac) { in SSL_CIPHER_get_digest_nid()
1416 int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_kx_nid() argument
1417 switch (cipher->algorithm_mkey) { in SSL_CIPHER_get_kx_nid()
1431 int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_auth_nid() argument
1432 switch (cipher->algorithm_auth) { in SSL_CIPHER_get_auth_nid()
1446 int SSL_CIPHER_get_prf_nid(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_prf_nid() argument
1447 switch (cipher->algorithm_prf) { in SSL_CIPHER_get_prf_nid()
1459 int SSL_CIPHER_is_block_cipher(const SSL_CIPHER *cipher) { in SSL_CIPHER_is_block_cipher() argument
1460 return (cipher->algorithm_enc & SSL_eNULL) == 0 && in SSL_CIPHER_is_block_cipher()
1461 cipher->algorithm_mac != SSL_AEAD; in SSL_CIPHER_is_block_cipher()
1464 uint16_t SSL_CIPHER_get_min_version(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_min_version() argument
1465 if (cipher->algorithm_mkey == SSL_kGENERIC || in SSL_CIPHER_get_min_version()
1466 cipher->algorithm_auth == SSL_aGENERIC) { in SSL_CIPHER_get_min_version()
1470 if (cipher->algorithm_prf != SSL_HANDSHAKE_MAC_DEFAULT) { in SSL_CIPHER_get_min_version()
1478 uint16_t SSL_CIPHER_get_max_version(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_max_version() argument
1479 if (cipher->algorithm_mkey == SSL_kGENERIC || in SSL_CIPHER_get_max_version()
1480 cipher->algorithm_auth == SSL_aGENERIC) { in SSL_CIPHER_get_max_version()
1487 const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_name() argument
1488 if (cipher != NULL) { in SSL_CIPHER_get_name()
1489 return cipher->name; in SSL_CIPHER_get_name()
1495 const char *SSL_CIPHER_standard_name(const SSL_CIPHER *cipher) { in SSL_CIPHER_standard_name() argument
1496 return cipher->standard_name; in SSL_CIPHER_standard_name()
1499 const char *SSL_CIPHER_get_kx_name(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_kx_name() argument
1500 if (cipher == NULL) { in SSL_CIPHER_get_kx_name()
1504 switch (cipher->algorithm_mkey) { in SSL_CIPHER_get_kx_name()
1509 switch (cipher->algorithm_auth) { in SSL_CIPHER_get_kx_name()
1522 assert(cipher->algorithm_auth == SSL_aPSK); in SSL_CIPHER_get_kx_name()
1526 assert(cipher->algorithm_auth == SSL_aGENERIC); in SSL_CIPHER_get_kx_name()
1535 char *SSL_CIPHER_get_rfc_name(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_rfc_name() argument
1536 if (cipher == NULL) { in SSL_CIPHER_get_rfc_name()
1540 return OPENSSL_strdup(SSL_CIPHER_standard_name(cipher)); in SSL_CIPHER_get_rfc_name()
1543 int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *out_alg_bits) { in SSL_CIPHER_get_bits() argument
1544 if (cipher == NULL) { in SSL_CIPHER_get_bits()
1549 switch (cipher->algorithm_enc) { in SSL_CIPHER_get_bits()
1585 const char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, in SSL_CIPHER_description() argument
1590 alg_mkey = cipher->algorithm_mkey; in SSL_CIPHER_description()
1591 alg_auth = cipher->algorithm_auth; in SSL_CIPHER_description()
1592 alg_enc = cipher->algorithm_enc; in SSL_CIPHER_description()
1593 alg_mac = cipher->algorithm_mac; in SSL_CIPHER_description()
1697 cipher->name, kx, au, enc, mac); in SSL_CIPHER_description()
1701 const char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher) { in SSL_CIPHER_get_version() argument