summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-10-24 13:51:07 +0000
committertb <>2021-10-24 13:51:07 +0000
commit9dd051ee2075fc69f1304f5e92f999bbe33635b2 (patch)
treea42844d28ec778496b905aec60600eac4ccf47e8 /src
parent9d8621b7e81419d953ce51428f69003f546bec2a (diff)
downloadopenbsd-9dd051ee2075fc69f1304f5e92f999bbe33635b2.tar.gz
openbsd-9dd051ee2075fc69f1304f5e92f999bbe33635b2.tar.bz2
openbsd-9dd051ee2075fc69f1304f5e92f999bbe33635b2.zip
Prepare to provide EVP_MD_CTX_get_md_data()
ok beck jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/evp/evp.h5
-rw-r--r--src/lib/libcrypto/evp/evp_lib.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 06c529ef3f..4e32a794b4 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp.h,v 1.83 2021/05/10 17:00:32 tb Exp $ */ 1/* $OpenBSD: evp.h,v 1.84 2021/10/24 13:51:07 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -486,6 +486,9 @@ int EVP_MD_block_size(const EVP_MD *md);
486unsigned long EVP_MD_flags(const EVP_MD *md); 486unsigned long EVP_MD_flags(const EVP_MD *md);
487 487
488const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); 488const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
489#if defined(LIBRESSL_NEW_API)
490void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
491#endif
489#define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) 492#define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e))
490#define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) 493#define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e))
491#define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) 494#define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e))
diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c
index 90107739e7..83b81bd429 100644
--- a/src/lib/libcrypto/evp/evp_lib.c
+++ b/src/lib/libcrypto/evp/evp_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_lib.c,v 1.17 2018/09/12 06:35:38 djm Exp $ */ 1/* $OpenBSD: evp_lib.c,v 1.18 2021/10/24 13:51:07 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -353,6 +353,12 @@ EVP_MD_CTX_md(const EVP_MD_CTX *ctx)
353 return ctx->digest; 353 return ctx->digest;
354} 354}
355 355
356void *
357EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx)
358{
359 return ctx->md_data;
360}
361
356void 362void
357EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) 363EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags)
358{ 364{