Home
last modified time | relevance | path

Searched refs:sc (Results 1 – 25 of 43) sorted by relevance

12

/openssl/ssl/record/
H A Drec_layer_d1.c208 if (sc == NULL) in dtls1_read_bytes()
247 if (sc->rlayer.curr_rec >= sc->rlayer.num_recs) { in dtls1_read_bytes()
248 sc->rlayer.curr_rec = sc->rlayer.num_recs = 0; in dtls1_read_bytes()
250 rr = &sc->rlayer.tlsrecs[sc->rlayer.num_recs]; in dtls1_read_bytes()
253 sc->rlayer.rrlmethod->read_record(sc->rlayer.rrl, in dtls1_read_bytes()
271 } while (sc->rlayer.rrlmethod->processed_read_pending(sc->rlayer.rrl) in dtls1_read_bytes()
274 rr = &sc->rlayer.tlsrecs[sc->rlayer.curr_rec]; in dtls1_read_bytes()
395 sc->msg_callback(0, sc->version, SSL3_RT_ALERT, alert_bytes, 2, s, in dtls1_read_bytes()
448 SSL_CTX_remove_session(sc->session_ctx, sc->session); in dtls1_read_bytes()
549 if (!sc->rlayer.rrlmethod->unprocessed_read_pending(sc->rlayer.rrl)) { in dtls1_read_bytes()
[all …]
H A Drec_layer_s3.c178 if (sc == NULL) in ssl3_pending()
181 if (SSL_CONNECTION_IS_DTLS(sc)) { in ssl3_pending()
198 num += sc->rlayer.rrlmethod->app_data_pending(sc->rlayer.rrl); in ssl3_pending()
212 if (sc == NULL || IS_QUIC(s)) in SSL_set_default_read_buffer_len()
214 sc->rlayer.default_read_buf_len = len; in SSL_set_default_read_buffer_len()
222 if (sc == NULL) in SSL_rstate_string_long()
225 if (sc->rlayer.rrlmethod == NULL || sc->rlayer.rrl == NULL) in SSL_rstate_string_long()
228 sc->rlayer.rrlmethod->get_state(sc->rlayer.rrl, NULL, &lng); in SSL_rstate_string_long()
238 if (sc == NULL) in SSL_rstate_string()
241 if (sc->rlayer.rrlmethod == NULL || sc->rlayer.rrl == NULL) in SSL_rstate_string()
[all …]
/openssl/ssl/
H A Dssl_lib.c610 sc->client_version = sc->version; in ossl_ssl_connection_reset()
1516 sc->rlayer.rrlmethod->set1_bio(sc->rlayer.rrl, sc->rbio); in SSL_set0_rbio()
1537 sc->wbio = BIO_pop(sc->wbio); in SSL_set0_wbio()
1544 sc->wbio = BIO_push(sc->bbio, sc->wbio); in SSL_set0_wbio()
1546 sc->rlayer.wrlmethod->set1_bio(sc->rlayer.wrl, sc->wbio); in SSL_set0_wbio()
2365 if (sc == NULL || !sc->server) { in SSL_read_early_data()
3239 if (sc == NULL || !sc->server) in STACK_OF()
5712 if (sc == NULL || sc->session == NULL) in SSL_get_psk_identity_hint()
5722 if (sc == NULL || sc->session == NULL) in SSL_get_psk_identity()
7543 if (sc == NULL || sc->rbio == NULL) in SSL_get_rpoll_descriptor()
[all …]
H A Ds3_msg.c85 if (sc == NULL) in ssl3_dispatch_alert()
98 && !sc->renegotiate in ssl3_dispatch_alert()
103 templ.buf = &sc->s3.send_alert[0]; in ssl3_dispatch_alert()
118 sc->rlayer.wrlmethod->retry_write_records(sc->rlayer.wrl)); in ssl3_dispatch_alert()
123 sc->rlayer.wpend_tot = 0; in ssl3_dispatch_alert()
129 sc->rlayer.wrlmethod->write_records(sc->rlayer.wrl, &templ, 1)); in ssl3_dispatch_alert()
141 (void)BIO_flush(sc->wbio); in ssl3_dispatch_alert()
144 if (sc->msg_callback) in ssl3_dispatch_alert()
145 sc->msg_callback(1, sc->version, SSL3_RT_ALERT, sc->s3.send_alert, in ssl3_dispatch_alert()
149 cb = sc->info_callback; in ssl3_dispatch_alert()
[all …]
H A Dtls_srp.c232 if (sc == NULL) in SSL_srp_server_param_with_username()
248 if (sc == NULL) in SSL_set_srp_server_param_pw()
257 sc->srp_ctx.v = NULL; in SSL_set_srp_server_param_pw()
260 if (!SRP_create_verifier_BN_ex(user, pass, &sc->srp_ctx.s, &sc->srp_ctx.v, in SSL_set_srp_server_param_pw()
273 if (sc == NULL) in SSL_set_srp_server_param()
320 !(sc->srp_ctx.g) || !(sc->srp_ctx.s) || !(sc->srp_ctx.v)) in SSL_set_srp_server_param()
467 if (sc == NULL) in SRP_Calc_A_param()
477 if (sc == NULL) in SSL_get_srp_g()
489 if (sc == NULL) in SSL_get_srp_N()
501 if (sc == NULL) in SSL_get_srp_username()
[all …]
H A Ds3_lib.c3390 if (sc == NULL) in ssl3_new()
3423 OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen); in ssl3_free()
3438 memset(&sc->s3, 0, sizeof(sc->s3)); in ssl3_free()
3453 OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen); in ssl3_clear()
3471 memset(&sc->s3, 0, sizeof(sc->s3)); in ssl3_clear()
3683 sc->cert->key = sc->s3.tmp.cert; in ssl3_ctrl()
3734 if (SSL_CONNECTION_IS_TLS13(sc) && sc->s3.did_kex) in ssl3_ctrl()
3756 if (sc->server || !sc->s3.tmp.cert_req) in ssl3_ctrl()
3796 if (sc->session == NULL || sc->s3.peer_tmp == NULL) { in ssl3_ctrl()
3805 if (sc->session == NULL || sc->s3.tmp.pkey == NULL) { in ssl3_ctrl()
[all …]
H A Dd1_srtp.c153 SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s); in SSL_set_tlsext_use_srtp() local
155 if (sc == NULL) in SSL_set_tlsext_use_srtp()
158 return ssl_ctx_make_profiles(profiles, &sc->srtp_profiles); in SSL_set_tlsext_use_srtp()
163 SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s); in STACK_OF() local
165 if (sc != NULL) { in STACK_OF()
166 if (sc->srtp_profiles != NULL) { in STACK_OF()
167 return sc->srtp_profiles; in STACK_OF()
178 SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s); in SSL_get_selected_srtp_profile() local
180 if (sc == NULL) in SSL_get_selected_srtp_profile()
183 return sc->srtp_profile; in SSL_get_selected_srtp_profile()
H A Dssl_cert_comp.c201 if (sc == NULL in ssl_get_cert_to_compress()
203 || !sc->server in ssl_get_cert_to_compress()
264 if (sc == NULL in ssl_compress_certs()
275 alg = sc->cert_comp_prefs[i]; in ssl_compress_certs()
309 if (sc == NULL in ssl_get_compressed_cert()
313 || !sc->server in ssl_get_compressed_cert()
374 if (sc == NULL) in SSL_set1_cert_comp_preference()
387 if (sc == NULL || sc->cert == NULL) in SSL_compress_certs()
416 if (sc->cert != NULL) in SSL_get1_compressed_cert()
417 cpk = sc->cert->key; in SSL_get1_compressed_cert()
[all …]
H A Dt1_trce.c729 if (SSL_USE_SIGALGS(sc)) { in ssl_print_signature()
1018 if (SSL_CONNECTION_IS_DTLS(sc)) { in ssl_print_client_hello()
1353 if (SSL_CONNECTION_IS_TLS13(sc) in ssl_print_certificates()
1464 if (SSL_CONNECTION_IS_TLS13(sc)) { in ssl_print_cert_request()
1485 if (SSL_USE_SIGALGS(sc)) { in ssl_print_cert_request()
1539 if (SSL_CONNECTION_IS_TLS13(sc)) { in ssl_print_cert_request()
1567 if (SSL_CONNECTION_IS_TLS13(sc)) { in ssl_print_ticket()
1587 if (SSL_CONNECTION_IS_TLS13(sc) in ssl_print_ticket()
1612 if (SSL_CONNECTION_IS_DTLS(sc)) { in ssl_print_handshake()
1731 if (sc == NULL) in SSL_trace()
[all …]
H A Dssl_rsa.c36 if (sc == NULL) in SSL_use_certificate()
44 rv = ssl_security_cert(sc, NULL, x, 0, 1); in SSL_use_certificate()
50 return ssl_set_cert(sc->cert, x, SSL_CONNECTION_GET_CTX(sc)); in SSL_use_certificate()
87 if (sc == NULL) in SSL_use_certificate_file()
157 if (sc == NULL) in SSL_use_PrivateKey()
164 ret = ssl_set_pkey(sc->cert, pkey, SSL_CONNECTION_GET_CTX(sc)); in SSL_use_PrivateKey()
192 if (sc == NULL) in SSL_use_PrivateKey_file()
478 if (sc == NULL) in use_certificate_chain_file()
662 if (sc == NULL) { in serverinfoex_srv_add_cb()
980 SSL_CONNECTION *sc = NULL; in ssl_set_cert_and_key() local
[all …]
H A Dd1_msg.c16 SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s); in dtls1_write_app_data_bytes() local
18 if (sc == NULL) in dtls1_write_app_data_bytes()
21 if (SSL_in_init(s) && !ossl_statem_get_in_handshake(sc)) { in dtls1_write_app_data_bytes()
22 i = sc->handshake_func(s); in dtls1_write_app_data_bytes()
36 return dtls1_write_bytes(sc, type, buf_, len, written); in dtls1_write_app_data_bytes()
H A Dssl_stat.c16 const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s); in SSL_state_string_long() local
18 if (sc == NULL || ossl_statem_in_error(sc)) in SSL_state_string_long()
133 const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s); in SSL_state_string() local
135 if (sc == NULL || ossl_statem_in_error(sc)) in SSL_state_string()
H A Dssl_sess.c66 if (sc == NULL) in SSL_get_session()
69 return sc->session; in SSL_get_session()
890 if (sc == NULL) in SSL_set_session()
893 ssl_clear_bad_session(sc); in SSL_set_session()
903 SSL_SESSION_free(sc->session); in SSL_set_session()
904 sc->session = session; in SSL_set_session()
1145 if (sc == NULL) in SSL_set_session_secret_cb()
1158 if (sc == NULL) in SSL_set_session_ticket_ext_cb()
1170 if (sc == NULL) in SSL_set_session_ticket_ext()
1176 sc->ext.session_ticket = in SSL_set_session_ticket_ext()
[all …]
H A Dssl_cert.c583 if (sc == NULL) in SSL_set0_CA_list()
603 if (sc == NULL) in STACK_OF()
606 return sc->ca_names != NULL ? sc->ca_names : s->ctx->ca_names; in STACK_OF()
623 if (sc == NULL) in SSL_set_client_CA_list()
633 if (sc == NULL) in STACK_OF()
643 if (sc == NULL) in STACK_OF()
646 if (!sc->server) in STACK_OF()
648 return sc->client_ca_names != NULL ? sc->client_ca_names in STACK_OF()
675 if (sc == NULL) in SSL_add1_to_CA_list()
694 if (sc == NULL) in SSL_add_client_CA()
[all …]
H A Dssl_conf.c448 if (sc != NULL) { in cmd_Certificate()
450 c = sc->cert; in cmd_Certificate()
503 if (sc == NULL) in do_store()
506 cert = sc->cert; in do_store()
1050 if (sc != NULL) in SSL_CONF_CTX_finish()
1051 c = sc->cert; in SSL_CONF_CTX_finish()
1125 if (sc == NULL) in SSL_CONF_CTX_set_ssl()
1127 cctx->poptions = &sc->options; in SSL_CONF_CTX_set_ssl()
1128 cctx->min_version = &sc->min_proto_version; in SSL_CONF_CTX_set_ssl()
1130 cctx->pcert_flags = &sc->cert->cert_flags; in SSL_CONF_CTX_set_ssl()
[all …]
/openssl/crypto/ess/
H A Dess_lib.c29 ESS_SIGNING_CERT *sc; in OSSL_ESS_signing_cert_new_init() local
32 if ((sc = ESS_SIGNING_CERT_new()) == NULL) { in OSSL_ESS_signing_cert_new_init()
36 if (sc->cert_ids == NULL in OSSL_ESS_signing_cert_new_init()
43 || !sk_ESS_CERT_ID_push(sc->cert_ids, cid)) { in OSSL_ESS_signing_cert_new_init()
54 if (!sk_ESS_CERT_ID_push(sc->cert_ids, cid)) { in OSSL_ESS_signing_cert_new_init()
60 return sc; in OSSL_ESS_signing_cert_new_init()
62 ESS_SIGNING_CERT_free(sc); in OSSL_ESS_signing_cert_new_init()
131 ESS_SIGNING_CERT_V2 *sc; in OSSL_ESS_signing_cert_v2_new_init() local
134 if ((sc = ESS_SIGNING_CERT_V2_new()) == NULL) { in OSSL_ESS_signing_cert_v2_new_init()
163 return sc; in OSSL_ESS_signing_cert_v2_new_init()
[all …]
/openssl/ssl/statem/
H A Dextensions_srvr.c1986 && (send_certificate_request(sc) 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()
2004 || sc->client_cert_type == NULL) { in tls_construct_stoc_client_cert_type()
2007 sc->ext.client_cert_type = TLSEXT_cert_type_x509; in tls_construct_stoc_client_cert_type()
2046 if (sc->client_cert_type == NULL) { in tls_parse_ctos_client_cert_type()
2048 sc->ext.client_cert_type = TLSEXT_cert_type_x509; in tls_parse_ctos_client_cert_type()
2069sc->client_cert_type, sc->client_cert_type_len, in tls_parse_ctos_client_cert_type()
2085 || sc->server_cert_type == NULL) { in tls_construct_stoc_server_cert_type()
2088 sc->ext.server_cert_type = TLSEXT_cert_type_x509; in tls_construct_stoc_server_cert_type()
2111 if (sc->server_cert_type == NULL) { in tls_parse_ctos_server_cert_type()
[all …]
H A Dextensions.c1802 memset(sc->ext.compress_certificate_from_peer, 0, in tls_init_compress_certificate()
1819 if (sc->server && sc->ext.server_cert_type != TLSEXT_cert_type_x509) { in tls_construct_compress_certificate()
1820 sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none; in tls_construct_compress_certificate()
1825 if (!sc->server && sc->ext.client_cert_type_ctos) { in tls_construct_compress_certificate()
1826 sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none; in tls_construct_compress_certificate()
1849 sc->ext.compress_certificate_sent = 1; in tls_construct_compress_certificate()
1875 if (sc->cert_comp_prefs[i] == alg) in tls_comp_in_pref()
1895 if (sc->server && sc->ext.server_cert_type != TLSEXT_cert_type_x509) in tls_parse_compress_certificate()
1897 if (!sc->server && sc->ext.client_cert_type != TLSEXT_cert_type_x509) in tls_parse_compress_certificate()
1930 if (sc->server) { in init_server_cert_type()
[all …]
H A Dstatem.c77 if (sc == NULL) in SSL_get_state()
80 return sc->statem.hand_state; in SSL_get_state()
87 if (sc == NULL) in SSL_in_init()
90 return sc->statem.in_init; in SSL_in_init()
97 if (sc == NULL) in SSL_is_init_finished()
100 return !(sc->statem.in_init) && (sc->statem.hand_state == TLS_ST_OK); in SSL_is_init_finished()
107 if (sc == NULL) in SSL_in_before()
296 if (sc == NULL) in ossl_statem_connect()
299 return state_machine(sc, 0); in ossl_statem_connect()
306 if (sc == NULL) in ossl_statem_accept()
[all …]
H A Dstatem_lib.c47 if (sc == NULL) in ossl_statem_set_mutator()
51 sc->statem.mutatearg = mutatearg; in ossl_statem_set_mutator()
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()
1195 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_process_rpk()
1200 if (sc->server) { in tls_process_rpk()
1207 if (!PACKET_equal(&context, sc->pha_context, sc->pha_context_len)) { in tls_process_rpk()
1237 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_process_rpk()
1272 if (SSL_CONNECTION_IS_TLS13(sc)) { in tls_process_rpk()
[all …]
H A Dextensions_clnt.c2103 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()
2137 if (sc->client_cert_type == NULL) { 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()
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()
2189 if (sc->server_cert_type == NULL) { 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()
[all …]
H A Dstatem_local.h136 __owur MSG_PROCESS_RETURN tls13_process_compressed_certificate(SSL_CONNECTION *sc,
176 __owur MSG_PROCESS_RETURN tls_process_server_rpk(SSL_CONNECTION *sc,
178 __owur MSG_PROCESS_RETURN tls_process_client_rpk(SSL_CONNECTION *sc,
180 __owur unsigned long tls_output_rpk(SSL_CONNECTION *sc, WPACKET *pkt,
547 __owur EVP_PKEY* tls_get_peer_pkey(const SSL_CONNECTION *sc);
549 EXT_RETURN tls_construct_ctos_client_cert_type(SSL_CONNECTION *sc, WPACKET *pkt,
552 EXT_RETURN tls_construct_stoc_client_cert_type(SSL_CONNECTION *sc, WPACKET *pkt,
555 int tls_parse_ctos_client_cert_type(SSL_CONNECTION *sc, PACKET *pkt,
558 int tls_parse_stoc_client_cert_type(SSL_CONNECTION *sc, PACKET *pkt,
561 EXT_RETURN tls_construct_ctos_server_cert_type(SSL_CONNECTION *sc, WPACKET *pkt,
[all …]
H A Dstatem_clnt.c44 return sc->session->peer_rpk != NULL || sc->session->peer != NULL; in received_server_cert()
1921 sc->rwstate = SSL_NOTHING; in tls_post_process_server_rpk()
1922 if (ssl_verify_rpk(sc, sc->session->peer_rpk) > 0 in tls_post_process_server_rpk()
1945 X509_free(sc->session->peer); in tls_post_process_server_rpk()
1946 sc->session->peer = NULL; in tls_post_process_server_rpk()
1949 sc->session->verify_result = sc->verify_result; in tls_post_process_server_rpk()
1953 && !ssl_handshake_hash(sc, sc->cert_verify_hash, in tls_post_process_server_rpk()
3837 if (sc->pha_context == NULL) { in tls_construct_client_compressed_certificate()
3841 } else if (!WPACKET_sub_memcpy_u8(&tmppkt, sc->pha_context, sc->pha_context_len)) in tls_construct_client_compressed_certificate()
3844 if (!ssl3_output_cert_chain(sc, &tmppkt, sc->cert->key, 0)) { in tls_construct_client_compressed_certificate()
[all …]
H A Dstatem_srvr.c55 return sc->session->peer_rpk != NULL || sc->session->peer != NULL; in received_client_cert()
394 if (sc->s3.tmp.cert == NULL) in get_compressed_certificate_alg()
3536 SSLfatal(sc, ssl_x509err2alert(sc->verify_result), 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()
3564 sc->session->peer_chain = NULL; 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()
3583 if (!ssl_handshake_hash(sc, sc->cert_verify_hash, in tls_process_client_rpk()
[all …]
/openssl/crypto/cms/
H A Dcms_ess.c56 ESS_SIGNING_CERT *sc; in ossl_cms_signerinfo_get_signing_cert() local
65 sc = ASN1_item_unpack(str, ASN1_ITEM_rptr(ESS_SIGNING_CERT)); in ossl_cms_signerinfo_get_signing_cert()
66 if (sc == NULL) in ossl_cms_signerinfo_get_signing_cert()
69 *psc = sc; in ossl_cms_signerinfo_get_signing_cert()
71 ESS_SIGNING_CERT_free(sc); in ossl_cms_signerinfo_get_signing_cert()
83 ESS_SIGNING_CERT_V2 *sc; in ossl_cms_signerinfo_get_signing_cert_v2() local
92 sc = ASN1_item_unpack(str, ASN1_ITEM_rptr(ESS_SIGNING_CERT_V2)); in ossl_cms_signerinfo_get_signing_cert_v2()
93 if (sc == NULL) in ossl_cms_signerinfo_get_signing_cert_v2()
96 *psc = sc; in ossl_cms_signerinfo_get_signing_cert_v2()
98 ESS_SIGNING_CERT_V2_free(sc); in ossl_cms_signerinfo_get_signing_cert_v2()

Completed in 193 milliseconds

12