Lines Matching refs:ret
246 SSL_SESSION *ret = NULL;
254 ret = SSL_SESSION_new();
255 if (ret == NULL)
258 ret = *a;
273 ret->ssl_version = (int)as->ssl_version;
283 ret->cipher_id = id;
284 ret->cipher = ssl3_get_cipher_by_id(id);
285 if (ret->cipher == NULL)
288 if (!ssl_session_memcpy(ret->session_id, &ret->session_id_length,
292 if (!ssl_session_memcpy(ret->master_key, &tmpl,
296 ret->master_key_length = tmpl;
299 ret->time = (long)as->time;
301 ret->time = (long)time(NULL);
304 ret->timeout = (long)as->timeout;
306 ret->timeout = 3;
308 X509_free(ret->peer);
309 ret->peer = as->peer;
312 if (!ssl_session_memcpy(ret->sid_ctx, &ret->sid_ctx_length,
317 ret->verify_result = as->verify_result;
319 if (!ssl_session_strndup(&ret->ext.hostname, as->tlsext_hostname))
323 if (!ssl_session_strndup(&ret->psk_identity_hint, as->psk_identity_hint))
325 if (!ssl_session_strndup(&ret->psk_identity, as->psk_identity))
329 ret->ext.tick_lifetime_hint = (unsigned long)as->tlsext_tick_lifetime_hint;
330 ret->ext.tick_age_add = as->tlsext_tick_age_add;
331 OPENSSL_free(ret->ext.tick);
333 ret->ext.tick = as->tlsext_tick->data;
334 ret->ext.ticklen = as->tlsext_tick->length;
337 ret->ext.tick = NULL;
345 ret->compress_meth = as->comp_id->data[0];
347 ret->compress_meth = 0;
352 if (!ssl_session_strndup(&ret->srp_username, as->srp_username))
356 ret->flags = (int32_t)as->flags;
357 ret->ext.max_early_data = as->max_early_data;
359 OPENSSL_free(ret->ext.alpn_selected);
361 ret->ext.alpn_selected = as->alpn_selected->data;
362 ret->ext.alpn_selected_len = as->alpn_selected->length;
365 ret->ext.alpn_selected = NULL;
366 ret->ext.alpn_selected_len = 0;
369 ret->ext.max_fragment_len_mode = as->tlsext_max_fragment_len_mode;
371 OPENSSL_free(ret->ticket_appdata);
373 ret->ticket_appdata = as->ticket_appdata->data;
374 ret->ticket_appdata_len = as->ticket_appdata->length;
377 ret->ticket_appdata = NULL;
378 ret->ticket_appdata_len = 0;
384 *a = ret;
386 return ret;
390 if ((a == NULL) || (*a != ret))
391 SSL_SESSION_free(ret);