sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-09-11 21:36:40 +00:00
parent 010ec4e74c
commit 2a511f7966
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
51 changed files with 340 additions and 268 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: evp_enc.c,v 1.52 2023/07/07 19:37:53 beck Exp $ */
/* $OpenBSD: evp_enc.c,v 1.53 2023/09/10 16:53:56 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -78,8 +78,8 @@ int
EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
const unsigned char *key, const unsigned char *iv, int enc)
{
if (cipher)
EVP_CIPHER_CTX_init(ctx);
if (cipher != NULL)
EVP_CIPHER_CTX_cleanup(ctx);
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc);
}