Stop PKCS7_verify() core dumping with unknown public
[openssl.git] / crypto / evp / digest.c
index c560733568c7adde2fc5e912d086a05b49be0642..5c75a347b86213c7cfe06e11b99feda665f19593 100644 (file)
@@ -89,4 +89,14 @@ int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in)
     }
     memcpy((char *)out,(char *)in,in->digest->ctx_size);
     return 1;
-}    
+}
+
+int EVP_Digest(void *data, unsigned int count,
+               unsigned char *md, unsigned int *size, const EVP_MD *type)
+{
+       EVP_MD_CTX ctx;
+       EVP_DigestInit(&ctx, type);
+       EVP_DigestUpdate(&ctx, data, count);
+       EVP_DigestFinal(&ctx, md, size);
+       return 1;
+}