ECDSA support
[openssl.git] / crypto / pkcs7 / pk7_doit.c
index f016fdb2e255969c2e4bc7fba813e250c6cb3efc..0119272d751c386511754cafaa41fc0f17c1d82d 100644 (file)
@@ -628,6 +628,10 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
                        if (si->pkey->type == EVP_PKEY_DSA)
                                ctx_tmp.digest=EVP_dss1();
 #endif
+#ifndef OPENSSL_NO_ECDSA
+                       if (si->pkey->type == EVP_PKEY_ECDSA)
+                               ctx_tmp.digest=EVP_ecdsa();
+#endif
 
                        if (!EVP_SignFinal(&ctx_tmp,(unsigned char *)buf->data,
                                (unsigned int *)&buf->length,si->pkey))
@@ -825,6 +829,9 @@ for (ii=0; ii<md_len; ii++) printf("%02X",md_dat[ii]); printf(" calc\n");
 #ifndef OPENSSL_NO_DSA
        if(pkey->type == EVP_PKEY_DSA) mdc_tmp.digest=EVP_dss1();
 #endif
+#ifndef OPENSSL_NO_ECDSA
+       if (pkey->type == EVP_PKEY_ECDSA) mdc_tmp.digest=EVP_ecdsa();
+#endif
 
        i=EVP_VerifyFinal(&mdc_tmp,os->data,os->length, pkey);
        EVP_PKEY_free(pkey);