Lines Matching refs:sc

45     SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);  in ossl_statem_set_mutator()  local
47 if (sc == NULL) in ossl_statem_set_mutator()
50 sc->statem.mutate_handshake_cb = mutate_handshake_cb; in ossl_statem_set_mutator()
51 sc->statem.mutatearg = mutatearg; in ossl_statem_set_mutator()
52 sc->statem.finish_mutate_handshake_cb = finish_mutate_handshake_cb; in ossl_statem_set_mutator()
1099 EVP_PKEY* tls_get_peer_pkey(const SSL_CONNECTION *sc) in tls_get_peer_pkey() argument
1101 if (sc->session->peer_rpk != NULL) in tls_get_peer_pkey()
1102 return sc->session->peer_rpk; in tls_get_peer_pkey()
1103 if (sc->session->peer != NULL) in tls_get_peer_pkey()
1104 return X509_get0_pubkey(sc->session->peer); in tls_get_peer_pkey()
1108 int tls_process_rpk(SSL_CONNECTION *sc, PACKET *pkt, EVP_PKEY **peer_rpk) in tls_process_rpk() argument
1117 SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(sc); in tls_process_rpk()
1195 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_process_rpk()
1197 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_INVALID_CONTEXT); in tls_process_rpk()
1200 if (sc->server) { in tls_process_rpk()
1201 if (sc->pha_context == NULL) { in tls_process_rpk()
1203 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_INVALID_CONTEXT); in tls_process_rpk()
1207 if (!PACKET_equal(&context, sc->pha_context, sc->pha_context_len)) { in tls_process_rpk()
1208 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_INVALID_CONTEXT); in tls_process_rpk()
1214 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_INVALID_CONTEXT); in tls_process_rpk()
1222 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH); in tls_process_rpk()
1237 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_process_rpk()
1243 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH); in tls_process_rpk()
1248 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_EMPTY_RAW_PUBLIC_KEY); in tls_process_rpk()
1256 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH); in tls_process_rpk()
1262 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH); in tls_process_rpk()
1266 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, in tls_process_rpk()
1272 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_process_rpk()
1274 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH); in tls_process_rpk()
1279 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH); in tls_process_rpk()
1282 if (!tls_collect_extensions(sc, &extensions, SSL_EXT_TLS1_3_RAW_PUBLIC_KEY, in tls_process_rpk()
1288 if (!tls_parse_all_extensions(sc, SSL_EXT_TLS1_3_RAW_PUBLIC_KEY, in tls_process_rpk()
1306 unsigned long tls_output_rpk(SSL_CONNECTION *sc, WPACKET *pkt, CERT_PKEY *cpk) in tls_output_rpk() argument
1319 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_output_rpk()
1328 if (sc->server) { in tls_output_rpk()
1329 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_output_rpk()
1334 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_output_rpk()
1341 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_output_rpk()
1349 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_output_rpk()
1351 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_output_rpk()
1357 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_output_rpk()
1361 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_output_rpk()
1367 if (!tls_construct_extensions(sc, pkt, SSL_EXT_TLS1_3_RAW_PUBLIC_KEY, in tls_output_rpk()
1373 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_output_rpk()
2834 MSG_PROCESS_RETURN tls13_process_compressed_certificate(SSL_CONNECTION *sc, in tls13_process_compressed_certificate() argument
2849 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls13_process_compressed_certificate()
2853 SSLfatal(sc, SSL_AD_BAD_CERTIFICATE, ERR_R_INTERNAL_ERROR); in tls13_process_compressed_certificate()
2857 if (sc->cert_comp_prefs[0] != TLSEXT_comp_cert_none) { in tls13_process_compressed_certificate()
2858 for (i = 0; sc->cert_comp_prefs[i] != TLSEXT_comp_cert_none; i++) { in tls13_process_compressed_certificate()
2859 if (sc->cert_comp_prefs[i] == comp_alg) { in tls13_process_compressed_certificate()
2865 SSLfatal(sc, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_COMPRESSION_ALGORITHM); in tls13_process_compressed_certificate()
2870 SSLfatal(sc, SSL_AD_BAD_CERTIFICATE, SSL_R_BAD_COMPRESSION_ALGORITHM); in tls13_process_compressed_certificate()
2884 SSLfatal(sc, SSL_AD_BAD_CERTIFICATE, SSL_R_BAD_COMPRESSION_ALGORITHM); in tls13_process_compressed_certificate()
2891 SSLfatal(sc, SSL_AD_BAD_CERTIFICATE, SSL_R_BAD_DECOMPRESSION); in tls13_process_compressed_certificate()
2896 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_DECOMPRESSION); in tls13_process_compressed_certificate()
2904 SSLfatal(sc, SSL_AD_BAD_CERTIFICATE, SSL_R_BAD_DECOMPRESSION); in tls13_process_compressed_certificate()