summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2019-11-02 13:52:31 +0000
committerjsing <jsing@openbsd.org>2019-11-02 13:52:31 +0000
commitc778c399d1a769179f6986828ab7faa6840d2ffe (patch)
tree12caaf882423ffb4116a7fc3dc65619f115e2956
parentMake RSA_padding_{add,check}_PKCS1_OAEP_mgf1() public. (diff)
downloadwireguard-openbsd-c778c399d1a769179f6986828ab7faa6840d2ffe.tar.xz
wireguard-openbsd-c778c399d1a769179f6986828ab7faa6840d2ffe.zip
Provide RSA_PKCS1_OpenSSL().
Prompted by inoguchi@
-rw-r--r--lib/libcrypto/Symbols.list1
-rw-r--r--lib/libcrypto/rsa/rsa.h4
-rw-r--r--lib/libcrypto/rsa/rsa_eay.c8
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list
index a9e97d7399e..662eb4dc291 100644
--- a/lib/libcrypto/Symbols.list
+++ b/lib/libcrypto/Symbols.list
@@ -2412,6 +2412,7 @@ RSAPublicKey_it
RSA_OAEP_PARAMS_free
RSA_OAEP_PARAMS_it
RSA_OAEP_PARAMS_new
+RSA_PKCS1_OpenSSL
RSA_PKCS1_SSLeay
RSA_PSS_PARAMS_free
RSA_PSS_PARAMS_it
diff --git a/lib/libcrypto/rsa/rsa.h b/lib/libcrypto/rsa/rsa.h
index 9dd840006f2..9859c5f4203 100644
--- a/lib/libcrypto/rsa/rsa.h
+++ b/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa.h,v 1.49 2019/11/02 13:47:41 jsing Exp $ */
+/* $OpenBSD: rsa.h,v 1.50 2019/11/02 13:52:31 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -331,7 +331,7 @@ const RSA_METHOD *RSA_get_default_method(void);
const RSA_METHOD *RSA_get_method(const RSA *rsa);
int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
-/* these are the actual SSLeay RSA functions */
+const RSA_METHOD *RSA_PKCS1_OpenSSL(void);
const RSA_METHOD *RSA_PKCS1_SSLeay(void);
const RSA_METHOD *RSA_null_method(void);
diff --git a/lib/libcrypto/rsa/rsa_eay.c b/lib/libcrypto/rsa/rsa_eay.c
index 8e8c6d520d9..33201a8a8b7 100644
--- a/lib/libcrypto/rsa/rsa_eay.c
+++ b/lib/libcrypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_eay.c,v 1.50 2017/08/28 17:41:59 jsing Exp $ */
+/* $OpenBSD: rsa_eay.c,v 1.51 2019/11/02 13:52:31 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -145,6 +145,12 @@ static RSA_METHOD rsa_pkcs1_eay_meth = {
};
const RSA_METHOD *
+RSA_PKCS1_OpenSSL(void)
+{
+ return &rsa_pkcs1_eay_meth;
+}
+
+const RSA_METHOD *
RSA_PKCS1_SSLeay(void)
{
return &rsa_pkcs1_eay_meth;