From 46ef044d7be6cf94ea6557abc81bbedba796184e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Tue, 15 Jun 2021 13:38:37 +0200 Subject: [PATCH] #3224: Remove SSL23 support from Poco/Crypto --- Crypto/include/Poco/Crypto/Crypto.h | 18 +++++++----------- Crypto/src/RSACipherImpl.cpp | 3 --- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Crypto/include/Poco/Crypto/Crypto.h b/Crypto/include/Poco/Crypto/Crypto.h index d6b3ede65..edd2e3602 100644 --- a/Crypto/include/Poco/Crypto/Crypto.h +++ b/Crypto/include/Poco/Crypto/Crypto.h @@ -43,20 +43,16 @@ enum RSAPaddingMode /// The padding mode used for RSA public key encryption. { RSA_PADDING_PKCS1, - /// PKCS #1 v1.5 padding. This currently is the most widely used mode. - + /// PKCS #1 v1.5 padding. This currently is the most widely used mode. + RSA_PADDING_PKCS1_OAEP, - /// EME-OAEP as defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty + /// EME-OAEP as defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty /// encoding parameter. This mode is recommended for all new applications. - - RSA_PADDING_SSLV23, - /// PKCS #1 v1.5 padding with an SSL-specific modification that denotes - /// that the server is SSL3 capable. - + RSA_PADDING_NONE - /// Raw RSA encryption. This mode should only be used to implement cryptographically - /// sound padding modes in the application code. Encrypting user data directly with RSA - /// is insecure. + /// Raw RSA encryption. This mode should only be used to implement cryptographically + /// sound padding modes in the application code. Encrypting user data directly with RSA + /// is insecure. }; diff --git a/Crypto/src/RSACipherImpl.cpp b/Crypto/src/RSACipherImpl.cpp index 5b8dc6264..f04e4a22b 100644 --- a/Crypto/src/RSACipherImpl.cpp +++ b/Crypto/src/RSACipherImpl.cpp @@ -50,8 +50,6 @@ namespace return RSA_PKCS1_PADDING; case RSA_PADDING_PKCS1_OAEP: return RSA_PKCS1_OAEP_PADDING; - case RSA_PADDING_SSLV23: - return RSA_SSLV23_PADDING; case RSA_PADDING_NONE: return RSA_NO_PADDING; default: @@ -116,7 +114,6 @@ namespace switch (_paddingMode) { case RSA_PADDING_PKCS1: - case RSA_PADDING_SSLV23: size -= 11; break; case RSA_PADDING_PKCS1_OAEP: