Add SSL_SESSION_is_resumable() implementation shim
This commit adds SSL_SESSION_is_resumable() implementation if it is
missing.
(cherry picked from commit 35338b4105)
This commit is contained in:
@@ -663,6 +663,7 @@ AC_CHECK_FUNCS([SSL_CTX_set_min_proto_version])
|
||||
AC_CHECK_FUNCS([SSL_CTX_up_ref])
|
||||
AC_CHECK_FUNCS([SSL_read_ex SSL_peek_ex SSL_write_ex])
|
||||
AC_CHECK_FUNCS([SSL_CTX_set1_cert_store X509_STORE_up_ref])
|
||||
AC_CHECK_FUNCS([SSL_SESSION_is_resumable])
|
||||
|
||||
#
|
||||
# Check for algorithm support in OpenSSL
|
||||
|
||||
@@ -196,3 +196,11 @@ SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store) {
|
||||
}
|
||||
|
||||
#endif /* !HAVE_SSL_CTX_SET1_CERT_STORE */
|
||||
|
||||
#if !HAVE_SSL_SESSION_IS_RESUMABLE
|
||||
int
|
||||
SSL_SESSION_is_resumable(const SSL_SESSION *sess) {
|
||||
return (!sess->not_resumable &&
|
||||
(sess->session_id_length > 0 || sess->tlsext_ticklen > 0));
|
||||
}
|
||||
#endif /* HAVE_SSL_SESSION_IS_RESUMABLE */
|
||||
|
||||
@@ -135,3 +135,8 @@ X509_STORE_up_ref(X509_STORE *v);
|
||||
void
|
||||
SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store);
|
||||
#endif /* !HAVE_SSL_CTX_SET1_CERT_STORE */
|
||||
|
||||
#if !HAVE_SSL_SESSION_IS_RESUMABLE
|
||||
int
|
||||
SSL_SESSION_is_resumable(const SSL_SESSION *s);
|
||||
#endif /* HAVE_SSL_SESSION_IS_RESUMABLE */
|
||||
|
||||
Reference in New Issue
Block a user