Lines Matching refs:pkey
29 static const SIGALG_LOOKUP *find_sig_alg(SSL *s, X509 *x, EVP_PKEY *pkey);
851 static int tls1_check_pkey_comp(SSL *s, EVP_PKEY *pkey)
858 if (!EVP_PKEY_is_a(pkey, "EC"))
863 point_conv = EVP_PKEY_get_ec_point_conv_form(pkey);
875 int field_type = EVP_PKEY_get_field_type(pkey);
899 static uint16_t tls1_get_group_id(EVP_PKEY *pkey)
901 int curve_nid = ssl_get_EC_curve_nid(pkey);
915 EVP_PKEY *pkey;
916 pkey = X509_get0_pubkey(x);
917 if (pkey == NULL)
920 if (!EVP_PKEY_is_a(pkey, "EC"))
923 if (!tls1_check_pkey_comp(s, pkey))
925 group_id = tls1_get_group_id(pkey);
1246 static int rsa_pss_check_min_key_size(SSL_CTX *ctx, const EVP_PKEY *pkey,
1251 if (pkey == NULL)
1255 if (EVP_PKEY_get_size(pkey) < RSA_PSS_MINIMUM_KEY_SIZE(md))
1336 int tls1_set_peer_legacy_sigalg(SSL *s, const EVP_PKEY *pkey)
1341 if (ssl_cert_lookup_by_pkey(pkey, &idx) == NULL)
1465 int tls12_check_peer_sigalg(SSL *s, uint16_t sig, EVP_PKEY *pkey)
1475 pkeyid = EVP_PKEY_get_id(pkey);
1502 if (!ssl_cert_lookup_by_nid(EVP_PKEY_get_id(pkey), &cidx)
1511 if (!tls1_check_pkey_comp(s, pkey)) {
1519 int curve = ssl_get_EC_curve_nid(pkey);
1528 if (!tls1_check_group_id(s, tls1_get_group_id(pkey), 1)) {
2962 EVP_PKEY *pkey = X509_get0_pubkey(x);
2963 if (pkey) {
2970 secbits = EVP_PKEY_get_security_bits(pkey);
3069 EVP_PKEY *pkey)
3082 supported = EVP_PKEY_digestsign_supports_digest(pkey, s->ctx->libctx,
3139 * Returns true if the supplied cert |x| and key |pkey| is usable with the
3143 EVP_PKEY *pkey)
3147 if (ssl_cert_lookup_by_pkey(pkey, &idx) == NULL)
3154 return check_cert_usable(s, sig, x, pkey);
3159 * |pkey|. |x| and |pkey| may be NULL in which case we additionally look at our
3162 static const SIGALG_LOOKUP *find_sig_alg(SSL *s, X509 *x, EVP_PKEY *pkey)
3182 if ((pkey == NULL && !has_usable_cert(s, lu, -1))
3183 || (pkey != NULL && !is_cert_usable(s, lu, x, pkey)))
3186 tmppkey = (pkey != NULL) ? pkey
3275 EVP_PKEY *pkey = s->cert->pkeys[sig_idx].privatekey;
3277 if (!rsa_pss_check_min_key_size(s->ctx, pkey, lu))
3483 int ssl_get_EC_curve_nid(const EVP_PKEY *pkey)
3487 if (EVP_PKEY_get_group_name(pkey, gname, sizeof(gname), NULL) > 0)
3493 __owur int tls13_set_encoded_pub_key(EVP_PKEY *pkey,
3497 if (EVP_PKEY_is_a(pkey, "DH")) {
3498 int bits = EVP_PKEY_get_bits(pkey);
3503 } else if (EVP_PKEY_is_a(pkey, "EC")) {
3509 return EVP_PKEY_set1_encoded_public_key(pkey, enckey, enckeylen);