Coverage Report

Created: 2026-02-22 06:11

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/crypto/evp/e_des3.c
Line
Count
Source
1
/*
2
 * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License 2.0 (the "License").  You may not use
5
 * this file except in compliance with the License.  You can obtain a copy
6
 * in the file LICENSE in the source distribution or at
7
 * https://www.openssl.org/source/license.html
8
 */
9
10
#include <openssl/macros.h>
11
12
#ifndef OPENSSL_NO_DES
13
#include "crypto/evp.h"
14
15
BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
16
    EVP_CIPH_RAND_KEY | EVP_CIPH_FLAG_DEFAULT_ASN1)
17
18
BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64,
19
    EVP_CIPH_RAND_KEY | EVP_CIPH_FLAG_DEFAULT_ASN1)
20
21
BLOCK_CIPHER_def_cfb(des_ede3, DES_EDE_KEY, NID_des_ede3, 24, 8, 1,
22
    EVP_CIPH_RAND_KEY | EVP_CIPH_FLAG_DEFAULT_ASN1)
23
24
BLOCK_CIPHER_def_cfb(des_ede3, DES_EDE_KEY, NID_des_ede3, 24, 8, 8,
25
    EVP_CIPH_RAND_KEY | EVP_CIPH_FLAG_DEFAULT_ASN1)
26
27
const EVP_CIPHER *EVP_des_ede(void)
28
3
{
29
3
    return &des_ede_ecb;
30
3
}
31
32
const EVP_CIPHER *EVP_des_ede3(void)
33
3
{
34
3
    return &des_ede3_ecb;
35
3
}
36
37
static const EVP_CIPHER des3_wrap = {
38
    NID_id_smime_alg_CMS3DESwrap,
39
    8, 24, 0,
40
    EVP_CIPH_WRAP_MODE | EVP_CIPH_CUSTOM_IV | EVP_CIPH_FLAG_CUSTOM_CIPHER
41
        | EVP_CIPH_FLAG_DEFAULT_ASN1,
42
    EVP_ORIG_GLOBAL
43
};
44
45
const EVP_CIPHER *EVP_des_ede3_wrap(void)
46
3
{
47
3
    return &des3_wrap;
48
3
}
49
50
#else
51
NON_EMPTY_TRANSLATION_UNIT
52
#endif