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 {