diff options
author | tb <> | 2024-02-18 15:44:10 +0000 |
---|---|---|
committer | tb <> | 2024-02-18 15:44:10 +0000 |
commit | f941ba215d7859bf6c6225e88cbbe13260428b8c (patch) | |
tree | b0632599c491a36f1093cf7c7c9f79bfda606b0a /src/lib/libcrypto/evp/bio_enc.c | |
parent | 57ee559fa828c2d7f5c21fd1bee340fec067a508 (diff) | |
download | openbsd-f941ba215d7859bf6c6225e88cbbe13260428b8c.tar.gz openbsd-f941ba215d7859bf6c6225e88cbbe13260428b8c.tar.bz2 openbsd-f941ba215d7859bf6c6225e88cbbe13260428b8c.zip |
Use EVP_CIPHER_CTX_legacy_clear() internally
ok jsing
Diffstat (limited to 'src/lib/libcrypto/evp/bio_enc.c')
-rw-r--r-- | src/lib/libcrypto/evp/bio_enc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c index d2132adb4e..dd3840074f 100644 --- a/src/lib/libcrypto/evp/bio_enc.c +++ b/src/lib/libcrypto/evp/bio_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_enc.c,v 1.29 2023/07/07 19:37:53 beck Exp $ */ | 1 | /* $OpenBSD: bio_enc.c,v 1.30 2024/02/18 15:44:10 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -115,7 +115,7 @@ enc_new(BIO *bi) | |||
115 | ctx = malloc(sizeof(BIO_ENC_CTX)); | 115 | ctx = malloc(sizeof(BIO_ENC_CTX)); |
116 | if (ctx == NULL) | 116 | if (ctx == NULL) |
117 | return (0); | 117 | return (0); |
118 | EVP_CIPHER_CTX_init(&ctx->cipher); | 118 | EVP_CIPHER_CTX_legacy_clear(&ctx->cipher); |
119 | 119 | ||
120 | ctx->buf_len = 0; | 120 | ctx->buf_len = 0; |
121 | ctx->buf_off = 0; | 121 | ctx->buf_off = 0; |
@@ -360,7 +360,7 @@ again: | |||
360 | case BIO_CTRL_DUP: | 360 | case BIO_CTRL_DUP: |
361 | dbio = (BIO *)ptr; | 361 | dbio = (BIO *)ptr; |
362 | dctx = (BIO_ENC_CTX *)dbio->ptr; | 362 | dctx = (BIO_ENC_CTX *)dbio->ptr; |
363 | EVP_CIPHER_CTX_init(&dctx->cipher); | 363 | EVP_CIPHER_CTX_legacy_clear(&dctx->cipher); |
364 | ret = EVP_CIPHER_CTX_copy(&dctx->cipher, &ctx->cipher); | 364 | ret = EVP_CIPHER_CTX_copy(&dctx->cipher, &ctx->cipher); |
365 | if (ret) | 365 | if (ret) |
366 | dbio->init = 1; | 366 | dbio->init = 1; |