A call to RSA_set0_key had the arguments in the wrong order
authorMatt Caswell <matt@openssl.org>
Thu, 28 Apr 2016 14:20:52 +0000 (15:20 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 29 Apr 2016 08:20:13 +0000 (09:20 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/pem/pvkfmt.c

index dc9008809b740dc159adbda26490fdc158ef7e72..86d5921bf47932088855018c33555bf15aab3339 100644 (file)
@@ -388,7 +388,7 @@ static EVP_PKEY *b2i_rsa(const unsigned char **in,
         RSA_set0_factors(rsa, p, q);
         RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp);
     }
-    RSA_set0_key(rsa, e, n, d);
+    RSA_set0_key(rsa, n, e, d);
 
     EVP_PKEY_set1_RSA(ret, rsa);
     RSA_free(rsa);