diff options
author | tb <> | 2022-01-07 09:27:13 +0000 |
---|---|---|
committer | tb <> | 2022-01-07 09:27:13 +0000 |
commit | 5da5c83c108c6006c6a5f1191036b26958cb8ad7 (patch) | |
tree | f47c69b82f6d3fd0e6253457a267cd59abc2c529 | |
parent | 439bac672b2f47fbf4951e7a52b9e742aa5a0859 (diff) | |
download | openbsd-5da5c83c108c6006c6a5f1191036b26958cb8ad7.tar.gz openbsd-5da5c83c108c6006c6a5f1191036b26958cb8ad7.tar.bz2 openbsd-5da5c83c108c6006c6a5f1191036b26958cb8ad7.zip |
Add an essentially empty dh_local.h and include it in the files where
it will be needed in the upcoming bump.
discussed with jsing
-rw-r--r-- | src/lib/libcrypto/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_ameth.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_asn1.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_check.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_gen.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_key.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_lib.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_local.h | 66 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_pmeth.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_lib.c | 4 |
10 files changed, 88 insertions, 9 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index c707dcc8f3..ed98dcc134 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.64 2022/01/07 09:02:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.65 2022/01/07 09:27:13 tb Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | LIBREBUILD=y | 4 | LIBREBUILD=y |
@@ -32,6 +32,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/asn1 | |||
32 | CFLAGS+= -I${LCRYPTO_SRC}/bio | 32 | CFLAGS+= -I${LCRYPTO_SRC}/bio |
33 | CFLAGS+= -I${LCRYPTO_SRC}/bn | 33 | CFLAGS+= -I${LCRYPTO_SRC}/bn |
34 | CFLAGS+= -I${LCRYPTO_SRC}/bytestring | 34 | CFLAGS+= -I${LCRYPTO_SRC}/bytestring |
35 | CFLAGS+= -I${LCRYPTO_SRC}/dh | ||
35 | CFLAGS+= -I${LCRYPTO_SRC}/ec | 36 | CFLAGS+= -I${LCRYPTO_SRC}/ec |
36 | CFLAGS+= -I${LCRYPTO_SRC}/ecdh | 37 | CFLAGS+= -I${LCRYPTO_SRC}/ecdh |
37 | CFLAGS+= -I${LCRYPTO_SRC}/ecdsa | 38 | CFLAGS+= -I${LCRYPTO_SRC}/ecdsa |
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c index aee8b05850..fc71bac7bb 100644 --- a/src/lib/libcrypto/dh/dh_ameth.c +++ b/src/lib/libcrypto/dh/dh_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_ameth.c,v 1.19 2021/12/12 21:30:13 tb Exp $ */ | 1 | /* $OpenBSD: dh_ameth.c,v 1.20 2022/01/07 09:27:13 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 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -65,6 +65,7 @@ | |||
65 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
66 | 66 | ||
67 | #include "asn1_locl.h" | 67 | #include "asn1_locl.h" |
68 | #include "dh_local.h" | ||
68 | #include "evp_locl.h" | 69 | #include "evp_locl.h" |
69 | 70 | ||
70 | static void | 71 | static void |
diff --git a/src/lib/libcrypto/dh/dh_asn1.c b/src/lib/libcrypto/dh/dh_asn1.c index f485029313..10184f0b2d 100644 --- a/src/lib/libcrypto/dh/dh_asn1.c +++ b/src/lib/libcrypto/dh/dh_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_asn1.c,v 1.10 2016/12/30 15:26:49 jsing Exp $ */ | 1 | /* $OpenBSD: dh_asn1.c,v 1.11 2022/01/07 09:27:13 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 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -63,6 +63,8 @@ | |||
63 | #include <openssl/dh.h> | 63 | #include <openssl/dh.h> |
64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
65 | 65 | ||
66 | #include "dh_local.h" | ||
67 | |||
66 | /* Override the default free and new methods */ | 68 | /* Override the default free and new methods */ |
67 | static int | 69 | static int |
68 | dh_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) | 70 | dh_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) |
diff --git a/src/lib/libcrypto/dh/dh_check.c b/src/lib/libcrypto/dh/dh_check.c index a3d2c98c34..7203936611 100644 --- a/src/lib/libcrypto/dh/dh_check.c +++ b/src/lib/libcrypto/dh/dh_check.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_check.c,v 1.22 2021/12/05 13:45:26 tb Exp $ */ | 1 | /* $OpenBSD: dh_check.c,v 1.23 2022/01/07 09:27:13 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 | * |
@@ -62,6 +62,7 @@ | |||
62 | #include <openssl/dh.h> | 62 | #include <openssl/dh.h> |
63 | 63 | ||
64 | #include "bn_lcl.h" | 64 | #include "bn_lcl.h" |
65 | #include "dh_local.h" | ||
65 | 66 | ||
66 | #define DH_NUMBER_ITERATIONS_FOR_PRIME 64 | 67 | #define DH_NUMBER_ITERATIONS_FOR_PRIME 64 |
67 | 68 | ||
diff --git a/src/lib/libcrypto/dh/dh_gen.c b/src/lib/libcrypto/dh/dh_gen.c index 99394113ee..6b49a2875a 100644 --- a/src/lib/libcrypto/dh/dh_gen.c +++ b/src/lib/libcrypto/dh/dh_gen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_gen.c,v 1.16 2017/01/29 17:49:22 beck Exp $ */ | 1 | /* $OpenBSD: dh_gen.c,v 1.17 2022/01/07 09:27:13 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 | * |
@@ -67,6 +67,8 @@ | |||
67 | #include <openssl/dh.h> | 67 | #include <openssl/dh.h> |
68 | #include <openssl/err.h> | 68 | #include <openssl/err.h> |
69 | 69 | ||
70 | #include "dh_local.h" | ||
71 | |||
70 | static int dh_builtin_genparams(DH *ret, int prime_len, int generator, | 72 | static int dh_builtin_genparams(DH *ret, int prime_len, int generator, |
71 | BN_GENCB *cb); | 73 | BN_GENCB *cb); |
72 | 74 | ||
diff --git a/src/lib/libcrypto/dh/dh_key.c b/src/lib/libcrypto/dh/dh_key.c index a77e7956dd..92429318db 100644 --- a/src/lib/libcrypto/dh/dh_key.c +++ b/src/lib/libcrypto/dh/dh_key.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_key.c,v 1.36 2018/11/12 17:39:17 tb Exp $ */ | 1 | /* $OpenBSD: dh_key.c,v 1.37 2022/01/07 09:27:13 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,7 @@ | |||
63 | #include <openssl/err.h> | 63 | #include <openssl/err.h> |
64 | 64 | ||
65 | #include "bn_lcl.h" | 65 | #include "bn_lcl.h" |
66 | #include "dh_local.h" | ||
66 | 67 | ||
67 | static int generate_key(DH *dh); | 68 | static int generate_key(DH *dh); |
68 | static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); | 69 | static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); |
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c index d331e7cd08..d4d0c9dda3 100644 --- a/src/lib/libcrypto/dh/dh_lib.c +++ b/src/lib/libcrypto/dh/dh_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_lib.c,v 1.35 2022/01/05 20:36:29 tb Exp $ */ | 1 | /* $OpenBSD: dh_lib.c,v 1.36 2022/01/07 09:27:13 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 | * |
@@ -69,6 +69,8 @@ | |||
69 | #include <openssl/engine.h> | 69 | #include <openssl/engine.h> |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #include "dh_local.h" | ||
73 | |||
72 | static const DH_METHOD *default_DH_method = NULL; | 74 | static const DH_METHOD *default_DH_method = NULL; |
73 | 75 | ||
74 | void | 76 | void |
diff --git a/src/lib/libcrypto/dh/dh_local.h b/src/lib/libcrypto/dh/dh_local.h new file mode 100644 index 0000000000..82054af757 --- /dev/null +++ b/src/lib/libcrypto/dh/dh_local.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* $OpenBSD: dh_local.h,v 1.1 2022/01/07 09:27:13 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 | |||
59 | #ifndef HEADER_DH_LOCAL_H | ||
60 | #define HEADER_DH_LOCAL_H | ||
61 | |||
62 | __BEGIN_HIDDEN_DECLS | ||
63 | |||
64 | __END_HIDDEN_DECLS | ||
65 | |||
66 | #endif /* !HEADER_DH_LOCAL_H */ | ||
diff --git a/src/lib/libcrypto/dh/dh_pmeth.c b/src/lib/libcrypto/dh/dh_pmeth.c index 0dda6bb1f7..d2052a8150 100644 --- a/src/lib/libcrypto/dh/dh_pmeth.c +++ b/src/lib/libcrypto/dh/dh_pmeth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_pmeth.c,v 1.11 2021/12/04 16:08:32 tb Exp $ */ | 1 | /* $OpenBSD: dh_pmeth.c,v 1.12 2022/01/07 09:27:13 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 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -68,6 +68,7 @@ | |||
68 | #include <openssl/x509.h> | 68 | #include <openssl/x509.h> |
69 | 69 | ||
70 | #include "bn_lcl.h" | 70 | #include "bn_lcl.h" |
71 | #include "dh_local.h" | ||
71 | #include "evp_locl.h" | 72 | #include "evp_locl.h" |
72 | 73 | ||
73 | /* DH pkey context structure */ | 74 | /* DH pkey context structure */ |
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c index 84d0fdb320..e910e340a9 100644 --- a/src/lib/libcrypto/dsa/dsa_lib.c +++ b/src/lib/libcrypto/dsa/dsa_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_lib.c,v 1.31 2022/01/05 20:52:14 tb Exp $ */ | 1 | /* $OpenBSD: dsa_lib.c,v 1.32 2022/01/07 09:27:13 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 | * |
@@ -74,6 +74,8 @@ | |||
74 | #include <openssl/engine.h> | 74 | #include <openssl/engine.h> |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #include "dh_local.h" | ||
78 | |||
77 | static const DSA_METHOD *default_DSA_method = NULL; | 79 | static const DSA_METHOD *default_DSA_method = NULL; |
78 | 80 | ||
79 | void | 81 | void |