Removed unused fields of CT_POLICY_EVAL_CTX
[openssl.git] / crypto / evp / bio_md.c
index 6afaf9a54f5e8e8fdd1359ccf0066902e7a6d954..90dffa13135d054926fc19bcb3193cdaffad57d9 100644 (file)
@@ -1,4 +1,3 @@
-/* crypto/evp/bio_md.c */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -61,6 +60,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
@@ -77,7 +78,7 @@ static int md_new(BIO *h);
 static int md_free(BIO *data);
 static long md_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 
-static BIO_METHOD methods_md = {
+static const BIO_METHOD methods_md = {
     BIO_TYPE_MD, "message digest",
     md_write,
     md_read,
@@ -89,7 +90,7 @@ static BIO_METHOD methods_md = {
     md_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_md(void)
+const BIO_METHOD *BIO_f_md(void)
 {
     return (&methods_md);
 }
@@ -98,7 +99,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 +113,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;