Lines Matching refs:TLScontext
845 TLS_SESS_STATE *TLScontext = SSL_get_ex_data(ssl, TLScontext_index); in server_sni_callback() local
856 TLScontext->namaddr, sni); in server_sni_callback()
873 if (TLScontext->peer_sni) { in server_sni_callback()
874 if (strcmp(sni, TLScontext->peer_sni) == 0) in server_sni_callback()
877 TLScontext->namaddr, TLScontext->peer_sni, sni); in server_sni_callback()
895 sni, TLScontext->namaddr); in server_sni_callback()
911 TLScontext->peer_sni = mystrdup(sni); in server_sni_callback()
917 const char *tls_set_ciphers(TLS_SESS_STATE *TLScontext, const char *grade, in tls_set_ciphers() argument
933 TLScontext->namaddr, grade); in tls_set_ciphers()
968 TLScontext->namaddr, tok); in tls_set_ciphers()
976 if (SSL_set_cipher_list(TLScontext->con, vstring_str(buf)) == 0) { in tls_set_ciphers()
978 TLScontext->namaddr, grade); in tls_set_ciphers()
1019 void tls_get_signature_params(TLS_SESS_STATE *TLScontext) in tls_get_signature_params() argument
1030 SSL *ssl = TLScontext->con; in tls_get_signature_params()
1051 TLScontext->kex_bits = EVP_PKEY_bits(dh_pkey); in tls_get_signature_params()
1092 SIG_PROP(TLScontext, srvr, bits) = EVP_PKEY_bits(local_pkey); in tls_get_signature_params()
1130 SIG_PROP(TLScontext, !srvr, bits) = EVP_PKEY_bits(peer_pkey); in tls_get_signature_params()
1152 TLScontext->kex_name = mystrdup(kex_name); in tls_get_signature_params()
1153 TLScontext->kex_curve = kex_curve; in tls_get_signature_params()
1156 SIG_PROP(TLScontext, srvr, name) = mystrdup(locl_sig_name); in tls_get_signature_params()
1157 SIG_PROP(TLScontext, srvr, curve) = locl_sig_curve; in tls_get_signature_params()
1159 SIG_PROP(TLScontext, srvr, dgst) = mystrdup(locl_sig_dgst); in tls_get_signature_params()
1162 SIG_PROP(TLScontext, !srvr, name) = mystrdup(peer_sig_name); in tls_get_signature_params()
1163 SIG_PROP(TLScontext, !srvr, curve) = peer_sig_curve; in tls_get_signature_params()
1165 SIG_PROP(TLScontext, !srvr, dgst) = mystrdup(peer_sig_dgst); in tls_get_signature_params()
1268 TLS_SESS_STATE *TLScontext; in tls_alloc_sess_context() local
1279 TLScontext = (TLS_SESS_STATE *) mymalloc(sizeof(TLS_SESS_STATE)); in tls_alloc_sess_context()
1280 memset((void *) TLScontext, 0, sizeof(*TLScontext)); in tls_alloc_sess_context()
1281 TLScontext->con = 0; in tls_alloc_sess_context()
1282 TLScontext->cache_type = 0; in tls_alloc_sess_context()
1283 TLScontext->serverid = 0; in tls_alloc_sess_context()
1284 TLScontext->peer_CN = 0; in tls_alloc_sess_context()
1285 TLScontext->issuer_CN = 0; in tls_alloc_sess_context()
1286 TLScontext->peer_sni = 0; in tls_alloc_sess_context()
1287 TLScontext->peer_cert_fprint = 0; in tls_alloc_sess_context()
1288 TLScontext->peer_pkey_fprint = 0; in tls_alloc_sess_context()
1289 TLScontext->protocol = 0; in tls_alloc_sess_context()
1290 TLScontext->cipher_name = 0; in tls_alloc_sess_context()
1291 TLScontext->kex_name = 0; in tls_alloc_sess_context()
1292 TLScontext->kex_curve = 0; in tls_alloc_sess_context()
1293 TLScontext->clnt_sig_name = 0; in tls_alloc_sess_context()
1294 TLScontext->clnt_sig_curve = 0; in tls_alloc_sess_context()
1295 TLScontext->clnt_sig_dgst = 0; in tls_alloc_sess_context()
1296 TLScontext->srvr_sig_name = 0; in tls_alloc_sess_context()
1297 TLScontext->srvr_sig_curve = 0; in tls_alloc_sess_context()
1298 TLScontext->srvr_sig_dgst = 0; in tls_alloc_sess_context()
1299 TLScontext->log_mask = log_mask; in tls_alloc_sess_context()
1300 TLScontext->namaddr = lowercase(mystrdup(namaddr)); in tls_alloc_sess_context()
1301 TLScontext->mdalg = 0; /* Alias for props->mdalg */ in tls_alloc_sess_context()
1302 TLScontext->dane = 0; /* Alias for props->dane */ in tls_alloc_sess_context()
1303 TLScontext->errordepth = -1; in tls_alloc_sess_context()
1304 TLScontext->errorcode = X509_V_OK; in tls_alloc_sess_context()
1305 TLScontext->errorcert = 0; in tls_alloc_sess_context()
1307 return (TLScontext); in tls_alloc_sess_context()
1312 void tls_free_context(TLS_SESS_STATE *TLScontext) in tls_free_context() argument
1320 if (TLScontext->con != 0) in tls_free_context()
1321 SSL_free(TLScontext->con); in tls_free_context()
1323 if (TLScontext->namaddr) in tls_free_context()
1324 myfree(TLScontext->namaddr); in tls_free_context()
1325 if (TLScontext->serverid) in tls_free_context()
1326 myfree(TLScontext->serverid); in tls_free_context()
1328 if (TLScontext->peer_CN) in tls_free_context()
1329 myfree(TLScontext->peer_CN); in tls_free_context()
1330 if (TLScontext->issuer_CN) in tls_free_context()
1331 myfree(TLScontext->issuer_CN); in tls_free_context()
1332 if (TLScontext->peer_sni) in tls_free_context()
1333 myfree(TLScontext->peer_sni); in tls_free_context()
1334 if (TLScontext->peer_cert_fprint) in tls_free_context()
1335 myfree(TLScontext->peer_cert_fprint); in tls_free_context()
1336 if (TLScontext->peer_pkey_fprint) in tls_free_context()
1337 myfree(TLScontext->peer_pkey_fprint); in tls_free_context()
1338 if (TLScontext->kex_name) in tls_free_context()
1339 myfree((void *) TLScontext->kex_name); in tls_free_context()
1340 if (TLScontext->kex_curve) in tls_free_context()
1341 myfree((void *) TLScontext->kex_curve); in tls_free_context()
1342 if (TLScontext->clnt_sig_name) in tls_free_context()
1343 myfree((void *) TLScontext->clnt_sig_name); in tls_free_context()
1344 if (TLScontext->clnt_sig_curve) in tls_free_context()
1345 myfree((void *) TLScontext->clnt_sig_curve); in tls_free_context()
1346 if (TLScontext->clnt_sig_dgst) in tls_free_context()
1347 myfree((void *) TLScontext->clnt_sig_dgst); in tls_free_context()
1348 if (TLScontext->srvr_sig_name) in tls_free_context()
1349 myfree((void *) TLScontext->srvr_sig_name); in tls_free_context()
1350 if (TLScontext->srvr_sig_curve) in tls_free_context()
1351 myfree((void *) TLScontext->srvr_sig_curve); in tls_free_context()
1352 if (TLScontext->srvr_sig_dgst) in tls_free_context()
1353 myfree((void *) TLScontext->srvr_sig_dgst); in tls_free_context()
1354 if (TLScontext->errorcert) in tls_free_context()
1355 X509_free(TLScontext->errorcert); in tls_free_context()
1357 myfree((void *) TLScontext); in tls_free_context()