Fix no-engine no-ui.
[openssl.git] / apps / rsa.c
index 38cedf7b776e47672bad8e6de45ba6b1908137bc..980d9ef911c11e9e13b0144d79f9d7e8fa56f3f1 100644 (file)
@@ -310,8 +310,10 @@ int rsa_main(int argc, char **argv)
     }
 
     if (modulus) {
+        BIGNUM *n;
+        RSA_get0_key(rsa, &n, NULL, NULL);
         BIO_printf(out, "Modulus=");
-        BN_print(out, rsa->n);
+        BN_print(out, n);
         BIO_printf(out, "\n");
     }