Lines Matching refs:ret
134 int ret; in i2d_SSL_SESSION() local
220 ret = i2d_SSL_SESSION_ASN1(&as, pp); in i2d_SSL_SESSION()
222 return ret; in i2d_SSL_SESSION()
270 SSL_SESSION *ret = NULL; in d2i_SSL_SESSION_ex() local
278 ret = SSL_SESSION_new(); in d2i_SSL_SESSION_ex()
279 if (ret == NULL) in d2i_SSL_SESSION_ex()
282 ret = *a; in d2i_SSL_SESSION_ex()
297 ret->ssl_version = (int)as->ssl_version; in d2i_SSL_SESSION_ex()
299 ret->kex_group = as->kex_group; in d2i_SSL_SESSION_ex()
309 ret->cipher_id = id; in d2i_SSL_SESSION_ex()
310 ret->cipher = ssl3_get_cipher_by_id(id); in d2i_SSL_SESSION_ex()
311 if (ret->cipher == NULL) in d2i_SSL_SESSION_ex()
314 if (!ssl_session_memcpy(ret->session_id, &ret->session_id_length, in d2i_SSL_SESSION_ex()
318 if (!ssl_session_memcpy(ret->master_key, &tmpl, in d2i_SSL_SESSION_ex()
322 ret->master_key_length = tmpl; in d2i_SSL_SESSION_ex()
325 ret->time = ossl_time_from_time_t(as->time); in d2i_SSL_SESSION_ex()
327 ret->time = ossl_time_now(); in d2i_SSL_SESSION_ex()
330 ret->timeout = ossl_seconds2time(as->timeout); in d2i_SSL_SESSION_ex()
332 ret->timeout = ossl_seconds2time(3); in d2i_SSL_SESSION_ex()
333 ssl_session_calculate_timeout(ret); in d2i_SSL_SESSION_ex()
335 X509_free(ret->peer); in d2i_SSL_SESSION_ex()
336 ret->peer = as->peer; in d2i_SSL_SESSION_ex()
339 EVP_PKEY_free(ret->peer_rpk); in d2i_SSL_SESSION_ex()
340 ret->peer_rpk = NULL; in d2i_SSL_SESSION_ex()
347 ret->peer_rpk = d2i_PUBKEY_ex(NULL, &data, as->peer_rpk->length, libctx, propq); in d2i_SSL_SESSION_ex()
348 if (ret->peer_rpk == NULL) in d2i_SSL_SESSION_ex()
352 if (!ssl_session_memcpy(ret->sid_ctx, &ret->sid_ctx_length, in d2i_SSL_SESSION_ex()
357 ret->verify_result = as->verify_result; in d2i_SSL_SESSION_ex()
359 if (!ssl_session_strndup(&ret->ext.hostname, as->tlsext_hostname)) in d2i_SSL_SESSION_ex()
363 if (!ssl_session_strndup(&ret->psk_identity_hint, as->psk_identity_hint)) in d2i_SSL_SESSION_ex()
365 if (!ssl_session_strndup(&ret->psk_identity, as->psk_identity)) in d2i_SSL_SESSION_ex()
369 ret->ext.tick_lifetime_hint = (unsigned long)as->tlsext_tick_lifetime_hint; in d2i_SSL_SESSION_ex()
370 ret->ext.tick_age_add = as->tlsext_tick_age_add; in d2i_SSL_SESSION_ex()
371 OPENSSL_free(ret->ext.tick); in d2i_SSL_SESSION_ex()
373 ret->ext.tick = as->tlsext_tick->data; in d2i_SSL_SESSION_ex()
374 ret->ext.ticklen = as->tlsext_tick->length; in d2i_SSL_SESSION_ex()
377 ret->ext.tick = NULL; in d2i_SSL_SESSION_ex()
385 ret->compress_meth = as->comp_id->data[0]; in d2i_SSL_SESSION_ex()
387 ret->compress_meth = 0; in d2i_SSL_SESSION_ex()
392 if (!ssl_session_strndup(&ret->srp_username, as->srp_username)) in d2i_SSL_SESSION_ex()
396 ret->flags = (int32_t)as->flags; in d2i_SSL_SESSION_ex()
397 ret->ext.max_early_data = as->max_early_data; in d2i_SSL_SESSION_ex()
399 OPENSSL_free(ret->ext.alpn_selected); in d2i_SSL_SESSION_ex()
401 ret->ext.alpn_selected = as->alpn_selected->data; in d2i_SSL_SESSION_ex()
402 ret->ext.alpn_selected_len = as->alpn_selected->length; in d2i_SSL_SESSION_ex()
405 ret->ext.alpn_selected = NULL; in d2i_SSL_SESSION_ex()
406 ret->ext.alpn_selected_len = 0; in d2i_SSL_SESSION_ex()
409 ret->ext.max_fragment_len_mode = as->tlsext_max_fragment_len_mode; in d2i_SSL_SESSION_ex()
411 OPENSSL_free(ret->ticket_appdata); in d2i_SSL_SESSION_ex()
413 ret->ticket_appdata = as->ticket_appdata->data; in d2i_SSL_SESSION_ex()
414 ret->ticket_appdata_len = as->ticket_appdata->length; in d2i_SSL_SESSION_ex()
417 ret->ticket_appdata = NULL; in d2i_SSL_SESSION_ex()
418 ret->ticket_appdata_len = 0; in d2i_SSL_SESSION_ex()
424 *a = ret; in d2i_SSL_SESSION_ex()
426 return ret; in d2i_SSL_SESSION_ex()
430 if ((a == NULL) || (*a != ret)) in d2i_SSL_SESSION_ex()
431 SSL_SESSION_free(ret); in d2i_SSL_SESSION_ex()