projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add SSL_SESSION_set_max_early_data()
[openssl.git]
/
ssl
/
ssl_sess.c
diff --git
a/ssl/ssl_sess.c
b/ssl/ssl_sess.c
index 8cd4355cc6382cd2479256fc106adf5cd7ec7ad9..6292d011266258e7daca1f9b7f57ac60ce784c92 100644
(file)
--- a/
ssl/ssl_sess.c
+++ b/
ssl/ssl_sess.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 1995-201
6
The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-201
7
The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2005 Nokia. All rights reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* Copyright 2005 Nokia. All rights reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
@@
-12,6
+12,7
@@
#include <openssl/lhash.h>
#include <openssl/rand.h>
#include <openssl/engine.h>
#include <openssl/lhash.h>
#include <openssl/rand.h>
#include <openssl/engine.h>
+#include "internal/refcount.h"
#include "ssl_locl.h"
#include "statem/statem_locl.h"
#include "ssl_locl.h"
#include "statem/statem_locl.h"
@@
-93,6
+94,11
@@
SSL_SESSION *SSL_SESSION_new(void)
return ss;
}
return ss;
}
+SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *src)
+{
+ return ssl_session_dup(src, 1);
+}
+
/*
* Create a new SSL_SESSION and duplicate the contents of |src| into it. If
* ticket == 0 then no ticket information is duplicated, otherwise it is.
/*
* Create a new SSL_SESSION and duplicate the contents of |src| into it. If
* ticket == 0 then no ticket information is duplicated, otherwise it is.
@@
-486,7
+492,8
@@
int ssl_get_prev_session(SSL *s, CLIENTHELLO_MSG *hello, int *al)
goto err;
case TICKET_NONE:
case TICKET_EMPTY:
goto err;
case TICKET_NONE:
case TICKET_EMPTY:
- try_session_cache = 1;
+ if (hello->session_id_len > 0)
+ try_session_cache = 1;
break;
case TICKET_NO_DECRYPT:
case TICKET_SUCCESS:
break;
case TICKET_NO_DECRYPT:
case TICKET_SUCCESS:
@@
-922,6
+929,13
@@
uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s)
return s->ext.max_early_data;
}
return s->ext.max_early_data;
}
+int SSL_SESSION_set_max_early_data(SSL_SESSION *s, uint32_t max_early_data)
+{
+ s->ext.max_early_data = max_early_data;
+
+ return 1;
+}
+
X509 *SSL_SESSION_get0_peer(SSL_SESSION *s)
{
return s->peer;
X509 *SSL_SESSION_get0_peer(SSL_SESSION *s)
{
return s->peer;