aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/ssl/s2_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/ssl/s2_enc.c')
-rw-r--r--crypto/openssl/ssl/s2_enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/s2_enc.c b/crypto/openssl/ssl/s2_enc.c
index fa2ab8dc4be7..8e5975cdc82f 100644
--- a/crypto/openssl/ssl/s2_enc.c
+++ b/crypto/openssl/ssl/s2_enc.c
@@ -96,7 +96,8 @@ int ssl2_enc_init(SSL *s, int client)
num=c->key_len;
s->s2->key_material_length=num*2;
- ssl2_generate_key_material(s);
+ if (ssl2_generate_key_material(s) <= 0)
+ return 0;
EVP_EncryptInit(ws,c,&(s->s2->key_material[(client)?num:0]),
s->session->key_arg);