projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define SEQ_NUM_SIZE
[oweals/openssl.git]
/
ssl
/
ssl_sess.c
diff --git
a/ssl/ssl_sess.c
b/ssl/ssl_sess.c
index 0f07ed58a182b7fc40c111a27d130c10be89cc1d..9273eb6c48b64ebed739a8cff12162f87d8db466 100644
(file)
--- a/
ssl/ssl_sess.c
+++ b/
ssl/ssl_sess.c
@@
-257,7
+257,7
@@
static int def_generate_session_id(const SSL *ssl, unsigned char *id,
{
unsigned int retry = 0;
do
{
unsigned int retry = 0;
do
- if (RAND_
pseudo_
bytes(id, *id_len) <= 0)
+ if (RAND_bytes(id, *id_len) <= 0)
return 0;
while (SSL_has_matching_session_id(ssl, id, *id_len) &&
(++retry < MAX_SESS_ID_ATTEMPTS)) ;
return 0;
while (SSL_has_matching_session_id(ssl, id, *id_len) &&
(++retry < MAX_SESS_ID_ATTEMPTS)) ;
@@
-510,12
+510,14
@@
int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len,
*/
if (!
(s->session_ctx->session_cache_mode &
*/
if (!
(s->session_ctx->session_cache_mode &
- SSL_SESS_CACHE_NO_INTERNAL_STORE))
+ SSL_SESS_CACHE_NO_INTERNAL_STORE))
{
/*
* The following should not return 1, otherwise, things are
* very strange
*/
/*
* The following should not return 1, otherwise, things are
* very strange
*/
- SSL_CTX_add_session(s->session_ctx, ret);
+ if(SSL_CTX_add_session(s->session_ctx, ret))
+ goto err;
+ }
}
}
}
}
@@
-858,6
+860,14
@@
unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s)
return s->tlsext_tick_lifetime_hint;
}
return s->tlsext_tick_lifetime_hint;
}
+void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick,
+ size_t *len)
+{
+ *len = s->tlsext_ticklen;
+ if(tick != NULL)
+ *tick = s->tlsext_tick;
+}
+
X509 *SSL_SESSION_get0_peer(SSL_SESSION *s)
{
return s->peer;
X509 *SSL_SESSION_get0_peer(SSL_SESSION *s)
{
return s->peer;