Adapt cipher implementations to opaque EVP_CIPHER_CTX
[oweals/openssl.git] / crypto / evp / bio_md.c
index 6afaf9a54f5e8e8fdd1359ccf0066902e7a6d954..24c7dc3bea391f0024b3889bd9d2ff321ca4c147 100644 (file)
@@ -61,6 +61,8 @@
 #include "internal/cryptlib.h"
 #include <openssl/buffer.h>
 #include <openssl/evp.h>
+#include "internal/evp_int.h"
+#include "evp_locl.h"
 
 /*
  * BIO_put and BIO_get both add to the digest, BIO_gets returns the digest
@@ -98,7 +100,7 @@ static int md_new(BIO *bi)
 {
     EVP_MD_CTX *ctx;
 
-    ctx = EVP_MD_CTX_create();
+    ctx = EVP_MD_CTX_new();
     if (ctx == NULL)
         return (0);
 
@@ -112,7 +114,7 @@ static int md_free(BIO *a)
 {
     if (a == NULL)
         return (0);
-    EVP_MD_CTX_destroy(a->ptr);
+    EVP_MD_CTX_free(a->ptr);
     a->ptr = NULL;
     a->init = 0;
     a->flags = 0;