don't dump core
authorBodo Möller <bodo@openssl.org>
Tue, 6 Feb 2001 09:47:47 +0000 (09:47 +0000)
committerBodo Möller <bodo@openssl.org>
Tue, 6 Feb 2001 09:47:47 +0000 (09:47 +0000)
apps/req.c

index 292bc59..b518e47 100644 (file)
@@ -770,16 +770,15 @@ loop:
 
        if (newreq || x509)
                {
-#ifndef NO_DSA
-               if (pkey->type == EVP_PKEY_DSA)
-                       digest=EVP_dss1();
-#endif
-
                if (pkey == NULL)
                        {
                        BIO_printf(bio_err,"you need to specify a private key\n");
                        goto end;
                        }
+#ifndef NO_DSA
+               if (pkey->type == EVP_PKEY_DSA)
+                       digest=EVP_dss1();
+#endif
                if (req == NULL)
                        {
                        req=X509_REQ_new();