-/* $OpenBSD: ssl.h,v 1.141 2018/02/20 18:07:11 tb Exp $ */
+/* $OpenBSD: ssl.h,v 1.142 2018/02/22 17:25:18 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
const unsigned char *sid_ctx, unsigned int sid_ctx_len);
SSL_SESSION *SSL_SESSION_new(void);
+void SSL_SESSION_free(SSL_SESSION *ses);
+int SSL_SESSION_up_ref(SSL_SESSION *ss);
const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
unsigned int *len);
unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
-void SSL_SESSION_free(SSL_SESSION *ses);
int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
int SSL_set_session(SSL *to, SSL_SESSION *session);
int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c);
-/* $OpenBSD: ssl_sess.c,v 1.73 2018/02/20 18:07:11 tb Exp $ */
+/* $OpenBSD: ssl_sess.c,v 1.74 2018/02/22 17:25:18 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
freezero(ss, sizeof(*ss));
}
+int
+SSL_SESSION_up_ref(SSL_SESSION *ss)
+{
+ int refs = CRYPTO_add(&ss->references, 1, CRYPTO_LOCK_SSL_SESSION);
+ return (refs > 1) ? 1 : 0;
+}
+
int
SSL_set_session(SSL *s, SSL_SESSION *session)
{