Lines Matching refs:src
135 static SSL_SESSION *ssl_session_dup_intern(const SSL_SESSION *src, int ticket) in ssl_session_dup_intern() argument
147 memcpy(dest, src, offsetof(SSL_SESSION, prev)); in ssl_session_dup_intern()
184 if (src->peer != NULL) { in ssl_session_dup_intern()
185 if (!X509_up_ref(src->peer)) { in ssl_session_dup_intern()
189 dest->peer = src->peer; in ssl_session_dup_intern()
192 if (src->peer_chain != NULL) { in ssl_session_dup_intern()
193 dest->peer_chain = X509_chain_up_ref(src->peer_chain); in ssl_session_dup_intern()
200 if (src->peer_rpk != NULL) { in ssl_session_dup_intern()
201 if (!EVP_PKEY_up_ref(src->peer_rpk)) in ssl_session_dup_intern()
203 dest->peer_rpk = src->peer_rpk; in ssl_session_dup_intern()
207 if (src->psk_identity_hint) { in ssl_session_dup_intern()
208 dest->psk_identity_hint = OPENSSL_strdup(src->psk_identity_hint); in ssl_session_dup_intern()
212 if (src->psk_identity) { in ssl_session_dup_intern()
213 dest->psk_identity = OPENSSL_strdup(src->psk_identity); in ssl_session_dup_intern()
220 &dest->ex_data, &src->ex_data)) { in ssl_session_dup_intern()
225 if (src->ext.hostname) { in ssl_session_dup_intern()
226 dest->ext.hostname = OPENSSL_strdup(src->ext.hostname); in ssl_session_dup_intern()
231 if (ticket != 0 && src->ext.tick != NULL) { in ssl_session_dup_intern()
233 OPENSSL_memdup(src->ext.tick, src->ext.ticklen); in ssl_session_dup_intern()
241 if (src->ext.alpn_selected != NULL) { in ssl_session_dup_intern()
242 dest->ext.alpn_selected = OPENSSL_memdup(src->ext.alpn_selected, in ssl_session_dup_intern()
243 src->ext.alpn_selected_len); in ssl_session_dup_intern()
249 if (src->srp_username) { in ssl_session_dup_intern()
250 dest->srp_username = OPENSSL_strdup(src->srp_username); in ssl_session_dup_intern()
256 if (src->ticket_appdata != NULL) { in ssl_session_dup_intern()
258 OPENSSL_memdup(src->ticket_appdata, src->ticket_appdata_len); in ssl_session_dup_intern()
269 SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src) in SSL_SESSION_dup() argument
271 return ssl_session_dup_intern(src, 1); in SSL_SESSION_dup()
280 SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) in ssl_session_dup() argument
282 SSL_SESSION *sess = ssl_session_dup_intern(src, ticket); in ssl_session_dup()