Lines Matching refs:sc

53 static ossl_inline int received_client_cert(const SSL_CONNECTION *sc)  in received_client_cert()  argument
55 return sc->session->peer_rpk != NULL || sc->session->peer != NULL; in received_client_cert()
389 static int get_compressed_certificate_alg(SSL_CONNECTION *sc) in get_compressed_certificate_alg() argument
392 int *alg = sc->ext.compress_certificate_from_peer; in get_compressed_certificate_alg()
394 if (sc->s3.tmp.cert == NULL) in get_compressed_certificate_alg()
398 if (sc->s3.tmp.cert->comp_cert[*alg] != NULL) in get_compressed_certificate_alg()
455 static int do_compressed_cert(SSL_CONNECTION *sc) in do_compressed_cert() argument
458 return sc->ext.server_cert_type == TLSEXT_cert_type_x509 in do_compressed_cert()
459 && get_compressed_certificate_alg(sc) != TLSEXT_comp_cert_none; in do_compressed_cert()
3516 MSG_PROCESS_RETURN tls_process_client_rpk(SSL_CONNECTION *sc, PACKET *pkt) in tls_process_client_rpk() argument
3522 if (!tls_process_rpk(sc, pkt, &peer_rpk)) { in tls_process_client_rpk()
3528 if ((sc->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) in tls_process_client_rpk()
3529 && (sc->verify_mode & SSL_VERIFY_PEER)) { in tls_process_client_rpk()
3530 SSLfatal(sc, SSL_AD_CERTIFICATE_REQUIRED, in tls_process_client_rpk()
3535 if (ssl_verify_rpk(sc, peer_rpk) <= 0) { in tls_process_client_rpk()
3536 SSLfatal(sc, ssl_x509err2alert(sc->verify_result), in tls_process_client_rpk()
3550 if (sc->post_handshake_auth == SSL_PHA_REQUESTED) { in tls_process_client_rpk()
3551 if ((new_sess = ssl_session_dup(sc->session, 0)) == NULL) { in tls_process_client_rpk()
3552 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_MALLOC_FAILURE); in tls_process_client_rpk()
3556 SSL_SESSION_free(sc->session); in tls_process_client_rpk()
3557 sc->session = new_sess; in tls_process_client_rpk()
3561 X509_free(sc->session->peer); in tls_process_client_rpk()
3562 sc->session->peer = NULL; in tls_process_client_rpk()
3563 sk_X509_pop_free(sc->session->peer_chain, X509_free); in tls_process_client_rpk()
3564 sc->session->peer_chain = NULL; in tls_process_client_rpk()
3566 EVP_PKEY_free(sc->session->peer_rpk); in tls_process_client_rpk()
3567 sc->session->peer_rpk = peer_rpk; in tls_process_client_rpk()
3570 sc->session->verify_result = sc->verify_result; in tls_process_client_rpk()
3576 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_process_client_rpk()
3577 if (!ssl3_digest_cached_records(sc, 1)) { in tls_process_client_rpk()
3583 if (!ssl_handshake_hash(sc, sc->cert_verify_hash, in tls_process_client_rpk()
3584 sizeof(sc->cert_verify_hash), in tls_process_client_rpk()
3585 &sc->cert_verify_hash_len)) { in tls_process_client_rpk()
3591 sc->sent_tickets = 0; in tls_process_client_rpk()
3802 MSG_PROCESS_RETURN tls_process_client_compressed_certificate(SSL_CONNECTION *sc, PACKET *pkt) in tls_process_client_compressed_certificate() argument
3808 if (tls13_process_compressed_certificate(sc, pkt, &tmppkt, buf) != MSG_PROCESS_ERROR) in tls_process_client_compressed_certificate()
3809 ret = tls_process_client_certificate(sc, &tmppkt); in tls_process_client_compressed_certificate()
3855 CON_FUNC_RETURN tls_construct_server_compressed_certificate(SSL_CONNECTION *sc, WPACKET *pkt) in tls_construct_server_compressed_certificate() argument
3857 int alg = get_compressed_certificate_alg(sc); in tls_construct_server_compressed_certificate()
3858 OSSL_COMP_CERT *cc = sc->s3.tmp.cert->comp_cert[alg]; in tls_construct_server_compressed_certificate()
3861 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_construct_server_compressed_certificate()
3875 sc->s3.tmp.cert->cert_comp_used++; in tls_construct_server_compressed_certificate()