summaryrefslogtreecommitdiffstats
path: root/ssl/s2_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/s2_enc.c')
-rw-r--r--ssl/s2_enc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/s2_enc.c b/ssl/s2_enc.c
index 690252e3d3..d3b144f1c5 100644
--- a/ssl/s2_enc.c
+++ b/ssl/s2_enc.c
@@ -59,6 +59,7 @@
#include "ssl_locl.h"
#ifndef OPENSSL_NO_SSL2
#include <stdio.h>
+#include "cryptlib.h"
int ssl2_enc_init(SSL *s, int client)
{
@@ -95,10 +96,12 @@ int ssl2_enc_init(SSL *s, int client)
num=c->key_len;
s->s2->key_material_length=num*2;
+ OPENSSL_assert(s->s2->key_material_length <= sizeof s->s2->key_material);
if (ssl2_generate_key_material(s) <= 0)
return 0;
+ OPENSSL_assert(c->iv_len <= sizeof s->session->key_arg);
EVP_EncryptInit_ex(ws,c,NULL,&(s->s2->key_material[(client)?num:0]),
s->session->key_arg);
EVP_DecryptInit_ex(rs,c,NULL,&(s->s2->key_material[(client)?0:num]),
/a> 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205