diff options
author | tb <> | 2024-11-05 09:35:40 +0000 |
---|---|---|
committer | tb <> | 2024-11-05 09:35:40 +0000 |
commit | 542bf25f93f81841d2819e26fc732c46b7adb261 (patch) | |
tree | 53d245baf97d8ca405f7b20b088f59c7c0eed5d3 /src/lib | |
parent | a8ec14250509d225ed04d2f875ffba9d1d219856 (diff) | |
download | openbsd-542bf25f93f81841d2819e26fc732c46b7adb261.tar.gz openbsd-542bf25f93f81841d2819e26fc732c46b7adb261.tar.bz2 openbsd-542bf25f93f81841d2819e26fc732c46b7adb261.zip |
Move cryptlib.h to crypto_local.h
discussed with jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/cryptlib.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/cryptlib.h | 84 | ||||
-rw-r--r-- | src/lib/libcrypto/crypto_local.h | 86 | ||||
-rw-r--r-- | src/lib/libcrypto/ct/ct_log.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/cversion.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509_def.c | 4 |
6 files changed, 28 insertions, 158 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index 653b9ec8b9..fe14dd608f 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cryptlib.c,v 1.60 2024/11/04 17:07:03 tb Exp $ */ | 1 | /* $OpenBSD: cryptlib.c,v 1.61 2024/11/05 09:35:40 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -124,7 +124,6 @@ | |||
124 | #include <openssl/opensslconf.h> | 124 | #include <openssl/opensslconf.h> |
125 | #include <openssl/crypto.h> | 125 | #include <openssl/crypto.h> |
126 | 126 | ||
127 | #include "cryptlib.h" | ||
128 | #include "crypto_internal.h" | 127 | #include "crypto_internal.h" |
129 | #include "x86_arch.h" | 128 | #include "x86_arch.h" |
130 | 129 | ||
diff --git a/src/lib/libcrypto/cryptlib.h b/src/lib/libcrypto/cryptlib.h deleted file mode 100644 index cc4abf3639..0000000000 --- a/src/lib/libcrypto/cryptlib.h +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* $OpenBSD: cryptlib.h,v 1.27 2024/11/05 06:09:12 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_CRYPTO_LOCAL_H | ||
60 | #define HEADER_CRYPTO_LOCAL_H | ||
61 | |||
62 | #include <openssl/opensslconf.h> | ||
63 | |||
64 | #ifdef __cplusplus | ||
65 | extern "C" { | ||
66 | #endif | ||
67 | |||
68 | #define X509_CERT_AREA OPENSSLDIR | ||
69 | #define X509_CERT_DIR OPENSSLDIR "/certs" | ||
70 | #define X509_CERT_FILE OPENSSLDIR "/cert.pem" | ||
71 | #define X509_PRIVATE_DIR OPENSSLDIR "/private" | ||
72 | #define X509_CERT_DIR_EVP "SSL_CERT_DIR" | ||
73 | #define X509_CERT_FILE_EVP "SSL_CERT_FILE" | ||
74 | |||
75 | #define CTLOG_FILE OPENSSLDIR "/ct_log_list.cnf" | ||
76 | #define CTLOG_FILE_EVP "CTLOG_FILE" | ||
77 | |||
78 | void OPENSSL_cpuid_setup(void); | ||
79 | |||
80 | #ifdef __cplusplus | ||
81 | } | ||
82 | #endif | ||
83 | |||
84 | #endif | ||
diff --git a/src/lib/libcrypto/crypto_local.h b/src/lib/libcrypto/crypto_local.h index 2fc79051b2..d2fd9b0748 100644 --- a/src/lib/libcrypto/crypto_local.h +++ b/src/lib/libcrypto/crypto_local.h | |||
@@ -1,57 +1,4 @@ | |||
1 | /* $OpenBSD: crypto_local.h,v 1.2 2024/11/02 08:56:44 tb Exp $ */ | 1 | /* $OpenBSD: crypto_local.h,v 1.3 2024/11/05 09:35:40 tb Exp $ */ |
2 | /* ==================================================================== | ||
3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | * This product includes cryptographic software written by Eric Young | ||
51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
52 | * Hudson (tjh@cryptsoft.com). | ||
53 | * | ||
54 | */ | ||
55 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
56 | * All rights reserved. | 3 | * All rights reserved. |
57 | * | 4 | * |
@@ -108,21 +55,30 @@ | |||
108 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
109 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
110 | */ | 57 | */ |
111 | /* ==================================================================== | ||
112 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | ||
113 | * ECDH support in OpenSSL originally developed by | ||
114 | * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. | ||
115 | */ | ||
116 | |||
117 | #include <stdint.h> | ||
118 | #include <stdio.h> | ||
119 | #include <stdlib.h> | ||
120 | 58 | ||
121 | #ifndef HEADER_CRYPTO_LOCAL_H | 59 | #ifndef HEADER_CRYPTO_LOCAL_H |
122 | #define HEADER_CRYPTO_LOCAL_H | 60 | #define HEADER_CRYPTO_LOCAL_H |
123 | 61 | ||
124 | __BEGIN_HIDDEN_DECLS | 62 | #include <openssl/opensslconf.h> |
125 | 63 | ||
126 | __END_HIDDEN_DECLS | 64 | #ifdef __cplusplus |
65 | extern "C" { | ||
66 | #endif | ||
67 | |||
68 | #define X509_CERT_AREA OPENSSLDIR | ||
69 | #define X509_CERT_DIR OPENSSLDIR "/certs" | ||
70 | #define X509_CERT_FILE OPENSSLDIR "/cert.pem" | ||
71 | #define X509_PRIVATE_DIR OPENSSLDIR "/private" | ||
72 | #define X509_CERT_DIR_EVP "SSL_CERT_DIR" | ||
73 | #define X509_CERT_FILE_EVP "SSL_CERT_FILE" | ||
74 | |||
75 | #define CTLOG_FILE OPENSSLDIR "/ct_log_list.cnf" | ||
76 | #define CTLOG_FILE_EVP "CTLOG_FILE" | ||
77 | |||
78 | void OPENSSL_cpuid_setup(void); | ||
79 | |||
80 | #ifdef __cplusplus | ||
81 | } | ||
82 | #endif | ||
127 | 83 | ||
128 | #endif | 84 | #endif |
diff --git a/src/lib/libcrypto/ct/ct_log.c b/src/lib/libcrypto/ct/ct_log.c index 0b2b061167..72045477ac 100644 --- a/src/lib/libcrypto/ct/ct_log.c +++ b/src/lib/libcrypto/ct/ct_log.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ct_log.c,v 1.8 2024/11/01 18:34:06 tb Exp $ */ | 1 | /* $OpenBSD: ct_log.c,v 1.9 2024/11/05 09:35:40 tb Exp $ */ |
2 | /* Author: Adam Eijdenberg <adam.eijdenberg@gmail.com>. */ | 2 | /* Author: Adam Eijdenberg <adam.eijdenberg@gmail.com>. */ |
3 | /* ==================================================================== | 3 | /* ==================================================================== |
4 | * Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. | 4 | * Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. |
@@ -71,8 +71,7 @@ | |||
71 | #include <openssl/x509.h> | 71 | #include <openssl/x509.h> |
72 | 72 | ||
73 | #include "conf_local.h" | 73 | #include "conf_local.h" |
74 | 74 | #include "crypto_local.h" | |
75 | #include "cryptlib.h" | ||
76 | 75 | ||
77 | 76 | ||
78 | /* | 77 | /* |
diff --git a/src/lib/libcrypto/cversion.c b/src/lib/libcrypto/cversion.c index b29932027a..2992bd2e05 100644 --- a/src/lib/libcrypto/cversion.c +++ b/src/lib/libcrypto/cversion.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cversion.c,v 1.20 2024/11/01 18:36:29 tb Exp $ */ | 1 | /* $OpenBSD: cversion.c,v 1.21 2024/11/05 09:35:40 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 | * |
@@ -59,7 +59,7 @@ | |||
59 | #include <openssl/crypto.h> | 59 | #include <openssl/crypto.h> |
60 | #include <openssl/opensslv.h> | 60 | #include <openssl/opensslv.h> |
61 | 61 | ||
62 | #include "cryptlib.h" | 62 | #include "crypto_local.h" |
63 | 63 | ||
64 | const char * | 64 | const char * |
65 | SSLeay_version(int t) | 65 | SSLeay_version(int t) |
diff --git a/src/lib/libcrypto/x509/x509_def.c b/src/lib/libcrypto/x509/x509_def.c index 42bdb9bc6a..f9b395c206 100644 --- a/src/lib/libcrypto/x509/x509_def.c +++ b/src/lib/libcrypto/x509/x509_def.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_def.c,v 1.9 2024/11/01 18:36:30 tb Exp $ */ | 1 | /* $OpenBSD: x509_def.c,v 1.10 2024/11/05 09:35:40 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 | * |
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #include <openssl/x509.h> | 59 | #include <openssl/x509.h> |
60 | 60 | ||
61 | #include "cryptlib.h" | 61 | #include "crypto_local.h" |
62 | 62 | ||
63 | const char * | 63 | const char * |
64 | X509_get_default_private_dir(void) | 64 | X509_get_default_private_dir(void) |