diff options
author | djm <> | 2005-04-29 05:39:33 +0000 |
---|---|---|
committer | djm <> | 2005-04-29 05:39:33 +0000 |
commit | 68edd00d9258df93b1366c71ac124e0cadf7bc08 (patch) | |
tree | 3ce4ae2a9747bbc11aed1f95f9bbea92c41f8683 /src/lib/libssl/ssl_sess.c | |
parent | f396ed0f5ce0af56bfde2e75e15cf1f52924c779 (diff) | |
download | openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.gz openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.bz2 openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r-- | src/lib/libssl/ssl_sess.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index 7016c87d3b..5f12aa361c 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
@@ -65,7 +65,7 @@ static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); | |||
65 | static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s); | 65 | static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s); |
66 | static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck); | 66 | static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck); |
67 | 67 | ||
68 | SSL_SESSION *SSL_get_session(SSL *ssl) | 68 | SSL_SESSION *SSL_get_session(const SSL *ssl) |
69 | /* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */ | 69 | /* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */ |
70 | { | 70 | { |
71 | return(ssl->session); | 71 | return(ssl->session); |
@@ -98,7 +98,7 @@ int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg) | |||
98 | return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); | 98 | return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); |
99 | } | 99 | } |
100 | 100 | ||
101 | void *SSL_SESSION_get_ex_data(SSL_SESSION *s, int idx) | 101 | void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) |
102 | { | 102 | { |
103 | return(CRYPTO_get_ex_data(&s->ex_data,idx)); | 103 | return(CRYPTO_get_ex_data(&s->ex_data,idx)); |
104 | } | 104 | } |
@@ -141,7 +141,8 @@ static int def_generate_session_id(const SSL *ssl, unsigned char *id, | |||
141 | { | 141 | { |
142 | unsigned int retry = 0; | 142 | unsigned int retry = 0; |
143 | do | 143 | do |
144 | RAND_pseudo_bytes(id, *id_len); | 144 | if(RAND_pseudo_bytes(id, *id_len) <= 0) |
145 | return 0; | ||
145 | while(SSL_has_matching_session_id(ssl, id, *id_len) && | 146 | while(SSL_has_matching_session_id(ssl, id, *id_len) && |
146 | (++retry < MAX_SESS_ID_ATTEMPTS)); | 147 | (++retry < MAX_SESS_ID_ATTEMPTS)); |
147 | if(retry < MAX_SESS_ID_ATTEMPTS) | 148 | if(retry < MAX_SESS_ID_ATTEMPTS) |
@@ -609,13 +610,13 @@ long SSL_SESSION_set_timeout(SSL_SESSION *s, long t) | |||
609 | return(1); | 610 | return(1); |
610 | } | 611 | } |
611 | 612 | ||
612 | long SSL_SESSION_get_timeout(SSL_SESSION *s) | 613 | long SSL_SESSION_get_timeout(const SSL_SESSION *s) |
613 | { | 614 | { |
614 | if (s == NULL) return(0); | 615 | if (s == NULL) return(0); |
615 | return(s->timeout); | 616 | return(s->timeout); |
616 | } | 617 | } |
617 | 618 | ||
618 | long SSL_SESSION_get_time(SSL_SESSION *s) | 619 | long SSL_SESSION_get_time(const SSL_SESSION *s) |
619 | { | 620 | { |
620 | if (s == NULL) return(0); | 621 | if (s == NULL) return(0); |
621 | return(s->time); | 622 | return(s->time); |
@@ -637,7 +638,7 @@ long SSL_CTX_set_timeout(SSL_CTX *s, long t) | |||
637 | return(l); | 638 | return(l); |
638 | } | 639 | } |
639 | 640 | ||
640 | long SSL_CTX_get_timeout(SSL_CTX *s) | 641 | long SSL_CTX_get_timeout(const SSL_CTX *s) |
641 | { | 642 | { |
642 | if (s == NULL) return(0); | 643 | if (s == NULL) return(0); |
643 | return(s->session_timeout); | 644 | return(s->session_timeout); |