From 3deaeb434fd793a98542a5a6d2699d4db3310b70 Mon Sep 17 00:00:00 2001 From: adriangzz Date: Mon, 8 Dec 2025 14:23:32 -0600 Subject: [PATCH] SERVER-114867 Define RSA_PSS_SALTLEN_DIGEST if not defined by OpenSSL (#44886) GitOrigin-RevId: 6828515f8f1695d4f2239e006f85979dd704cb29 --- src/mongo/crypto/jws_validator_openssl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mongo/crypto/jws_validator_openssl.cpp b/src/mongo/crypto/jws_validator_openssl.cpp index 8190ea71633..1d37fe2d1f2 100644 --- a/src/mongo/crypto/jws_validator_openssl.cpp +++ b/src/mongo/crypto/jws_validator_openssl.cpp @@ -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 {