summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/m_wp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/m_wp.c')
-rw-r--r--src/lib/libcrypto/evp/m_wp.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/lib/libcrypto/evp/m_wp.c b/src/lib/libcrypto/evp/m_wp.c
deleted file mode 100644
index 6755d56e44..0000000000
--- a/src/lib/libcrypto/evp/m_wp.c
+++ /dev/null
@@ -1,54 +0,0 @@
1/* $OpenBSD: m_wp.c,v 1.14 2024/04/09 13:52:41 beck Exp $ */
2
3#include <stdio.h>
4
5#include <openssl/opensslconf.h>
6
7#ifndef OPENSSL_NO_WHIRLPOOL
8
9#include <openssl/evp.h>
10#include <openssl/objects.h>
11#include <openssl/x509.h>
12#include <openssl/whrlpool.h>
13
14#include "evp_local.h"
15
16static int
17init(EVP_MD_CTX *ctx)
18{
19 return WHIRLPOOL_Init(ctx->md_data);
20}
21
22static int
23update(EVP_MD_CTX *ctx, const void *data, size_t count)
24{
25 return WHIRLPOOL_Update(ctx->md_data, data, count);
26}
27
28static int
29final(EVP_MD_CTX *ctx, unsigned char *md)
30{
31 return WHIRLPOOL_Final(md, ctx->md_data);
32}
33
34static const EVP_MD whirlpool_md = {
35 .type = NID_whirlpool,
36 .pkey_type = 0,
37 .md_size = WHIRLPOOL_DIGEST_LENGTH,
38 .flags = 0,
39 .init = init,
40 .update = update,
41 .final = final,
42 .copy = NULL,
43 .cleanup = NULL,
44 .block_size = WHIRLPOOL_BBLOCK / 8,
45 .ctx_size = sizeof(EVP_MD *) + sizeof(WHIRLPOOL_CTX),
46};
47
48const EVP_MD *
49EVP_whirlpool(void)
50{
51 return (&whirlpool_md);
52}
53LCRYPTO_ALIAS(EVP_whirlpool);
54#endif