Lines Matching refs:sc
1981 EXT_RETURN tls_construct_stoc_client_cert_type(SSL_CONNECTION *sc, WPACKET *pkt, in tls_construct_stoc_client_cert_type() argument
1985 if (sc->ext.client_cert_type_ctos == OSSL_CERT_TYPE_CTOS_ERROR in tls_construct_stoc_client_cert_type()
1986 && (send_certificate_request(sc) in tls_construct_stoc_client_cert_type()
1987 || sc->post_handshake_auth == SSL_PHA_EXT_RECEIVED)) { in tls_construct_stoc_client_cert_type()
1989 SSLfatal(sc, SSL_AD_UNSUPPORTED_CERTIFICATE, SSL_R_BAD_EXTENSION); in tls_construct_stoc_client_cert_type()
1993 if (sc->ext.client_cert_type == TLSEXT_cert_type_x509) { in tls_construct_stoc_client_cert_type()
1994 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_construct_stoc_client_cert_type()
2002 if ((!send_certificate_request(sc) && sc->post_handshake_auth != SSL_PHA_EXT_RECEIVED) in tls_construct_stoc_client_cert_type()
2003 || sc->ext.client_cert_type_ctos != OSSL_CERT_TYPE_CTOS_GOOD in tls_construct_stoc_client_cert_type()
2004 || sc->client_cert_type == NULL) { in tls_construct_stoc_client_cert_type()
2006 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_construct_stoc_client_cert_type()
2007 sc->ext.client_cert_type = TLSEXT_cert_type_x509; in tls_construct_stoc_client_cert_type()
2013 || !WPACKET_put_bytes_u8(pkt, sc->ext.client_cert_type) in tls_construct_stoc_client_cert_type()
2015 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_construct_stoc_client_cert_type()
2037 int tls_parse_ctos_client_cert_type(SSL_CONNECTION *sc, PACKET *pkt, in tls_parse_ctos_client_cert_type() argument
2046 if (sc->client_cert_type == NULL) { in tls_parse_ctos_client_cert_type()
2047 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_parse_ctos_client_cert_type()
2048 sc->ext.client_cert_type = TLSEXT_cert_type_x509; in tls_parse_ctos_client_cert_type()
2053 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_ERROR; in tls_parse_ctos_client_cert_type()
2054 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_ctos_client_cert_type()
2058 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_ERROR; in tls_parse_ctos_client_cert_type()
2059 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_ctos_client_cert_type()
2063 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_ERROR; in tls_parse_ctos_client_cert_type()
2064 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_ctos_client_cert_type()
2068 sc->ext.client_cert_type_ctos = reconcile_cert_type(data, len, in tls_parse_ctos_client_cert_type()
2069 … sc->client_cert_type, sc->client_cert_type_len, in tls_parse_ctos_client_cert_type()
2070 &sc->ext.client_cert_type); in tls_parse_ctos_client_cert_type()
2076 EXT_RETURN tls_construct_stoc_server_cert_type(SSL_CONNECTION *sc, WPACKET *pkt, in tls_construct_stoc_server_cert_type() argument
2080 if (sc->ext.server_cert_type == TLSEXT_cert_type_x509) { in tls_construct_stoc_server_cert_type()
2081 sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_construct_stoc_server_cert_type()
2084 if (sc->ext.server_cert_type_ctos != OSSL_CERT_TYPE_CTOS_GOOD in tls_construct_stoc_server_cert_type()
2085 || sc->server_cert_type == NULL) { in tls_construct_stoc_server_cert_type()
2087 sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_construct_stoc_server_cert_type()
2088 sc->ext.server_cert_type = TLSEXT_cert_type_x509; in tls_construct_stoc_server_cert_type()
2094 || !WPACKET_put_bytes_u8(pkt, sc->ext.server_cert_type) in tls_construct_stoc_server_cert_type()
2096 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_construct_stoc_server_cert_type()
2102 int tls_parse_ctos_server_cert_type(SSL_CONNECTION *sc, PACKET *pkt, in tls_parse_ctos_server_cert_type() argument
2111 if (sc->server_cert_type == NULL) { in tls_parse_ctos_server_cert_type()
2112 sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_parse_ctos_server_cert_type()
2113 sc->ext.server_cert_type = TLSEXT_cert_type_x509; in tls_parse_ctos_server_cert_type()
2118 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_ctos_server_cert_type()
2123 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_ctos_server_cert_type()
2127 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_ctos_server_cert_type()
2131 …sc->ext.server_cert_type_ctos = reconcile_cert_type(sc->server_cert_type, sc->server_cert_type_len, in tls_parse_ctos_server_cert_type()
2133 &sc->ext.server_cert_type); in tls_parse_ctos_server_cert_type()
2134 if (sc->ext.server_cert_type_ctos == OSSL_CERT_TYPE_CTOS_GOOD) in tls_parse_ctos_server_cert_type()
2138 SSLfatal(sc, SSL_AD_UNSUPPORTED_CERTIFICATE, SSL_R_BAD_EXTENSION); in tls_parse_ctos_server_cert_type()