summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hmac
diff options
context:
space:
mode:
authortb <>2021-12-12 21:27:38 +0000
committertb <>2021-12-12 21:27:38 +0000
commita0b1347b1dec62a1a5e864ed59314d2e9b42e15b (patch)
tree110aa6f619f19831c621f32e98d757ca15d75e3e /src/lib/libcrypto/hmac
parentef37d8e11b67b24d718fb50ca36b24bf266259ad (diff)
downloadopenbsd-a0b1347b1dec62a1a5e864ed59314d2e9b42e15b.tar.gz
openbsd-a0b1347b1dec62a1a5e864ed59314d2e9b42e15b.tar.bz2
openbsd-a0b1347b1dec62a1a5e864ed59314d2e9b42e15b.zip
Add a mostly empty hmac_local.h. HMAC_CTX and a few other things
from hmac.h will be moved there in an umpcoming bump. Include this file where it will be needed. ok inoguchi
Diffstat (limited to 'src/lib/libcrypto/hmac')
-rw-r--r--src/lib/libcrypto/hmac/hm_ameth.c4
-rw-r--r--src/lib/libcrypto/hmac/hm_pmeth.c3
-rw-r--r--src/lib/libcrypto/hmac/hmac.c4
-rw-r--r--src/lib/libcrypto/hmac/hmac_local.h71
4 files changed, 79 insertions, 3 deletions
diff --git a/src/lib/libcrypto/hmac/hm_ameth.c b/src/lib/libcrypto/hmac/hm_ameth.c
index cfa0239705..ebbcab5ac2 100644
--- a/src/lib/libcrypto/hmac/hm_ameth.c
+++ b/src/lib/libcrypto/hmac/hm_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hm_ameth.c,v 1.10 2015/09/10 15:56:25 jsing Exp $ */ 1/* $OpenBSD: hm_ameth.c,v 1.11 2021/12/12 21:27:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2007. 3 * project 2007.
4 */ 4 */
@@ -60,8 +60,10 @@
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/evp.h> 62#include <openssl/evp.h>
63#include <openssl/hmac.h>
63 64
64#include "asn1_locl.h" 65#include "asn1_locl.h"
66#include "hmac_local.h"
65 67
66#define HMAC_TEST_PRIVATE_KEY_FORMAT 68#define HMAC_TEST_PRIVATE_KEY_FORMAT
67 69
diff --git a/src/lib/libcrypto/hmac/hm_pmeth.c b/src/lib/libcrypto/hmac/hm_pmeth.c
index 390725fa25..8964c64871 100644
--- a/src/lib/libcrypto/hmac/hm_pmeth.c
+++ b/src/lib/libcrypto/hmac/hm_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hm_pmeth.c,v 1.10 2017/05/02 03:59:44 deraadt Exp $ */ 1/* $OpenBSD: hm_pmeth.c,v 1.11 2021/12/12 21:27:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2007. 3 * project 2007.
4 */ 4 */
@@ -65,6 +65,7 @@
65#include <openssl/x509v3.h> 65#include <openssl/x509v3.h>
66 66
67#include "evp_locl.h" 67#include "evp_locl.h"
68#include "hmac_local.h"
68 69
69/* HMAC pkey context structure */ 70/* HMAC pkey context structure */
70 71
diff --git a/src/lib/libcrypto/hmac/hmac.c b/src/lib/libcrypto/hmac/hmac.c
index 7bf17eed96..a3eb7666e9 100644
--- a/src/lib/libcrypto/hmac/hmac.c
+++ b/src/lib/libcrypto/hmac/hmac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hmac.c,v 1.25 2018/02/17 14:53:58 jsing Exp $ */ 1/* $OpenBSD: hmac.c,v 1.26 2021/12/12 21:27:38 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 *
@@ -63,6 +63,8 @@
63#include <openssl/err.h> 63#include <openssl/err.h>
64#include <openssl/hmac.h> 64#include <openssl/hmac.h>
65 65
66#include "hmac_local.h"
67
66int 68int
67HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, 69HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md,
68 ENGINE *impl) 70 ENGINE *impl)
diff --git a/src/lib/libcrypto/hmac/hmac_local.h b/src/lib/libcrypto/hmac/hmac_local.h
new file mode 100644
index 0000000000..46f1a013cb
--- /dev/null
+++ b/src/lib/libcrypto/hmac/hmac_local.h
@@ -0,0 +1,71 @@
1/* $OpenBSD: hmac_local.h,v 1.1 2021/12/12 21:27:38 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58#ifndef HEADER_HMAC_LOCAL_H
59#define HEADER_HMAC_LOCAL_H
60
61#include <openssl/opensslconf.h>
62
63#include <openssl/evp.h>
64
65#include "evp_locl.h"
66
67__BEGIN_HIDDEN_DECLS
68
69__END_HIDDEN_DECLS
70
71#endif /* !HEADER_HMAC_LOCAL_H */