Lines Matching refs:dest
137 SSL_SESSION *dest; in ssl_session_dup_intern() local
139 dest = OPENSSL_malloc(sizeof(*dest)); in ssl_session_dup_intern()
140 if (dest == NULL) in ssl_session_dup_intern()
147 memcpy(dest, src, offsetof(SSL_SESSION, prev)); in ssl_session_dup_intern()
154 dest->psk_identity_hint = NULL; in ssl_session_dup_intern()
155 dest->psk_identity = NULL; in ssl_session_dup_intern()
157 dest->ext.hostname = NULL; in ssl_session_dup_intern()
158 dest->ext.tick = NULL; in ssl_session_dup_intern()
159 dest->ext.alpn_selected = NULL; in ssl_session_dup_intern()
161 dest->srp_username = NULL; in ssl_session_dup_intern()
163 dest->peer_chain = NULL; in ssl_session_dup_intern()
164 dest->peer = NULL; in ssl_session_dup_intern()
165 dest->peer_rpk = NULL; in ssl_session_dup_intern()
166 dest->ticket_appdata = NULL; in ssl_session_dup_intern()
167 memset(&dest->ex_data, 0, sizeof(dest->ex_data)); in ssl_session_dup_intern()
170 dest->prev = NULL; in ssl_session_dup_intern()
171 dest->next = NULL; in ssl_session_dup_intern()
172 dest->owner = NULL; in ssl_session_dup_intern()
174 if (!CRYPTO_NEW_REF(&dest->references, 1)) { in ssl_session_dup_intern()
175 OPENSSL_free(dest); in ssl_session_dup_intern()
179 if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, dest, &dest->ex_data)) { in ssl_session_dup_intern()
189 dest->peer = src->peer; in ssl_session_dup_intern()
193 dest->peer_chain = X509_chain_up_ref(src->peer_chain); in ssl_session_dup_intern()
194 if (dest->peer_chain == NULL) { in ssl_session_dup_intern()
203 dest->peer_rpk = src->peer_rpk; in ssl_session_dup_intern()
208 dest->psk_identity_hint = OPENSSL_strdup(src->psk_identity_hint); in ssl_session_dup_intern()
209 if (dest->psk_identity_hint == NULL) in ssl_session_dup_intern()
213 dest->psk_identity = OPENSSL_strdup(src->psk_identity); in ssl_session_dup_intern()
214 if (dest->psk_identity == NULL) in ssl_session_dup_intern()
220 &dest->ex_data, &src->ex_data)) { in ssl_session_dup_intern()
226 dest->ext.hostname = OPENSSL_strdup(src->ext.hostname); in ssl_session_dup_intern()
227 if (dest->ext.hostname == NULL) in ssl_session_dup_intern()
232 dest->ext.tick = in ssl_session_dup_intern()
234 if (dest->ext.tick == NULL) in ssl_session_dup_intern()
237 dest->ext.tick_lifetime_hint = 0; in ssl_session_dup_intern()
238 dest->ext.ticklen = 0; in ssl_session_dup_intern()
242 dest->ext.alpn_selected = OPENSSL_memdup(src->ext.alpn_selected, in ssl_session_dup_intern()
244 if (dest->ext.alpn_selected == NULL) in ssl_session_dup_intern()
250 dest->srp_username = OPENSSL_strdup(src->srp_username); in ssl_session_dup_intern()
251 if (dest->srp_username == NULL) in ssl_session_dup_intern()
257 dest->ticket_appdata = in ssl_session_dup_intern()
259 if (dest->ticket_appdata == NULL) in ssl_session_dup_intern()
263 return dest; in ssl_session_dup_intern()
265 SSL_SESSION_free(dest); in ssl_session_dup_intern()