diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/evp/evp.h | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp_lib.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 89ebac415d..2e6053c9bc 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp.h,v 1.88 2021/12/12 21:35:46 tb Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.89 2021/12/24 12:02:15 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 | * |
| @@ -522,6 +522,9 @@ int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, | |||
| 522 | int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); | 522 | int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); |
| 523 | void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); | 523 | void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); |
| 524 | void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); | 524 | void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); |
| 525 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 526 | unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); | ||
| 527 | #endif | ||
| 525 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) | 528 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) |
| 526 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); | 529 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); |
| 527 | #define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) | 530 | #define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) |
diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c index f2ff7bdec5..d74a53997e 100644 --- a/src/lib/libcrypto/evp/evp_lib.c +++ b/src/lib/libcrypto/evp/evp_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_lib.c,v 1.19 2021/12/12 21:30:13 tb Exp $ */ | 1 | /* $OpenBSD: evp_lib.c,v 1.20 2021/12/24 12:02:15 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 | * |
| @@ -251,6 +251,12 @@ EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx) | |||
| 251 | return ctx->cipher->iv_len; | 251 | return ctx->cipher->iv_len; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | unsigned char * | ||
| 255 | EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx) | ||
| 256 | { | ||
| 257 | return ctx->buf; | ||
| 258 | } | ||
| 259 | |||
| 254 | int | 260 | int |
| 255 | EVP_CIPHER_key_length(const EVP_CIPHER *cipher) | 261 | EVP_CIPHER_key_length(const EVP_CIPHER *cipher) |
| 256 | { | 262 | { |
