/ssl/quic/ |
A D | quic_impl.c | 84 if (ctx->is_stream && ctx->xso != NULL) in quic_set_last_error() 86 else if (!ctx->is_stream && ctx->qc != NULL) in quic_set_last_error() 2215 wargs.ctx = ctx; in qc_wait_for_default_xso_for_read() 2420 last_error = ctx.is_stream ? ctx.xso->last_error : ctx.qc->last_error; in ossl_quic_get_error() 2467 w = error_to_want(ctx.is_stream ? ctx.xso->last_error : ctx.qc->last_error); in ossl_quic_want() 3097 ctx.xso = ctx.qc->default_xso; in quic_read() 3123 args.ctx = &ctx; in quic_read() 3196 ctx.xso = ctx.qc->default_xso; in ossl_quic_pending_int() 3957 args.ctx = &ctx; in ossl_quic_accept_stream() 5281 if (ctx.qc != NULL && !ctx.qc->started) { in ossl_quic_conn_poll_events() [all …]
|
A D | quic_reactor_wait_ctx.c | 22 void ossl_quic_reactor_wait_ctx_init(QUIC_REACTOR_WAIT_CTX *ctx) in ossl_quic_reactor_wait_ctx_init() argument 24 ossl_list_quic_reactor_wait_slot_init(&ctx->slots); in ossl_quic_reactor_wait_ctx_init() 43 int ossl_quic_reactor_wait_ctx_enter(QUIC_REACTOR_WAIT_CTX *ctx, in ossl_quic_reactor_wait_ctx_enter() argument 48 OSSL_LIST_FOREACH(slot, quic_reactor_wait_slot, &ctx->slots) in ossl_quic_reactor_wait_ctx_enter() 57 ossl_list_quic_reactor_wait_slot_insert_tail(&ctx->slots, slot); in ossl_quic_reactor_wait_ctx_enter() 64 void ossl_quic_reactor_wait_ctx_leave(QUIC_REACTOR_WAIT_CTX *ctx, in ossl_quic_reactor_wait_ctx_leave() argument 69 OSSL_LIST_FOREACH(slot, quic_reactor_wait_slot, &ctx->slots) in ossl_quic_reactor_wait_ctx_leave() 77 void ossl_quic_reactor_wait_ctx_cleanup(QUIC_REACTOR_WAIT_CTX *ctx) in ossl_quic_reactor_wait_ctx_cleanup() argument 81 OSSL_LIST_FOREACH_DELSAFE(slot, nslot, quic_reactor_wait_slot, &ctx->slots) { in ossl_quic_reactor_wait_ctx_cleanup()
|
A D | quic_tserver.c | 41 SSL_CTX *ctx; member 98 if (args->ctx != NULL) in ossl_quic_tserver_new() 99 srv->ctx = args->ctx; in ossl_quic_tserver_new() 103 if (srv->ctx == NULL) in ossl_quic_tserver_new() 114 SSL_CTX_set_alpn_select_cb(srv->ctx, alpn_select_cb, srv); in ossl_quic_tserver_new() 116 srv->tls = SSL_new(srv->ctx); in ossl_quic_tserver_new() 130 port_args.channel_ctx = srv->ctx; in ossl_quic_tserver_new() 154 if (args->ctx == NULL) in ossl_quic_tserver_new() 155 SSL_CTX_free(srv->ctx); in ossl_quic_tserver_new() 182 SSL_CTX_free(srv->ctx); in ossl_quic_tserver_free() [all …]
|
A D | quic_obj.c | 17 SSL_CTX *ctx, in ossl_quic_obj_init() argument 34 if (!ossl_ssl_init(&obj->ssl, ctx, ctx->method, type)) in ossl_quic_obj_init() 37 obj->domain_flags = ctx->domain_flags; in ossl_quic_obj_init()
|
/ssl/ |
A D | tls_srp.c | 35 if (ctx == NULL) in ssl_ctx_srp_ctx_free_intern() 39 BN_free(ctx->srp_ctx.N); in ssl_ctx_srp_ctx_free_intern() 40 BN_free(ctx->srp_ctx.g); in ssl_ctx_srp_ctx_free_intern() 41 BN_free(ctx->srp_ctx.s); in ssl_ctx_srp_ctx_free_intern() 42 BN_free(ctx->srp_ctx.B); in ssl_ctx_srp_ctx_free_intern() 43 BN_free(ctx->srp_ctx.A); in ssl_ctx_srp_ctx_free_intern() 44 BN_free(ctx->srp_ctx.a); in ssl_ctx_srp_ctx_free_intern() 47 memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx)); in ssl_ctx_srp_ctx_free_intern() 94 SSL_CTX *ctx; in ssl_srp_ctx_init_intern() local 175 if (ctx == NULL) in ssl_ctx_srp_ctx_init_intern() [all …]
|
A D | ssl_rsa.c | 77 x = X509_new_ex(ssl->ctx->libctx, ssl->ctx->propq); in SSL_use_certificate_file() 116 x = X509_new_ex(ssl->ctx->libctx, ssl->ctx->propq); in SSL_use_certificate_ASN1() 254 return ssl_set_cert(ctx->cert, x, ctx); in SSL_CTX_use_certificate() 333 x = X509_new_ex(ctx->libctx, ctx->propq); in SSL_CTX_use_certificate_file() 366 x = X509_new_ex(ctx->libctx, ctx->propq); in SSL_CTX_use_certificate_ASN1() 389 return ssl_set_pkey(ctx->cert, pkey, ctx); in SSL_CTX_use_PrivateKey() 418 ctx->libctx, ctx->propq); in SSL_CTX_use_PrivateKey_file() 421 pkey = d2i_PrivateKey_ex_bio(in, NULL, ctx->libctx, ctx->propq); in SSL_CTX_use_PrivateKey_file() 468 SSL_CTX *real_ctx = (ssl == NULL) ? ctx : ssl->ctx; in use_certificate_chain_file() 516 if (ctx) in use_certificate_chain_file() [all …]
|
A D | ssl_lib.c | 708 return ctx->method->ssl_new(ctx); in SSL_new() 726 ssl->ctx = ctx; in ossl_ssl_init() 910 memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len); in ossl_ssl_connection_new_int() 2091 if ((ctx == NULL) || (ctx->cert->key->x509 == NULL)) { in SSL_CTX_check_private_key() 3190 return ssl_tsan_load(ctx, &ctx->stats.sess_accept); in SSL_CTX_ctrl() 3196 return ssl_tsan_load(ctx, &ctx->stats.sess_hit); in SSL_CTX_ctrl() 3198 return ssl_tsan_load(ctx, &ctx->stats.sess_cb_hit); in SSL_CTX_ctrl() 3200 return ssl_tsan_load(ctx, &ctx->stats.sess_miss); in SSL_CTX_ctrl() 3432 ctx = s->ctx; in SSL_set_cipher_list() 5511 if (ssl->ctx == ctx) in SSL_set_SSL_CTX() [all …]
|
A D | ssl_sess.c | 790 while (SSL_CTX_sess_number(ctx) >= SSL_CTX_sess_get_cache_size(ctx)) { in SSL_CTX_add_session() 791 if (!remove_session_lock(ctx, ctx->session_cache_tail, 0)) in SSL_CTX_add_session() 794 ssl_tsan_counter(ctx, &ctx->stats.sess_cache_full); in SSL_CTX_add_session() 840 ctx->remove_session_cb(ctx, c); in remove_session_lock() 1353 s->owner = ctx; in SSL_SESSION_list_add() 1359 ctx->new_session_cb = cb; in SSL_CTX_sess_set_new_cb() 1372 void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (SSL_CTX *ctx, in SSL_CTX_sess_get_remove_cb() argument 1382 ctx->get_session_cb = cb; in SSL_CTX_sess_set_get_cb() 1395 ctx->info_callback = cb; in SSL_CTX_set_info_callback() 1455 SSL_CTX *ctx, in SSL_CTX_set_stateless_cookie_generate_cb() argument [all …]
|
A D | ssl_cert.c | 434 X509_STORE_CTX *ctx = NULL; in ssl_verify_internal() local 456 if (ctx == NULL) { in ssl_verify_internal() 531 i = X509_verify_cert(ctx); in ssl_verify_internal() 553 X509_STORE_CTX_free(ctx); in ssl_verify_internal() 629 return ctx->ca_names; in STACK_OF() 649 return ctx->client_ca_names; in STACK_OF() 1026 OSSL_STORE_CTX *ctx = NULL; in add_uris_recursive() local 1034 while (!OSSL_STORE_eof(ctx) && !OSSL_STORE_error(ctx)) { in add_uris_recursive() 1074 OSSL_STORE_close(ctx); in add_uris_recursive() 1230 if (ctx != NULL) in ssl_get_security_level_bits() [all …]
|
A D | ssl_ciph.c | 333 ctx->disabled_enc_mask = 0; in ssl_load_ciphers() 337 = ssl_evp_cipher_fetch(ctx->libctx, t->nid, ctx->propq); in ssl_load_ciphers() 344 ctx->disabled_mac_mask = 0; in ssl_load_ciphers() 347 = ssl_evp_md_fetch(ctx->libctx, t->nid, ctx->propq); in ssl_load_ciphers() 361 ctx->disabled_mkey_mask = 0; in ssl_load_ciphers() 369 sig = EVP_SIGNATURE_fetch(ctx->libctx, "DSA", ctx->propq); in ssl_load_ciphers() 374 kex = EVP_KEYEXCH_fetch(ctx->libctx, "DH", ctx->propq); in ssl_load_ciphers() 379 kex = EVP_KEYEXCH_fetch(ctx->libctx, "ECDH", ctx->propq); in ssl_load_ciphers() 384 sig = EVP_SIGNATURE_fetch(ctx->libctx, "ECDSA", ctx->propq); in ssl_load_ciphers() 468 *enc = EVP_CIPHER_fetch(ctx->libctx, "NULL", ctx->propq); in ssl_cipher_get_evp_cipher() [all …]
|
A D | ssl_conf.c | 87 SSL_CTX *ctx; member 252 if (cctx->ctx) in cmd_ECDHParameters() 264 if (cctx->ctx) in cmd_CipherString() 275 if (cctx->ctx) in cmd_Ciphersuites() 482 if (cctx->ctx) in cmd_PrivateKey() 492 if (cctx->ctx) in cmd_ServerInfoFile() 503 SSL_CTX *ctx; in do_store() local 509 ctx = cctx->ctx; in do_store() 517 ctx = cctx->ssl->ctx; in do_store() 1171 cctx->ctx = ctx; in SSL_CONF_CTX_set_ssl_ctx() [all …]
|
A D | tls_depr.c | 81 int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e) in SSL_CTX_set_client_cert_engine() argument 92 ctx->client_cert_engine = e; in SSL_CTX_set_client_cert_engine() 115 void ssl_hmac_old_free(SSL_HMAC *ctx) in ssl_hmac_old_free() argument 117 HMAC_CTX_free(ctx->old_ctx); in ssl_hmac_old_free() 127 return HMAC_Update(ctx->old_ctx, data, len); in ssl_hmac_old_update() 134 if (HMAC_Final(ctx->old_ctx, md, &l) > 0) { in ssl_hmac_old_final() 143 size_t ssl_hmac_old_size(const SSL_HMAC *ctx) in ssl_hmac_old_size() argument 145 return HMAC_size(ctx->old_ctx); in ssl_hmac_old_size() 148 HMAC_CTX *ssl_hmac_get0_HMAC_CTX(SSL_HMAC *ctx) in ssl_hmac_get0_HMAC_CTX() argument 150 return ctx->old_ctx; in ssl_hmac_get0_HMAC_CTX() [all …]
|
A D | t1_lib.c | 230 SSL_CTX *ctx = pgd->ctx; in add_provider_groups() local 258 ginf = &ctx->group_list[ctx->group_list_len]; in add_provider_groups() 379 SSL_CTX *ctx = pgd->ctx; in add_provider_sigalgs() local 1615 gcb.ctx = ctx; in tls1_set_groups_list() 3836 sig.ctx = ctx; in tls1_set_sigalgs_list() 4856 EVP_MAC_CTX_free(ctx->ctx); in ssl_hmac_free() 4866 return ctx->ctx; in ssl_hmac_get0_EVP_MAC_CTX() 4873 if (ctx->ctx != NULL) { in ssl_hmac_init() 4888 if (ctx->ctx != NULL) in ssl_hmac_update() 4900 if (ctx->ctx != NULL) in ssl_hmac_final() [all …]
|
A D | ssl_mcnf.c | 23 static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name, int system) in ssl_do_config() argument 35 if (s == NULL && ctx == NULL) { in ssl_do_config() 61 libctx = s->ctx->libctx; in ssl_do_config() 63 meth = ctx->method; in ssl_do_config() 64 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in ssl_do_config() 65 libctx = ctx->libctx; in ssl_do_config() 99 int SSL_CTX_config(SSL_CTX *ctx, const char *name) in SSL_CTX_config() argument 101 return ssl_do_config(NULL, ctx, name, 0); in SSL_CTX_config() 104 int ssl_ctx_system_config(SSL_CTX *ctx) in ssl_ctx_system_config() argument 106 return ssl_do_config(NULL, ctx, NULL, 1); in ssl_ctx_system_config()
|
A D | s3_enc.c | 326 EVP_MD_CTX *ctx = NULL; in ssl3_final_finish_mac() local 338 ctx = EVP_MD_CTX_new(); in ssl3_final_finish_mac() 339 if (ctx == NULL) { in ssl3_final_finish_mac() 349 ret = EVP_MD_CTX_get_size(ctx); in ssl3_final_finish_mac() 370 EVP_MD_CTX_free(ctx); in ssl3_final_finish_mac() 391 EVP_MD_CTX *ctx = EVP_MD_CTX_new(); in ssl3_generate_master_secret() local 396 if (ctx == NULL) { in ssl3_generate_master_secret() 402 || EVP_DigestUpdate(ctx, salt[i], in ssl3_generate_master_secret() 404 || EVP_DigestUpdate(ctx, p, len) <= 0 in ssl3_generate_master_secret() 411 || EVP_DigestUpdate(ctx, p, len) <= 0 in ssl3_generate_master_secret() [all …]
|
A D | s3_lib.c | 4035 ctx->cert->dh_tmp_auto = larg; in ssl3_ctx_ctrl() 4094 return ctx->ext.status_type; in ssl3_ctx_ctrl() 4097 ctx->ext.status_type = larg; in ssl3_ctx_ctrl() 4101 ctx->ext.status_arg = parg; in ssl3_ctx_ctrl() 4116 ctx->srp_ctx.login = NULL; in ssl3_ctx_ctrl() 4131 if (ctx->srp_ctx.info != NULL) in ssl3_ctx_ctrl() 4144 ctx->srp_ctx.strength = larg; in ssl3_ctx_ctrl() 4177 return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 0); in ssl3_ctx_ctrl() 4183 return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 1); in ssl3_ctx_ctrl() 4226 ctx->extra_certs = NULL; in ssl3_ctx_ctrl() [all …]
|
A D | ssl_local.h | 261 # define SSL_CTX_IS_DTLS(ctx) \ argument 410 SSL *(*ssl_new) (SSL_CTX *ctx); 717 EVP_MAC_CTX *ctx; member 724 void ssl_hmac_free(SSL_HMAC *ctx); 1235 SSL_CTX *ctx; member 2625 int ssl_load_ciphers(SSL_CTX *ctx); 2627 int ssl_load_groups(SSL_CTX *ctx); 2628 int ssl_load_sigalgs(SSL_CTX *ctx); 3034 void ssl_hmac_old_free(SSL_HMAC *ctx); 3076 if (ssl_tsan_lock(ctx)) { in ssl_tsan_counter() [all …]
|
A D | ssl_rsa_legacy.c | 108 int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) in SSL_CTX_use_RSAPrivateKey() argument 133 ret = SSL_CTX_use_PrivateKey(ctx, pkey); in SSL_CTX_use_RSAPrivateKey() 138 int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type) in SSL_CTX_use_RSAPrivateKey_file() argument 165 SSL_CTX_get_default_passwd_cb(ctx), in SSL_CTX_use_RSAPrivateKey_file() 166 SSL_CTX_get_default_passwd_cb_userdata(ctx)); in SSL_CTX_use_RSAPrivateKey_file() 175 ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa); in SSL_CTX_use_RSAPrivateKey_file() 182 int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, in SSL_CTX_use_RSAPrivateKey_ASN1() argument 195 ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa); in SSL_CTX_use_RSAPrivateKey_ASN1()
|
A D | d1_srtp.c | 143 int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles) in SSL_CTX_set_tlsext_use_srtp() argument 145 if (IS_QUIC_METHOD(ctx->method)) in SSL_CTX_set_tlsext_use_srtp() 148 return ssl_ctx_make_profiles(profiles, &ctx->srtp_profiles); in SSL_CTX_set_tlsext_use_srtp() 168 } else if ((s->ctx != NULL) && (s->ctx->srtp_profiles != NULL)) { in STACK_OF() 169 return s->ctx->srtp_profiles; in STACK_OF()
|
A D | ssl_cert_comp.c | 362 int SSL_CTX_set1_cert_comp_preference(SSL_CTX *ctx, int *algs, size_t len) in SSL_CTX_set1_cert_comp_preference() argument 365 return ssl_set_cert_comp_pref(ctx->cert_comp_prefs, algs, len); in SSL_CTX_set1_cert_comp_preference() 397 int SSL_CTX_compress_certs(SSL_CTX *ctx, int alg) in SSL_CTX_compress_certs() argument 401 SSL *new = SSL_new(ctx); in SSL_CTX_compress_certs() 406 ret = ssl_compress_certs(new, ctx->cert->pkeys, alg); in SSL_CTX_compress_certs() 424 cpk = ssl->ctx->cert->key; in SSL_get1_compressed_cert() 432 size_t SSL_CTX_get1_compressed_cert(SSL_CTX *ctx, int alg, unsigned char **data, size_t *orig_len) in SSL_CTX_get1_compressed_cert() argument 436 SSL *new = SSL_new(ctx); in SSL_CTX_get1_compressed_cert() 438 ret = ssl_get_compressed_cert(new, ctx->cert->key, alg, data, orig_len); in SSL_CTX_get1_compressed_cert() 446 int SSL_CTX_set1_compressed_cert(SSL_CTX *ctx, int algorithm, unsigned char *comp_data, in SSL_CTX_set1_compressed_cert() argument [all …]
|
A D | bio_ssl.c | 445 BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx) in BIO_new_buffer_ssl_connect() argument 451 if (ctx != NULL && IS_QUIC_CTX(ctx)) in BIO_new_buffer_ssl_connect() 453 return BIO_new_ssl_connect(ctx); in BIO_new_buffer_ssl_connect() 458 if ((ssl = BIO_new_ssl_connect(ctx)) == NULL) in BIO_new_buffer_ssl_connect() 470 BIO *BIO_new_ssl_connect(SSL_CTX *ctx) in BIO_new_ssl_connect() argument 479 if (ctx != NULL && IS_QUIC_CTX(ctx)) in BIO_new_ssl_connect() 484 if ((ssl = BIO_new_ssl(ctx, 1)) == NULL) in BIO_new_ssl_connect() 496 BIO *BIO_new_ssl(SSL_CTX *ctx, int client) in BIO_new_ssl() argument 503 if ((ssl = SSL_new(ctx)) == NULL) { in BIO_new_ssl()
|
A D | tls13_enc.c | 858 EVP_MD_CTX *ctx = EVP_MD_CTX_new(); in tls13_export_keying_material() local 868 if (EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material() 870 || EVP_DigestFinal_ex(ctx, hash, &hashsize) <= 0 in tls13_export_keying_material() 871 || EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material() 872 || EVP_DigestFinal_ex(ctx, data, &datalen) <= 0 in tls13_export_keying_material() 883 EVP_MD_CTX_free(ctx); in tls13_export_keying_material() 898 EVP_MD_CTX *ctx = EVP_MD_CTX_new(); in tls13_export_keying_material_early() local 930 || EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material_early() 933 || EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material_early() 934 || EVP_DigestFinal_ex(ctx, data, &datalen) <= 0 in tls13_export_keying_material_early() [all …]
|
A D | d1_msg.c | 71 else if (ssl->ctx->info_callback != NULL) in dtls1_dispatch_alert() 72 cb = ssl->ctx->info_callback; in dtls1_dispatch_alert()
|
/ssl/record/methods/ |
A D | ssl3_cbc.c | 64 static void tls1_md5_final_raw(void *ctx, unsigned char *md_out) in tls1_md5_final_raw() argument 66 MD5_CTX *md5 = ctx; in tls1_md5_final_raw() 75 static void tls1_sha1_final_raw(void *ctx, unsigned char *md_out) in tls1_sha1_final_raw() argument 77 SHA_CTX *sha1 = ctx; in tls1_sha1_final_raw() 86 static void tls1_sha256_final_raw(void *ctx, unsigned char *md_out) in tls1_sha256_final_raw() argument 88 SHA256_CTX *sha256 = ctx; in tls1_sha256_final_raw() 95 static void tls1_sha512_final_raw(void *ctx, unsigned char *md_out) in tls1_sha512_final_raw() argument 97 SHA512_CTX *sha512 = ctx; in tls1_sha512_final_raw() 140 void (*md_final_raw) (void *ctx, unsigned char *md_out); in ssl3_cbc_digest_record() 141 void (*md_transform) (void *ctx, const unsigned char *block); in ssl3_cbc_digest_record() [all …]
|
/ssl/statem/ |
A D | extensions_cust.c | 429 exts = &ctx->cert->custext; in ossl_tls_add_custom_ext_intern() 439 && ctx != NULL in ossl_tls_add_custom_ext_intern() 440 && SSL_CTX_ct_is_enabled(ctx)) in ossl_tls_add_custom_ext_intern() 472 meth->ext_flags = (ctx == NULL) ? SSL_EXT_FLAG_CONN : 0; in ossl_tls_add_custom_ext_intern() 479 static int add_old_custom_ext(SSL_CTX *ctx, ENDPOINT role, in add_old_custom_ext() argument 505 ret = ossl_tls_add_custom_ext_intern(ctx, NULL, role, ext_type, in add_old_custom_ext() 522 int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type, in SSL_CTX_add_client_custom_ext() argument 528 return add_old_custom_ext(ctx, ENDPOINT_CLIENT, ext_type, in SSL_CTX_add_client_custom_ext() 536 int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, unsigned int ext_type, in SSL_CTX_add_server_custom_ext() argument 542 return add_old_custom_ext(ctx, ENDPOINT_SERVER, ext_type, in SSL_CTX_add_server_custom_ext() [all …]
|