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 cf019c8346d1ccc6b348053271ee8d9465c1ab2d..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;
+ }
}
}
}
}