diff options
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/e_aes_cbc_hmac_sha256.c | 6 | ||||
-rw-r--r-- | crypto/evp/e_des3.c | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/crypto/evp/e_aes_cbc_hmac_sha256.c b/crypto/evp/e_aes_cbc_hmac_sha256.c index e3156039c6..6c8c958194 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha256.c +++ b/crypto/evp/e_aes_cbc_hmac_sha256.c @@ -208,10 +208,12 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA256 *key, u64 seqnum; #endif - if (RAND_bytes((IVs=blocks[0].c),16*x4)<=0) /* ask for IVs in bulk */ + /* ask for IVs in bulk */ + if (RAND_bytes((IVs=blocks[0].c),16*x4)<=0) return 0; - ctx = (SHA256_MB_CTX *)(storage+32-((size_t)storage%32)); /* align */ + /* align */ + ctx = (SHA256_MB_CTX *)(storage+32-((size_t)storage%32)); frag = (unsigned int)inp_len>>(1+n4x); last = (unsigned int)inp_len+frag-(frag<<(1+n4x)); diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c index 11d290e450..8d405a711d 100644 --- a/crypto/evp/e_des3.c +++ b/crypto/evp/e_des3.c @@ -208,8 +208,8 @@ static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, DES_ede3_cfb_encrypt(c,d,1,1, &data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3, (DES_cblock *)ctx->iv,ctx->encrypt); - out[n/8]=(out[n/8]&~(0x80 >> (unsigned int)(n%8))) | - ((d[0]&0x80) >> (unsigned int)(n%8)); + out[n/8]=(out[n/8]&~(0x80 >> (unsigned int)(n%8))) + | ((d[0]&0x80) >> (unsigned int)(n%8)); } return 1; |