From 5e1331d85653f9494962ba1fe8958f991123ce9c Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 2 Nov 2019 13:52:31 +0000 Subject: Provide RSA_PKCS1_OpenSSL(). Prompted by inoguchi@ --- src/lib/libcrypto/Symbols.list | 1 + src/lib/libcrypto/rsa/rsa.h | 4 ++-- src/lib/libcrypto/rsa/rsa_eay.c | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index a9e97d7399..662eb4dc29 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/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/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h index 9dd840006f..9859c5f420 100644 --- a/src/lib/libcrypto/rsa/rsa.h +++ b/src/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/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index 8e8c6d520d..33201a8a8b 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/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. * @@ -144,6 +144,12 @@ static RSA_METHOD rsa_pkcs1_eay_meth = { .finish = RSA_eay_finish, }; +const RSA_METHOD * +RSA_PKCS1_OpenSSL(void) +{ + return &rsa_pkcs1_eay_meth; +} + const RSA_METHOD * RSA_PKCS1_SSLeay(void) { -- cgit v1.2.3-55-g6feb