Coverage Report

Created: 2022-11-30 06:20

/src/openssl/crypto/evp/m_wp.c
Line
Count
Source (jump to first uncovered line)
1
/* crypto/evp/m_wp.c */
2
3
#include <stdio.h>
4
#include "cryptlib.h"
5
6
#ifndef OPENSSL_NO_WHIRLPOOL
7
8
# include <openssl/evp.h>
9
# include <openssl/objects.h>
10
# include <openssl/x509.h>
11
# include <openssl/whrlpool.h>
12
# include "evp_locl.h"
13
14
static int init(EVP_MD_CTX *ctx)
15
0
{
16
0
    return WHIRLPOOL_Init(ctx->md_data);
17
0
}
18
19
static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
20
0
{
21
0
    return WHIRLPOOL_Update(ctx->md_data, data, count);
22
0
}
23
24
static int final(EVP_MD_CTX *ctx, unsigned char *md)
25
0
{
26
0
    return WHIRLPOOL_Final(md, ctx->md_data);
27
0
}
28
29
static const EVP_MD whirlpool_md = {
30
    NID_whirlpool,
31
    0,
32
    WHIRLPOOL_DIGEST_LENGTH,
33
    0,
34
    init,
35
    update,
36
    final,
37
    NULL,
38
    NULL,
39
    EVP_PKEY_NULL_method,
40
    WHIRLPOOL_BBLOCK / 8,
41
    sizeof(EVP_MD *) + sizeof(WHIRLPOOL_CTX),
42
};
43
44
const EVP_MD *EVP_whirlpool(void)
45
19
{
46
19
    return (&whirlpool_md);
47
19
}
48
#endif