diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index a2dae120f99..5c24f6926bf 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -3455,6 +3455,11 @@ static int RsaPublicEncryptEx(const byte* in, word32 inLen, byte* out, /* In the case that no padding is used the input length can and should * be the same size as the RSA key. */ if (pad_type != WC_RSA_NO_PAD) +#endif +#ifdef WC_RSA_PSS + /* PSS performs its own input-length check inside RsaPad_PSS; the + * RSA_MIN_PAD_SZ guard applies only to PKCS#1 v1.5 padding. */ + if (pad_type != WC_RSA_PSS_PAD) #endif return RSA_BUFFER_E; }