Lines Matching refs:sc
2098 EXT_RETURN tls_construct_ctos_client_cert_type(SSL_CONNECTION *sc, WPACKET *pkt, in tls_construct_ctos_client_cert_type() argument
2102 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_construct_ctos_client_cert_type()
2103 if (sc->client_cert_type == NULL) in tls_construct_ctos_client_cert_type()
2108 || !WPACKET_sub_memcpy_u8(pkt, sc->client_cert_type, sc->client_cert_type_len) in tls_construct_ctos_client_cert_type()
2110 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_construct_ctos_client_cert_type()
2113 sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD; in tls_construct_ctos_client_cert_type()
2117 int tls_parse_stoc_client_cert_type(SSL_CONNECTION *sc, PACKET *pkt, in tls_parse_stoc_client_cert_type() argument
2124 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_client_cert_type()
2128 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_client_cert_type()
2132 if (!ossl_assert(sc->ext.client_cert_type_ctos == OSSL_CERT_TYPE_CTOS_GOOD)) { in tls_parse_stoc_client_cert_type()
2133 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_client_cert_type()
2137 if (sc->client_cert_type == NULL) { in tls_parse_stoc_client_cert_type()
2138 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_client_cert_type()
2142 if (memchr(sc->client_cert_type, type, sc->client_cert_type_len) == NULL) { in tls_parse_stoc_client_cert_type()
2143 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_VALUE); in tls_parse_stoc_client_cert_type()
2146 sc->ext.client_cert_type = type; in tls_parse_stoc_client_cert_type()
2150 EXT_RETURN tls_construct_ctos_server_cert_type(SSL_CONNECTION *sc, WPACKET *pkt, in tls_construct_ctos_server_cert_type() argument
2154 sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE; in tls_construct_ctos_server_cert_type()
2155 if (sc->server_cert_type == NULL) in tls_construct_ctos_server_cert_type()
2160 || !WPACKET_sub_memcpy_u8(pkt, sc->server_cert_type, sc->server_cert_type_len) in tls_construct_ctos_server_cert_type()
2162 SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_construct_ctos_server_cert_type()
2165 sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD; in tls_construct_ctos_server_cert_type()
2169 int tls_parse_stoc_server_cert_type(SSL_CONNECTION *sc, PACKET *pkt, in tls_parse_stoc_server_cert_type() argument
2176 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_server_cert_type()
2180 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_server_cert_type()
2184 if (!ossl_assert(sc->ext.server_cert_type_ctos == OSSL_CERT_TYPE_CTOS_GOOD)) { in tls_parse_stoc_server_cert_type()
2185 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_server_cert_type()
2189 if (sc->server_cert_type == NULL) { in tls_parse_stoc_server_cert_type()
2190 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); in tls_parse_stoc_server_cert_type()
2194 if (memchr(sc->server_cert_type, type, sc->server_cert_type_len) == NULL) { in tls_parse_stoc_server_cert_type()
2195 SSLfatal(sc, SSL_AD_DECODE_ERROR, SSL_R_BAD_VALUE); in tls_parse_stoc_server_cert_type()
2198 sc->ext.server_cert_type = type; in tls_parse_stoc_server_cert_type()