Only use DSA-functions if available.
authorLutz Jänicke <jaenicke@openssl.org>
Mon, 29 Jul 2002 13:31:44 +0000 (13:31 +0000)
committerLutz Jänicke <jaenicke@openssl.org>
Mon, 29 Jul 2002 13:31:44 +0000 (13:31 +0000)
Submitted by: "Hellan,Kim KHE" <KHE@kmd.dk>
Reviewed by:
PR: 167

apps/x509.c

index 23e9b6bfe1f1a949f83519726499770b5328f122..dd98eb3b08b319b92b1b8d854fc18d6165eb5d5f 100644 (file)
@@ -923,10 +923,14 @@ bad:
 
                                BIO_printf(bio_err,"Generating certificate request\n");
 
 
                                BIO_printf(bio_err,"Generating certificate request\n");
 
+#ifndef OPENSSL_NO_DSA
                                if (pk->type == EVP_PKEY_DSA)
                                        digest=EVP_dss1();
                                if (pk->type == EVP_PKEY_DSA)
                                        digest=EVP_dss1();
-                               else if (pk->type == EVP_PKEY_ECDSA)
+#endif
+#ifndef OPENSSL_NO_ECDSA
+                               if (pk->type == EVP_PKEY_ECDSA)
                                        digest=EVP_ecdsa();
                                        digest=EVP_ecdsa();
+#endif
 
                                rq=X509_to_X509_REQ(x,pk,digest);
                                EVP_PKEY_free(pk);
 
                                rq=X509_to_X509_REQ(x,pk,digest);
                                EVP_PKEY_free(pk);