summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-11-05 09:35:41 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-11-05 09:35:41 +0000
commitff4058cdb37c54f478e2c1271634c78ea0a05490 (patch)
tree600c1779188cc33c9b4e608c460f3adfdcda3b11
parentb100db136a4fc890d932b8557c213862bb69a0a6 (diff)
Move cryptlib.h to crypto_local.h
discussed with jsing
-rw-r--r--lib/libcrypto/cryptlib.c3
-rw-r--r--lib/libcrypto/cryptlib.h84
-rw-r--r--lib/libcrypto/crypto_local.h86
-rw-r--r--lib/libcrypto/ct/ct_log.c5
-rw-r--r--lib/libcrypto/cversion.c4
-rw-r--r--lib/libcrypto/x509/x509_def.c4
6 files changed, 28 insertions, 158 deletions
diff --git a/lib/libcrypto/cryptlib.c b/lib/libcrypto/cryptlib.c
index 653b9ec8b9f..fe14dd608f3 100644
--- a/lib/libcrypto/cryptlib.c
+++ b/lib/libcrypto/cryptlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptlib.c,v 1.60 2024/11/04 17:07:03 tb Exp $ */
+/* $OpenBSD: cryptlib.c,v 1.61 2024/11/05 09:35:40 tb Exp $ */
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
@@ -124,7 +124,6 @@
#include <openssl/opensslconf.h>
#include <openssl/crypto.h>
-#include "cryptlib.h"
#include "crypto_internal.h"
#include "x86_arch.h"
diff --git a/lib/libcrypto/cryptlib.h b/lib/libcrypto/cryptlib.h
deleted file mode 100644
index cc4abf3639b..00000000000
--- a/lib/libcrypto/cryptlib.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* $OpenBSD: cryptlib.h,v 1.27 2024/11/05 06:09:12 tb Exp $ */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_CRYPTO_LOCAL_H
-#define HEADER_CRYPTO_LOCAL_H
-
-#include <openssl/opensslconf.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define X509_CERT_AREA OPENSSLDIR
-#define X509_CERT_DIR OPENSSLDIR "/certs"
-#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
-#define X509_PRIVATE_DIR OPENSSLDIR "/private"
-#define X509_CERT_DIR_EVP "SSL_CERT_DIR"
-#define X509_CERT_FILE_EVP "SSL_CERT_FILE"
-
-#define CTLOG_FILE OPENSSLDIR "/ct_log_list.cnf"
-#define CTLOG_FILE_EVP "CTLOG_FILE"
-
-void OPENSSL_cpuid_setup(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/libcrypto/crypto_local.h b/lib/libcrypto/crypto_local.h
index 2fc79051b22..d2fd9b07489 100644
--- a/lib/libcrypto/crypto_local.h
+++ b/lib/libcrypto/crypto_local.h
@@ -1,57 +1,4 @@
-/* $OpenBSD: crypto_local.h,v 1.2 2024/11/02 08:56:44 tb Exp $ */
-/* ====================================================================
- * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com). This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
+/* $OpenBSD: crypto_local.h,v 1.3 2024/11/05 09:35:40 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -108,21 +55,30 @@
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * ECDH support in OpenSSL originally developed by
- * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
- */
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
#ifndef HEADER_CRYPTO_LOCAL_H
#define HEADER_CRYPTO_LOCAL_H
-__BEGIN_HIDDEN_DECLS
+#include <openssl/opensslconf.h>
-__END_HIDDEN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define X509_CERT_AREA OPENSSLDIR
+#define X509_CERT_DIR OPENSSLDIR "/certs"
+#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
+#define X509_PRIVATE_DIR OPENSSLDIR "/private"
+#define X509_CERT_DIR_EVP "SSL_CERT_DIR"
+#define X509_CERT_FILE_EVP "SSL_CERT_FILE"
+
+#define CTLOG_FILE OPENSSLDIR "/ct_log_list.cnf"
+#define CTLOG_FILE_EVP "CTLOG_FILE"
+
+void OPENSSL_cpuid_setup(void);
+
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/lib/libcrypto/ct/ct_log.c b/lib/libcrypto/ct/ct_log.c
index 0b2b0611674..72045477ac5 100644
--- a/lib/libcrypto/ct/ct_log.c
+++ b/lib/libcrypto/ct/ct_log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ct_log.c,v 1.8 2024/11/01 18:34:06 tb Exp $ */
+/* $OpenBSD: ct_log.c,v 1.9 2024/11/05 09:35:40 tb Exp $ */
/* Author: Adam Eijdenberg <adam.eijdenberg@gmail.com>. */
/* ====================================================================
* Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved.
@@ -71,8 +71,7 @@
#include <openssl/x509.h>
#include "conf_local.h"
-
-#include "cryptlib.h"
+#include "crypto_local.h"
/*
diff --git a/lib/libcrypto/cversion.c b/lib/libcrypto/cversion.c
index b29932027af..2992bd2e05e 100644
--- a/lib/libcrypto/cversion.c
+++ b/lib/libcrypto/cversion.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cversion.c,v 1.20 2024/11/01 18:36:29 tb Exp $ */
+/* $OpenBSD: cversion.c,v 1.21 2024/11/05 09:35:40 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -59,7 +59,7 @@
#include <openssl/crypto.h>
#include <openssl/opensslv.h>
-#include "cryptlib.h"
+#include "crypto_local.h"
const char *
SSLeay_version(int t)
diff --git a/lib/libcrypto/x509/x509_def.c b/lib/libcrypto/x509/x509_def.c
index 42bdb9bc6a4..f9b395c206f 100644
--- a/lib/libcrypto/x509/x509_def.c
+++ b/lib/libcrypto/x509/x509_def.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_def.c,v 1.9 2024/11/01 18:36:30 tb Exp $ */
+/* $OpenBSD: x509_def.c,v 1.10 2024/11/05 09:35:40 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -58,7 +58,7 @@
#include <openssl/x509.h>
-#include "cryptlib.h"
+#include "crypto_local.h"
const char *
X509_get_default_private_dir(void)