avoid linking problems when OpenSSL is built with no-dsa. Spotted by Hellan,Kim...
authorRichard Levitte <levitte@openssl.org>
Tue, 20 Mar 2001 15:36:59 +0000 (15:36 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 20 Mar 2001 15:36:59 +0000 (15:36 +0000)
crypto/pkcs7/pk7_doit.c

index 84dbd4a9a4da35d16f88c4f5e5d9b002caf33770..d0f3ed0411c94fcc0f1c2fbc35f603f2e0e23fbc 100644 (file)
@@ -580,8 +580,10 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                                OPENSSL_free(abuf);
                                }
 
+#ifndef OPENSSL_NO_DSA
                        if (si->pkey->type == EVP_PKEY_DSA)
                                ctx_tmp.digest=EVP_dss1();
+#endif
 
                        if (!EVP_SignFinal(&ctx_tmp,(unsigned char *)buf->data,
                                (unsigned int *)&buf->length,si->pkey))
@@ -769,7 +771,9 @@ for (ii=0; ii<md_len; ii++) printf("%02X",md_dat[ii]); printf(" calc\n");
                ret = -1;
                goto err;
                }
+#ifndef OPENSSL_NO_DSA
        if(pkey->type == EVP_PKEY_DSA) mdc_tmp.digest=EVP_dss1();
+#endif
 
        i=EVP_VerifyFinal(&mdc_tmp,os->data,os->length, pkey);
        EVP_PKEY_free(pkey);