diff options
author | Richard Levitte <levitte@openssl.org> | 2003-09-08 20:49:37 +0400 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-09-08 20:49:37 +0400 |
commit | f61bc950c147754984d0d231e2a73213da616a17 (patch) | |
tree | 58a66737f60ec8c5b6746f8685c2d06ae1fd8d34 /ssl | |
parent | 64a014a6d269fae14b5004ec7be5bb18a910470a (diff) |
Recent changes from 0.9.7-stable.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_srvr.c | 9 | ||||
-rw-r--r-- | ssl/ssl_sess.c | 4 | ||||
-rw-r--r-- | ssl/ssltest.c | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index bb029cfa1d..37cf730d0e 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -431,10 +431,11 @@ int ssl3_accept(SSL *s) if (ret == 2) s->state = SSL3_ST_SR_CLNT_HELLO_C; else { - /* could be sent for a DH cert, even if we - * have not asked for it :-) */ - ret=ssl3_get_client_certificate(s); - if (ret <= 0) goto end; + if (s->s3->tmp.cert_request) + { + ret=ssl3_get_client_certificate(s); + if (ret <= 0) goto end; + } s->init_num=0; s->state=SSL3_ST_SR_KEY_EXCH_A; } diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index fbc30b94e6..fabcdefa6e 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -79,11 +79,11 @@ SSL_SESSION *SSL_get1_session(SSL *ssl) /* Need to lock this all up rather than just use CRYPTO_add so that * somebody doesn't free ssl->session between when we check it's * non-null and when we up the reference count. */ - CRYPTO_r_lock(CRYPTO_LOCK_SSL_SESSION); + CRYPTO_w_lock(CRYPTO_LOCK_SSL_SESSION); sess = ssl->session; if(sess) sess->references++; - CRYPTO_r_unlock(CRYPTO_LOCK_SSL_SESSION); + CRYPTO_w_unlock(CRYPTO_LOCK_SSL_SESSION); return(sess); } diff --git a/ssl/ssltest.c b/ssl/ssltest.c index 47c383200a..42289c255b 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -290,7 +290,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line) goto err; } - if (type < 0 || type > CRYPTO_NUM_LOCKS) + if (type < 0 || type >= CRYPTO_NUM_LOCKS) { errstr = "type out of bounds"; goto err; |