diff --git a/CHANGES b/CHANGES index ecb697f3a1ccb31a50b9bc8c6f9c5ec91f942886..d7da85056fd2ea0c34d6fdd13d03c8c97e722e46 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,10 @@ Changes between 0.9.2b and 0.9.3 + *) Make sure the RSA OAEP test is skipped under -DRSAref because + OAEP isn't supported when OpenSSL is built with RSAref. + [Ulf Moeller ] + *) Move definitions of IS_SET/IS_SEQUENCE inside crypto/asn1/asn1.h so they no longer are missing under -DNOPROTO. [Soren S. Jorvang ] diff --git a/crypto/rsa/rsa_oaep_test.c b/crypto/rsa/rsa_oaep_test.c index 5fcc2f7a87f1af59dae1247f08fa0c817920faf0..57e10e9a08be590adf6e1c6f282e53d85d69c826 100644 --- a/crypto/rsa/rsa_oaep_test.c +++ b/crypto/rsa/rsa_oaep_test.c @@ -195,6 +195,11 @@ int main() int clen = 0; int num; +#ifdef RSAref + printf("No OAEP support with RSAref - skipping test\n"); + return 0; +#endif + plen = sizeof(ptext_ex) - 1; for (v = 0; v < 3; v++) diff --git a/rsaref/rsaref.c b/rsaref/rsaref.c index 5f772972d50982bb6f8cb1f3162ea34b624ea291..90cda4687b47a654e490aa5676780cedb7e2a3ef 100644 --- a/rsaref/rsaref.c +++ b/rsaref/rsaref.c @@ -328,6 +328,9 @@ int padding; RSARandomState rnd; unsigned char buf[16]; + if (padding == RSA_PKCS1_OAEP_PADDING) + goto err; + R_RandomInit(&rnd); R_GetRandomBytesNeeded((unsigned int *)&i,&rnd); while (i > 0)