summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/Makefile3
-rw-r--r--src/lib/libcrypto/Symbols.list1
-rw-r--r--src/lib/libcrypto/Symbols.namespace1
-rw-r--r--src/lib/libcrypto/ecdsa/ecdsa.h23
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_err.c97
-rw-r--r--src/lib/libcrypto/err/err_all.c8
-rw-r--r--src/lib/libcrypto/hidden/openssl/ecdsa.h3
7 files changed, 4 insertions, 132 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile
index b9cb2eddce..64bdb97eef 100644
--- a/src/lib/libcrypto/Makefile
+++ b/src/lib/libcrypto/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.139 2023/07/21 09:04:23 tb Exp $ 1# $OpenBSD: Makefile,v 1.140 2023/07/28 09:01:25 tb Exp $
2 2
3LIB= crypto 3LIB= crypto
4LIBREBUILD=y 4LIBREBUILD=y
@@ -357,7 +357,6 @@ SRCS+= ech_err.c
357SRCS+= ech_lib.c 357SRCS+= ech_lib.c
358 358
359# ecdsa/ 359# ecdsa/
360SRCS+= ecs_err.c
361SRCS+= ecs_lib.c 360SRCS+= ecs_lib.c
362SRCS+= ecdsa.c 361SRCS+= ecdsa.c
363 362
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index 00d9cfa65e..3cb83777ce 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -1347,7 +1347,6 @@ ERR_load_DH_strings
1347ERR_load_DSA_strings 1347ERR_load_DSA_strings
1348ERR_load_DSO_strings 1348ERR_load_DSO_strings
1349ERR_load_ECDH_strings 1349ERR_load_ECDH_strings
1350ERR_load_ECDSA_strings
1351ERR_load_EC_strings 1350ERR_load_EC_strings
1352ERR_load_ENGINE_strings 1351ERR_load_ENGINE_strings
1353ERR_load_ERR_strings 1352ERR_load_ERR_strings
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace
index 186e065ba2..ede2752b88 100644
--- a/src/lib/libcrypto/Symbols.namespace
+++ b/src/lib/libcrypto/Symbols.namespace
@@ -1444,7 +1444,6 @@ _libre_EC_KEY_METHOD_set_sign
1444_libre_EC_KEY_METHOD_set_verify 1444_libre_EC_KEY_METHOD_set_verify
1445_libre_EC_KEY_METHOD_get_sign 1445_libre_EC_KEY_METHOD_get_sign
1446_libre_EC_KEY_METHOD_get_verify 1446_libre_EC_KEY_METHOD_get_verify
1447_libre_ERR_load_ECDSA_strings
1448_libre_HKDF 1447_libre_HKDF
1449_libre_HKDF_extract 1448_libre_HKDF_extract
1450_libre_HKDF_expand 1449_libre_HKDF_expand
diff --git a/src/lib/libcrypto/ecdsa/ecdsa.h b/src/lib/libcrypto/ecdsa/ecdsa.h
index 9960a4b1ea..122b0eb000 100644
--- a/src/lib/libcrypto/ecdsa/ecdsa.h
+++ b/src/lib/libcrypto/ecdsa/ecdsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecdsa.h,v 1.17 2023/07/28 08:49:43 tb Exp $ */ 1/* $OpenBSD: ecdsa.h,v 1.18 2023/07/28 09:01:25 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -157,27 +157,6 @@ void EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth,
157 int (**pverify_sig)(const unsigned char *dgst, int dgst_len, 157 int (**pverify_sig)(const unsigned char *dgst, int dgst_len,
158 const ECDSA_SIG *sig, EC_KEY *eckey)); 158 const ECDSA_SIG *sig, EC_KEY *eckey));
159 159
160void ERR_load_ECDSA_strings(void);
161
162/* Error codes for the ECDSA functions. */
163
164/* Function codes. */
165#define ECDSA_F_ECDSA_CHECK 104
166#define ECDSA_F_ECDSA_DATA_NEW_METHOD 100
167#define ECDSA_F_ECDSA_DO_SIGN 101
168#define ECDSA_F_ECDSA_DO_VERIFY 102
169#define ECDSA_F_ECDSA_SIGN_SETUP 103
170
171/* Reason codes. */
172#define ECDSA_R_BAD_SIGNATURE 100
173#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101
174#define ECDSA_R_ERR_EC_LIB 102
175#define ECDSA_R_MISSING_PARAMETERS 103
176#define ECDSA_R_NEED_NEW_SETUP_VALUES 106
177#define ECDSA_R_NON_FIPS_METHOD 107
178#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104
179#define ECDSA_R_SIGNATURE_MALLOC_FAILED 105
180
181#ifdef __cplusplus 160#ifdef __cplusplus
182} 161}
183#endif 162#endif
diff --git a/src/lib/libcrypto/ecdsa/ecs_err.c b/src/lib/libcrypto/ecdsa/ecs_err.c
deleted file mode 100644
index 54d2f3f6ef..0000000000
--- a/src/lib/libcrypto/ecdsa/ecs_err.c
+++ /dev/null
@@ -1,97 +0,0 @@
1/* $OpenBSD: ecs_err.c,v 1.8 2023/07/07 13:54:45 beck Exp $ */
2/* ====================================================================
3 * Copyright (c) 1999-2011 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
56#include <stdio.h>
57
58#include <openssl/opensslconf.h>
59
60#include <openssl/ecdsa.h>
61#include <openssl/err.h>
62
63#ifndef OPENSSL_NO_ERR
64
65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDSA,func,0)
66#define ERR_REASON(reason) ERR_PACK(ERR_LIB_ECDSA,0,reason)
67
68static ERR_STRING_DATA ECDSA_str_functs[]= {
69 {ERR_FUNC(0xfff), "CRYPTO_internal"},
70 {0, NULL}
71};
72
73static ERR_STRING_DATA ECDSA_str_reasons[]= {
74 {ERR_REASON(ECDSA_R_BAD_SIGNATURE) , "bad signature"},
75 {ERR_REASON(ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE), "data too large for key size"},
76 {ERR_REASON(ECDSA_R_ERR_EC_LIB) , "err ec lib"},
77 {ERR_REASON(ECDSA_R_MISSING_PARAMETERS) , "missing parameters"},
78 {ERR_REASON(ECDSA_R_NEED_NEW_SETUP_VALUES), "need new setup values"},
79 {ERR_REASON(ECDSA_R_NON_FIPS_METHOD) , "non fips method"},
80 {ERR_REASON(ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED), "random number generation failed"},
81 {ERR_REASON(ECDSA_R_SIGNATURE_MALLOC_FAILED), "signature malloc failed"},
82 {0, NULL}
83};
84
85#endif
86
87void
88ERR_load_ECDSA_strings(void)
89{
90#ifndef OPENSSL_NO_ERR
91 if (ERR_func_error_string(ECDSA_str_functs[0].error) == NULL) {
92 ERR_load_strings(0, ECDSA_str_functs);
93 ERR_load_strings(0, ECDSA_str_reasons);
94 }
95#endif
96}
97LCRYPTO_ALIAS(ERR_load_ECDSA_strings);
diff --git a/src/lib/libcrypto/err/err_all.c b/src/lib/libcrypto/err/err_all.c
index 12a0fcd329..b251b205f1 100644
--- a/src/lib/libcrypto/err/err_all.c
+++ b/src/lib/libcrypto/err/err_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err_all.c,v 1.29 2023/07/07 13:54:45 beck Exp $ */ 1/* $OpenBSD: err_all.c,v 1.30 2023/07/28 09:01:25 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 *
@@ -95,9 +95,6 @@
95#ifndef OPENSSL_NO_ECDH 95#ifndef OPENSSL_NO_ECDH
96#include <openssl/ecdh.h> 96#include <openssl/ecdh.h>
97#endif 97#endif
98#ifndef OPENSSL_NO_ECDSA
99#include <openssl/ecdsa.h>
100#endif
101#ifndef OPENSSL_NO_ENGINE 98#ifndef OPENSSL_NO_ENGINE
102#include <openssl/engine.h> 99#include <openssl/engine.h>
103#endif 100#endif
@@ -138,9 +135,6 @@ ERR_load_crypto_strings_internal(void)
138#ifndef OPENSSL_NO_ECDH 135#ifndef OPENSSL_NO_ECDH
139 ERR_load_ECDH_strings(); 136 ERR_load_ECDH_strings();
140#endif 137#endif
141#ifndef OPENSSL_NO_ECDSA
142 ERR_load_ECDSA_strings();
143#endif
144#ifndef OPENSSL_NO_EC 138#ifndef OPENSSL_NO_EC
145 ERR_load_EC_strings(); 139 ERR_load_EC_strings();
146#endif 140#endif
diff --git a/src/lib/libcrypto/hidden/openssl/ecdsa.h b/src/lib/libcrypto/hidden/openssl/ecdsa.h
index b2563ed37d..90860bf16d 100644
--- a/src/lib/libcrypto/hidden/openssl/ecdsa.h
+++ b/src/lib/libcrypto/hidden/openssl/ecdsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecdsa.h,v 1.3 2023/07/28 08:49:43 tb Exp $ */ 1/* $OpenBSD: ecdsa.h,v 1.4 2023/07/28 09:01:25 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -49,6 +49,5 @@ LCRYPTO_USED(EC_KEY_METHOD_set_sign);
49LCRYPTO_USED(EC_KEY_METHOD_set_verify); 49LCRYPTO_USED(EC_KEY_METHOD_set_verify);
50LCRYPTO_USED(EC_KEY_METHOD_get_sign); 50LCRYPTO_USED(EC_KEY_METHOD_get_sign);
51LCRYPTO_USED(EC_KEY_METHOD_get_verify); 51LCRYPTO_USED(EC_KEY_METHOD_get_verify);
52LCRYPTO_USED(ERR_load_ECDSA_strings);
53 52
54#endif /* _LIBCRYPTO_ECDSA_H */ 53#endif /* _LIBCRYPTO_ECDSA_H */