Lines Matching defs:kssl_entry
107 kssl_free_entry(kssl_entry_t *kssl_entry)
114 if (kssl_entry->ke_no_freeall) {
115 kmem_free(kssl_entry, sizeof (kssl_entry_t));
119 if ((cert = kssl_entry->ke_server_certificate) != NULL) {
123 if ((privkey = kssl_entry->ke_private_key) != NULL) {
127 for (i = 0; i < kssl_entry->sid_cache_nentries; i++)
128 mutex_destroy(&(kssl_entry->sid_cache[i].se_lock));
130 kmem_free(kssl_entry->sid_cache,
131 kssl_entry->sid_cache_nentries * sizeof (kssl_sid_ent_t));
133 ASSERT(kssl_entry->ke_proxy_head == NULL);
134 ASSERT(kssl_entry->ke_fallback_head == NULL);
136 if ((s = kssl_entry->ke_sessinfo) != NULL) {
137 ASSERT(kssl_entry->ke_is_nxkey);
141 kmem_free(kssl_entry, sizeof (kssl_entry_t));
359 create_sessinfo(kssl_params_t *kssl_params, kssl_entry_t *kssl_entry)
377 ASSERT(kssl_entry->ke_sessinfo == NULL);
378 kssl_entry->ke_sessinfo = s;
381 rv = kssl_get_obj_handle(kssl_entry);
385 kssl_entry->ke_sessinfo = NULL;
389 kssl_entry->ke_sessinfo->is_valid_handle = B_TRUE;
390 kssl_entry->ke_sessinfo->do_reauth = B_FALSE;
391 kssl_entry->ke_sessinfo->evnt_handle =
405 kssl_entry_t *kssl_entry, *ep;
411 kssl_entry = kmem_zalloc(sizeof (kssl_entry_t), KM_SLEEP);
413 kssl_entry->ke_laddr = kssl_params->kssl_addr.sin6_addr;
414 kssl_entry->ke_ssl_port = kssl_params->kssl_addr.sin6_port;
415 kssl_entry->ke_proxy_port = kssl_params->kssl_proxy_port;
417 kssl_entry->sid_cache_timeout = DEFAULT_SID_TIMEOUT;
419 kssl_entry->sid_cache_timeout =
422 kssl_entry->sid_cache_nentries = DEFAULT_SID_CACHE_NENTRIES;
424 kssl_entry->sid_cache_nentries =
426 kssl_entry->ke_private_key = privkey;
427 kssl_entry->ke_server_certificate = cert;
429 kssl_entry->ke_is_nxkey = kssl_params->kssl_is_nxkey;
430 if (kssl_entry->ke_is_nxkey) {
431 if (create_sessinfo(kssl_params, kssl_entry) != 0) {
432 kmem_free(kssl_entry, sizeof (kssl_entry_t));
466 ep = kssl_entry;
508 kssl_entry->kssl_cipherSuites[cnt++] = SSL_RSA_WITH_NULL_SHA;
509 kssl_entry->kssl_cipherSuites_nentries = cnt;
511 kssl_entry->kssl_saved_Suites[i] =
512 kssl_entry->kssl_cipherSuites[i];
514 kssl_entry->sid_cache = kmem_alloc(
515 kssl_entry->sid_cache_nentries * sizeof (kssl_sid_ent_t), KM_SLEEP);
517 for (i = 0; i < kssl_entry->sid_cache_nentries; i++) {
518 mutex_init(&(kssl_entry->sid_cache[i].se_lock), NULL,
520 kssl_entry->sid_cache[i].se_used = 0;
521 kssl_entry->sid_cache[i].se_sid.cached = B_FALSE;
524 KSSL_ENTRY_REFHOLD(kssl_entry);
526 return (kssl_entry);
535 kssl_entry_t *kssl_entry;
547 kssl_entry = create_kssl_entry(kssl_params, cert, privkey);
548 if (kssl_entry == NULL) {
587 kssl_free_entry(kssl_entry);
641 kssl_free_entry(kssl_entry);
652 kssl_entry_tab[index] = kssl_entry;