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-02-28 07:16:26 -0500
commit29d3851ef58419274f5f80a050d22b14319eff74 (patch)
treec70cbddb9c2100abb5e0e5fdd5acaf180b89b946 /openssl/ssl/s2_enc.c
parenta1babdda61e8cb3f8d0608d87120ba46ca91a21d (diff)
downloadvcxsrv-29d3851ef58419274f5f80a050d22b14319eff74.tar.gz
vcxsrv-29d3851ef58419274f5f80a050d22b14319eff74.tar.bz2
vcxsrv-29d3851ef58419274f5f80a050d22b14319eff74.zip
Update openssl to version openssl-1.0.1k
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)