aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/s2_enc.c
diff options
context:
space:
mode:
authorMike DePaulo <mikedep333@gmail.com>2015-01-10 12:26:41 -0500
committerMike DePaulo <mikedep333@gmail.com>2015-01-10 15:20:57 -0500
commitee914bf036b78dcbde9bf694794c15482d721028 (patch)
tree13793fdc02dbf47bd4dd5e93861bccac71d58887 /openssl/ssl/s2_enc.c
parentfaa5026e540d03f858265b2796054d685f687383 (diff)
downloadvcxsrv-ee914bf036b78dcbde9bf694794c15482d721028.tar.gz
vcxsrv-ee914bf036b78dcbde9bf694794c15482d721028.tar.bz2
vcxsrv-ee914bf036b78dcbde9bf694794c15482d721028.zip
Update openssl to version openssl-1.0.1k
Conflicts: openssl/Makefile
Diffstat (limited to 'openssl/ssl/s2_enc.c')
-rw-r--r--openssl/ssl/s2_enc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/openssl/ssl/s2_enc.c b/openssl/ssl/s2_enc.c
index ff3395f45..a35968f63 100644
--- a/openssl/ssl/s2_enc.c
+++ b/openssl/ssl/s2_enc.c
@@ -117,8 +117,9 @@ err:
/* read/writes from s->s2->mac_data using length for encrypt and
* decrypt. It sets s->s2->padding and s->[rw]length
- * if we are encrypting */
-void ssl2_enc(SSL *s, int send)
+ * if we are encrypting
+ * Returns 0 on error and 1 on success */
+int ssl2_enc(SSL *s, int send)
{
EVP_CIPHER_CTX *ds;
unsigned long l;
@@ -136,7 +137,7 @@ void ssl2_enc(SSL *s, int send)
}
/* check for NULL cipher */
- if (ds == NULL) return;
+ if (ds == NULL) return 1;
bs=ds->cipher->block_size;
@@ -145,7 +146,10 @@ void ssl2_enc(SSL *s, int send)
if (bs == 8)
l=(l+7)/8*8;
- EVP_Cipher(ds,s->s2->mac_data,s->s2->mac_data,l);
+ if(EVP_Cipher(ds,s->s2->mac_data,s->s2->mac_data,l) < 1)
+ return 0;
+
+ return 1;
}
void ssl2_mac(SSL *s, unsigned char *md, int send)