X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fe_aes_cbc_hmac_sha1.c;h=09d24dc3d02a02435ff5e61bd8d786c16cda5cfa;hp=ac564a20f8395a2b932af336aa09df3345bcd2cf;hb=16cfc2c90d9e7776965db07c1f31bbec2f6c41e3;hpb=7caf122e717e79afcb986fe217e77a630b67bf4c;ds=sidebyside diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c index ac564a20f8..09d24dc3d0 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -17,11 +17,9 @@ #include #include #include -#include #include "modes_lcl.h" #include "internal/evp_int.h" #include "internal/constant_time_locl.h" -#include "evp_locl.h" typedef struct { AES_KEY ks; @@ -156,8 +154,7 @@ void aesni_multi_cbc_encrypt(CIPH_DESC *, void *, int); static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA1 *key, unsigned char *out, const unsigned char *inp, - size_t inp_len, int n4x, - RAND_DRBG *drbg) + size_t inp_len, int n4x) { /* n4x is 1 or 2 */ HASH_DESC hash_d[8], edges[8]; CIPH_DESC ciph_d[8]; @@ -177,13 +174,8 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA1 *key, # endif /* ask for IVs in bulk */ - IVs = blocks[0].c; - if (drbg != NULL) { - if (RAND_DRBG_bytes(drbg, IVs, 16 * x4) == 0) - return 0; - } else if (RAND_bytes(IVs, 16 * x4) <= 0) { + if (RAND_bytes((IVs = blocks[0].c), 16 * x4) <= 0) return 0; - } ctx = (SHA1_MB_CTX *) (storage + 32 - ((size_t)storage % 32)); /* align */ @@ -901,8 +893,7 @@ static int aesni_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, return (int)tls1_1_multi_block_encrypt(key, param->out, param->inp, param->len, - param->interleave / 4, - ctx->drbg); + param->interleave / 4); } case EVP_CTRL_TLS1_1_MULTIBLOCK_DECRYPT: # endif