summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/rsa
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2019-10-09 16:17:59 +0000
committerjsing <jsing@openbsd.org>2019-10-09 16:17:59 +0000
commitbb3393dc10c6e2d588652011b7ef1ec2a67c302a (patch)
tree14e0d9096feee944d0c7f29c652d81a19b7c121e /lib/libcrypto/rsa
parentRestore BSS channel only when BSS was not changed in iee80211_input(). (diff)
downloadwireguard-openbsd-bb3393dc10c6e2d588652011b7ef1ec2a67c302a.tar.xz
wireguard-openbsd-bb3393dc10c6e2d588652011b7ef1ec2a67c302a.zip
Use EVP_MAX_MD_SIZE instead of SHA_DIGEST_LENGTH and remove OPENSSL_NO_SHA*
conditionals, now that this code handles arbitrary message digests. ok inoguchi@ tb@
Diffstat (limited to 'lib/libcrypto/rsa')
-rw-r--r--lib/libcrypto/rsa/rsa_oaep.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libcrypto/rsa/rsa_oaep.c b/lib/libcrypto/rsa/rsa_oaep.c
index c90299093a3..6b1760da60d 100644
--- a/lib/libcrypto/rsa/rsa_oaep.c
+++ b/lib/libcrypto/rsa/rsa_oaep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_oaep.c,v 1.31 2019/10/04 16:51:31 jsing Exp $ */
+/* $OpenBSD: rsa_oaep.c,v 1.32 2019/10/09 16:17:59 jsing Exp $ */
/*
* Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
*
@@ -73,10 +73,6 @@
#include <stdlib.h>
#include <string.h>
-#include <openssl/opensslconf.h>
-
-#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
-
#include <openssl/bn.h>
#include <openssl/err.h>
#include <openssl/evp.h>
@@ -177,7 +173,7 @@ RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
const unsigned char *maskeddb;
int lzero;
unsigned char *db = NULL;
- unsigned char seed[SHA_DIGEST_LENGTH], phash[SHA_DIGEST_LENGTH];
+ unsigned char seed[EVP_MAX_MD_SIZE], phash[EVP_MAX_MD_SIZE];
unsigned char *padded_from;
int bad = 0;
int mdlen;
@@ -312,4 +308,3 @@ PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
EVP_MD_CTX_cleanup(&c);
return rv;
}
-#endif