diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2009-01-05 21:36:40 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2009-01-05 21:36:40 +0000 |
commit | e3e8dff41f7ab5012303998d65d07ce01ada07e2 (patch) | |
tree | c6cef98b54fd1efd88b1c72165b5f7c8f71b2c3b /lib/libssl/s3_pkt.c | |
parent | f751973bbcd73eee61aa30d9dd8eee9e79df852c (diff) |
update to openssl-0.9.8i; tested by several, especially krw@
Diffstat (limited to 'lib/libssl/s3_pkt.c')
-rw-r--r-- | lib/libssl/s3_pkt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libssl/s3_pkt.c b/lib/libssl/s3_pkt.c index 44c7c143fe7..72853a2e728 100644 --- a/lib/libssl/s3_pkt.c +++ b/lib/libssl/s3_pkt.c @@ -1225,6 +1225,13 @@ int ssl3_do_change_cipher_spec(SSL *s) if (s->s3->tmp.key_block == NULL) { + if (s->session == NULL) + { + /* might happen if dtls1_read_bytes() calls this */ + SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY); + return (0); + } + s->session->cipher=s->s3->tmp.new_cipher; if (!s->method->ssl3_enc->setup_key_block(s)) return(0); } |