SERVER-114867 Define RSA_PSS_SALTLEN_DIGEST if not defined by OpenSSL (#44886)

GitOrigin-RevId: 6828515f8f1695d4f2239e006f85979dd704cb29
This commit is contained in:
adriangzz 2025-12-08 14:23:32 -06:00 committed by MongoDB Bot
parent e2a80148b4
commit 3deaeb434f
1 changed files with 5 additions and 2 deletions

View File

@ -43,8 +43,6 @@
namespace {
// Copies of OpenSSL 1.1.0 and later define new EVP digest routines. We must
// polyfill used definitions to interact with older OpenSSL versions.
#define RSA_PSS_SALTLEN_DIGEST -1
EVP_MD_CTX* EVP_MD_CTX_new() {
return EVP_MD_CTX_create();
}
@ -80,6 +78,11 @@ int RSA_set0_key(RSA* r, BIGNUM* n, BIGNUM* e, BIGNUM* d) {
} // namespace
#endif
// Define RSA_PSS_SALTLEN_DIGEST if not defined by OpenSSL headers.
#ifndef RSA_PSS_SALTLEN_DIGEST
#define RSA_PSS_SALTLEN_DIGEST -1
#endif
namespace mongo::crypto {
namespace {