diff options
author | 2018-08-24 19:36:52 +0000 | |
---|---|---|
committer | 2018-08-24 19:36:52 +0000 | |
commit | 7e2fda2b4a25a4d846d0371af8dfb49683d2c68b (patch) | |
tree | 97418fbc4d9f76cabdd37ec68f07092ea2673dfe | |
parent | unifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE. (diff) | |
download | wireguard-openbsd-7e2fda2b4a25a4d846d0371af8dfb49683d2c68b.tar.xz wireguard-openbsd-7e2fda2b4a25a4d846d0371af8dfb49683d2c68b.zip |
Provide EVP_CIPHER_CTX_encrypting().
tested in a bulk by sthen
ok jsing
-rw-r--r-- | lib/libcrypto/Symbols.list | 1 | ||||
-rw-r--r-- | lib/libcrypto/evp/evp.h | 3 | ||||
-rw-r--r-- | lib/libcrypto/evp/evp_lib.c | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index eb22f622787..01b21bddc68 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -1258,6 +1258,7 @@ EVP_CIPHER_CTX_cleanup EVP_CIPHER_CTX_clear_flags EVP_CIPHER_CTX_copy EVP_CIPHER_CTX_ctrl +EVP_CIPHER_CTX_encrypting EVP_CIPHER_CTX_flags EVP_CIPHER_CTX_free EVP_CIPHER_CTX_get_app_data diff --git a/lib/libcrypto/evp/evp.h b/lib/libcrypto/evp/evp.h index c6ec0e35d8a..b607be7ae5b 100644 --- a/lib/libcrypto/evp/evp.h +++ b/lib/libcrypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.65 2018/08/24 19:30:24 tb Exp $ */ +/* $OpenBSD: evp.h,v 1.66 2018/08/24 19:36:52 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -491,6 +491,7 @@ unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); #define EVP_CIPHER_mode(e) (EVP_CIPHER_flags(e) & EVP_CIPH_MODE) const EVP_CIPHER * EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); +int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); diff --git a/lib/libcrypto/evp/evp_lib.c b/lib/libcrypto/evp/evp_lib.c index ad97a3b7b92..3571755620b 100644 --- a/lib/libcrypto/evp/evp_lib.c +++ b/lib/libcrypto/evp/evp_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_lib.c,v 1.15 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: evp_lib.c,v 1.16 2018/08/24 19:36:52 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -207,6 +207,12 @@ EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx) return ctx->cipher; } +int +EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx) +{ + return ctx->encrypt; +} + unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher) { |