summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/asn1/asn1.h6
-rw-r--r--src/lib/libcrypto/asn1/asn1_err.c8
-rw-r--r--src/lib/libcrypto/bio/bio.h6
-rw-r--r--src/lib/libcrypto/bio/bio_err.c8
-rw-r--r--src/lib/libcrypto/bn/bn.h6
-rw-r--r--src/lib/libcrypto/bn/bn_err.c8
-rw-r--r--src/lib/libcrypto/buffer/buf_err.c8
-rw-r--r--src/lib/libcrypto/buffer/buffer.h6
-rw-r--r--src/lib/libcrypto/cms/cms_err.c3
-rw-r--r--src/lib/libcrypto/comp/comp_err.c3
-rw-r--r--src/lib/libcrypto/conf/conf.h6
-rw-r--r--src/lib/libcrypto/conf/conf_err.c8
-rw-r--r--src/lib/libcrypto/cpt_err.c8
-rw-r--r--src/lib/libcrypto/crypto.h6
-rw-r--r--src/lib/libcrypto/ct/ct_err.c7
-rw-r--r--src/lib/libcrypto/dh/dh.h6
-rw-r--r--src/lib/libcrypto/dh/dh_err.c8
-rw-r--r--src/lib/libcrypto/dsa/dsa.h6
-rw-r--r--src/lib/libcrypto/dsa/dsa_err.c8
-rw-r--r--src/lib/libcrypto/dso/dso.h6
-rw-r--r--src/lib/libcrypto/dso/dso_err.c8
-rw-r--r--src/lib/libcrypto/ec/ec.h6
-rw-r--r--src/lib/libcrypto/ec/ec_err.c8
-rw-r--r--src/lib/libcrypto/ecdh/ecdh.h6
-rw-r--r--src/lib/libcrypto/ecdh/ech_err.c8
-rw-r--r--src/lib/libcrypto/ecdsa/ecdsa.h7
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_err.c8
-rw-r--r--src/lib/libcrypto/engine/eng_err.c8
-rw-r--r--src/lib/libcrypto/engine/engine.h6
-rw-r--r--src/lib/libcrypto/err/openssl.ec96
-rw-r--r--src/lib/libcrypto/evp/evp.h6
-rw-r--r--src/lib/libcrypto/evp/evp_err.c8
-rw-r--r--src/lib/libcrypto/gost/gost.h6
-rw-r--r--src/lib/libcrypto/gost/gost_err.c6
-rw-r--r--src/lib/libcrypto/kdf/kdf.h6
-rw-r--r--src/lib/libcrypto/kdf/kdf_err.c6
-rw-r--r--src/lib/libcrypto/man/ERR.312
-rw-r--r--src/lib/libcrypto/objects/obj_err.c8
-rw-r--r--src/lib/libcrypto/objects/objects.h6
-rw-r--r--src/lib/libcrypto/ocsp/ocsp.h6
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_err.c8
-rw-r--r--src/lib/libcrypto/pem/pem.h6
-rw-r--r--src/lib/libcrypto/pem/pem_err.c8
-rw-r--r--src/lib/libcrypto/pkcs12/pk12err.c8
-rw-r--r--src/lib/libcrypto/pkcs12/pkcs12.h6
-rw-r--r--src/lib/libcrypto/pkcs7/pkcs7.h6
-rw-r--r--src/lib/libcrypto/pkcs7/pkcs7err.c8
-rw-r--r--src/lib/libcrypto/rand/rand.h6
-rw-r--r--src/lib/libcrypto/rand/rand_err.c8
-rw-r--r--src/lib/libcrypto/rsa/rsa.h6
-rw-r--r--src/lib/libcrypto/rsa/rsa_err.c8
-rw-r--r--src/lib/libcrypto/sm2/sm2.h6
-rw-r--r--src/lib/libcrypto/sm2/sm2_err.c3
-rw-r--r--src/lib/libcrypto/ts/ts.h7
-rw-r--r--src/lib/libcrypto/ts/ts_err.c8
-rw-r--r--src/lib/libcrypto/ui/ui.h6
-rw-r--r--src/lib/libcrypto/ui/ui_err.c8
-rw-r--r--src/lib/libcrypto/util/mkerr.pl810
-rw-r--r--src/lib/libcrypto/x509/x509.h6
-rw-r--r--src/lib/libcrypto/x509/x509_err.c8
-rw-r--r--src/lib/libcrypto/x509/x509v3.h6
-rw-r--r--src/lib/libssl/ssl.h6
-rw-r--r--src/lib/libssl/ssl_err.c8
63 files changed, 61 insertions, 1261 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h
index 00634a6e82..f172e027e1 100644
--- a/src/lib/libcrypto/asn1/asn1.h
+++ b/src/lib/libcrypto/asn1/asn1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1.h,v 1.67 2022/07/07 13:01:28 tb Exp $ */ 1/* $OpenBSD: asn1.h,v 1.68 2022/07/12 14:42:48 kn 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 *
@@ -947,10 +947,6 @@ ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
947int SMIME_crlf_copy(BIO *in, BIO *out, int flags); 947int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
948int SMIME_text(BIO *in, BIO *out); 948int SMIME_text(BIO *in, BIO *out);
949 949
950/* BEGIN ERROR CODES */
951/* The following lines are auto generated by the script mkerr.pl. Any changes
952 * made after this point may be overwritten when the script is next run.
953 */
954void ERR_load_ASN1_strings(void); 950void ERR_load_ASN1_strings(void);
955 951
956/* Error codes for the ASN1 functions. */ 952/* Error codes for the ASN1 functions. */
diff --git a/src/lib/libcrypto/asn1/asn1_err.c b/src/lib/libcrypto/asn1/asn1_err.c
index 98db4f7802..8a99e78bd8 100644
--- a/src/lib/libcrypto/asn1/asn1_err.c
+++ b/src/lib/libcrypto/asn1/asn1_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_err.c,v 1.23 2022/06/25 15:39:12 jsing Exp $ */ 1/* $OpenBSD: asn1_err.c,v 1.24 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/asn1.h> 61#include <openssl/asn1.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ASN1,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ASN1,func,0)
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 679e88a3bc..0a729bded9 100644
--- a/src/lib/libcrypto/bio/bio.h
+++ b/src/lib/libcrypto/bio/bio.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio.h,v 1.54 2022/01/14 08:40:57 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.55 2022/07/12 14:42:48 kn 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 *
@@ -681,10 +681,6 @@ BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
681 __attribute__((__deprecated__, __format__(__printf__, 3, 0), 681 __attribute__((__deprecated__, __format__(__printf__, 3, 0),
682 __nonnull__(3))); 682 __nonnull__(3)));
683 683
684/* BEGIN ERROR CODES */
685/* The following lines are auto generated by the script mkerr.pl. Any changes
686 * made after this point may be overwritten when the script is next run.
687 */
688void ERR_load_BIO_strings(void); 684void ERR_load_BIO_strings(void);
689 685
690/* Error codes for the BIO functions. */ 686/* Error codes for the BIO functions. */
diff --git a/src/lib/libcrypto/bio/bio_err.c b/src/lib/libcrypto/bio/bio_err.c
index cda693d036..fa5d16aff8 100644
--- a/src/lib/libcrypto/bio/bio_err.c
+++ b/src/lib/libcrypto/bio/bio_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_err.c,v 1.18 2022/01/14 08:40:57 tb Exp $ */ 1/* $OpenBSD: bio_err.c,v 1.19 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/bio.h> 61#include <openssl/bio.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BIO,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BIO,func,0)
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index 436be593bf..5ac41438eb 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn.h,v 1.54 2022/07/07 13:01:28 tb Exp $ */ 1/* $OpenBSD: bn.h,v 1.55 2022/07/12 14:42:48 kn Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -653,10 +653,6 @@ BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
653BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn); 653BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
654BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn); 654BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
655 655
656/* BEGIN ERROR CODES */
657/* The following lines are auto generated by the script mkerr.pl. Any changes
658 * made after this point may be overwritten when the script is next run.
659 */
660void ERR_load_BN_strings(void); 656void ERR_load_BN_strings(void);
661 657
662/* Error codes for the BN functions. */ 658/* Error codes for the BN functions. */
diff --git a/src/lib/libcrypto/bn/bn_err.c b/src/lib/libcrypto/bn/bn_err.c
index a693a8cbf8..592c509416 100644
--- a/src/lib/libcrypto/bn/bn_err.c
+++ b/src/lib/libcrypto/bn/bn_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_err.c,v 1.14 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: bn_err.c,v 1.15 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/bn.h> 61#include <openssl/bn.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BN,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BN,func,0)
diff --git a/src/lib/libcrypto/buffer/buf_err.c b/src/lib/libcrypto/buffer/buf_err.c
index dd5cc5e173..4dc1dca790 100644
--- a/src/lib/libcrypto/buffer/buf_err.c
+++ b/src/lib/libcrypto/buffer/buf_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: buf_err.c,v 1.11 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: buf_err.c,v 1.12 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/buffer.h> 61#include <openssl/buffer.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BUF,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BUF,func,0)
diff --git a/src/lib/libcrypto/buffer/buffer.h b/src/lib/libcrypto/buffer/buffer.h
index ed6dac0e69..c210bfd1c5 100644
--- a/src/lib/libcrypto/buffer/buffer.h
+++ b/src/lib/libcrypto/buffer/buffer.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: buffer.h,v 1.15 2015/06/24 10:05:14 jsing Exp $ */ 1/* $OpenBSD: buffer.h,v 1.16 2022/07/12 14:42:48 kn 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 *
@@ -98,10 +98,6 @@ size_t BUF_strlcat(char *dst, const char *src, size_t siz)
98 __attribute__ ((__bounded__(__string__,1,3))); 98 __attribute__ ((__bounded__(__string__,1,3)));
99#endif 99#endif
100 100
101/* BEGIN ERROR CODES */
102/* The following lines are auto generated by the script mkerr.pl. Any changes
103 * made after this point may be overwritten when the script is next run.
104 */
105void ERR_load_BUF_strings(void); 101void ERR_load_BUF_strings(void);
106 102
107/* Error codes for the BUF functions. */ 103/* Error codes for the BUF functions. */
diff --git a/src/lib/libcrypto/cms/cms_err.c b/src/lib/libcrypto/cms/cms_err.c
index 2fd550cae3..07869ff986 100644
--- a/src/lib/libcrypto/cms/cms_err.c
+++ b/src/lib/libcrypto/cms/cms_err.c
@@ -1,6 +1,5 @@
1/* $OpenBSD: cms_err.c,v 1.12 2020/06/05 16:51:12 jsing Exp $ */ 1/* $OpenBSD: cms_err.c,v 1.13 2022/07/12 14:42:48 kn Exp $ */
2/* 2/*
3 * Generated by util/mkerr.pl DO NOT EDIT
4 * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
5 * 4 *
6 * Licensed under the OpenSSL license (the "License"). You may not use 5 * Licensed under the OpenSSL license (the "License"). You may not use
diff --git a/src/lib/libcrypto/comp/comp_err.c b/src/lib/libcrypto/comp/comp_err.c
index ccc7a28cd3..eb5fc0ad50 100644
--- a/src/lib/libcrypto/comp/comp_err.c
+++ b/src/lib/libcrypto/comp/comp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: comp_err.c,v 1.11 2022/01/09 23:50:10 tb Exp $ */ 1/* $OpenBSD: comp_err.c,v 1.12 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -62,7 +62,6 @@
62 62
63#include "comp_local.h" 63#include "comp_local.h"
64 64
65/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 65#ifndef OPENSSL_NO_ERR
67 66
68#define ERR_FUNC(func) ERR_PACK(ERR_LIB_COMP,func,0) 67#define ERR_FUNC(func) ERR_PACK(ERR_LIB_COMP,func,0)
diff --git a/src/lib/libcrypto/conf/conf.h b/src/lib/libcrypto/conf/conf.h
index bea6a87197..5d10163bfb 100644
--- a/src/lib/libcrypto/conf/conf.h
+++ b/src/lib/libcrypto/conf/conf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf.h,v 1.15 2020/02/17 12:51:48 inoguchi Exp $ */ 1/* $OpenBSD: conf.h,v 1.16 2022/07/12 14:42:48 kn 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 *
@@ -193,10 +193,6 @@ int CONF_parse_list(const char *list, int sep, int nospc,
193 193
194void OPENSSL_load_builtin_modules(void); 194void OPENSSL_load_builtin_modules(void);
195 195
196/* BEGIN ERROR CODES */
197/* The following lines are auto generated by the script mkerr.pl. Any changes
198 * made after this point may be overwritten when the script is next run.
199 */
200void ERR_load_CONF_strings(void); 196void ERR_load_CONF_strings(void);
201 197
202/* Error codes for the CONF functions. */ 198/* Error codes for the CONF functions. */
diff --git a/src/lib/libcrypto/conf/conf_err.c b/src/lib/libcrypto/conf/conf_err.c
index 1e5eaff60e..e6c707ab31 100644
--- a/src/lib/libcrypto/conf/conf_err.c
+++ b/src/lib/libcrypto/conf/conf_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_err.c,v 1.14 2020/02/17 12:51:48 inoguchi Exp $ */ 1/* $OpenBSD: conf_err.c,v 1.15 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/conf.h> 60#include <openssl/conf.h>
66#include <openssl/err.h> 61#include <openssl/err.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_CONF,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_CONF,func,0)
diff --git a/src/lib/libcrypto/cpt_err.c b/src/lib/libcrypto/cpt_err.c
index 4ac32a28ec..718c72608e 100644
--- a/src/lib/libcrypto/cpt_err.c
+++ b/src/lib/libcrypto/cpt_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cpt_err.c,v 1.13 2014/07/10 22:45:56 jsing Exp $ */ 1/* $OpenBSD: cpt_err.c,v 1.14 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/crypto.h> 61#include <openssl/crypto.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_CRYPTO,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_CRYPTO,func,0)
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index 5524feec98..82372537e1 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.54 2022/01/14 08:23:25 tb Exp $ */ 1/* $OpenBSD: crypto.h,v 1.55 2022/07/12 14:42:48 kn 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 *
@@ -509,10 +509,6 @@ void OPENSSL_init(void);
509int CRYPTO_memcmp(const void *a, const void *b, size_t len); 509int CRYPTO_memcmp(const void *a, const void *b, size_t len);
510#endif 510#endif
511 511
512/* BEGIN ERROR CODES */
513/* The following lines are auto generated by the script mkerr.pl. Any changes
514 * made after this point may be overwritten when the script is next run.
515 */
516void ERR_load_CRYPTO_strings(void); 512void ERR_load_CRYPTO_strings(void);
517 513
518/* Error codes for the CRYPTO functions. */ 514/* Error codes for the CRYPTO functions. */
diff --git a/src/lib/libcrypto/ct/ct_err.c b/src/lib/libcrypto/ct/ct_err.c
index 01b6a7c209..2597874bd3 100644
--- a/src/lib/libcrypto/ct/ct_err.c
+++ b/src/lib/libcrypto/ct/ct_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ct_err.c,v 1.6 2022/05/08 20:59:32 tb Exp $ */ 1/* $OpenBSD: ct_err.c,v 1.7 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <openssl/ct.h> 56#include <openssl/ct.h>
62#include <openssl/err.h> 57#include <openssl/err.h>
63 58
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h
index 4e4fdcd982..7b226a70c8 100644
--- a/src/lib/libcrypto/dh/dh.h
+++ b/src/lib/libcrypto/dh/dh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.h,v 1.34 2022/07/07 13:01:28 tb Exp $ */ 1/* $OpenBSD: dh.h,v 1.35 2022/07/12 14:42:49 kn 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 *
@@ -196,10 +196,6 @@ int DHparams_print(char *bp, const DH *x);
196#define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2) 196#define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2)
197 197
198 198
199/* BEGIN ERROR CODES */
200/* The following lines are auto generated by the script mkerr.pl. Any changes
201 * made after this point may be overwritten when the script is next run.
202 */
203void ERR_load_DH_strings(void); 199void ERR_load_DH_strings(void);
204 200
205/* Error codes for the DH functions. */ 201/* Error codes for the DH functions. */
diff --git a/src/lib/libcrypto/dh/dh_err.c b/src/lib/libcrypto/dh/dh_err.c
index a387c37cca..db66d68e3b 100644
--- a/src/lib/libcrypto/dh/dh_err.c
+++ b/src/lib/libcrypto/dh/dh_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_err.c,v 1.17 2022/01/10 12:00:52 tb Exp $ */ 1/* $OpenBSD: dh_err.c,v 1.18 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/dh.h> 61#include <openssl/dh.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DH,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DH,func,0)
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h
index 75fb2d004b..eab35a6f6f 100644
--- a/src/lib/libcrypto/dsa/dsa.h
+++ b/src/lib/libcrypto/dsa/dsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa.h,v 1.38 2022/07/07 13:01:28 tb Exp $ */ 1/* $OpenBSD: dsa.h,v 1.39 2022/07/12 14:42:49 kn 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 *
@@ -234,10 +234,6 @@ int DSA_meth_set_finish(DSA_METHOD *meth, int (*finish)(DSA *));
234#define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) 234#define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2)
235#define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) 235#define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3)
236 236
237/* BEGIN ERROR CODES */
238/* The following lines are auto generated by the script mkerr.pl. Any changes
239 * made after this point may be overwritten when the script is next run.
240 */
241void ERR_load_DSA_strings(void); 237void ERR_load_DSA_strings(void);
242 238
243/* Error codes for the DSA functions. */ 239/* Error codes for the DSA functions. */
diff --git a/src/lib/libcrypto/dsa/dsa_err.c b/src/lib/libcrypto/dsa/dsa_err.c
index 2dcddcbf77..494773c86d 100644
--- a/src/lib/libcrypto/dsa/dsa_err.c
+++ b/src/lib/libcrypto/dsa/dsa_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_err.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: dsa_err.c,v 1.16 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/dsa.h> 61#include <openssl/dsa.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSA,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSA,func,0)
diff --git a/src/lib/libcrypto/dso/dso.h b/src/lib/libcrypto/dso/dso.h
index 6c982c9f97..ae07b0a5f7 100644
--- a/src/lib/libcrypto/dso/dso.h
+++ b/src/lib/libcrypto/dso/dso.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dso.h,v 1.12 2016/03/15 20:50:22 krw Exp $ */ 1/* $OpenBSD: dso.h,v 1.13 2022/07/12 14:42:49 kn Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -302,10 +302,6 @@ int DSO_pathbyaddr(void *addr, char *path, int sz);
302 * itself or libsocket. */ 302 * itself or libsocket. */
303void *DSO_global_lookup(const char *name); 303void *DSO_global_lookup(const char *name);
304 304
305/* BEGIN ERROR CODES */
306/* The following lines are auto generated by the script mkerr.pl. Any changes
307 * made after this point may be overwritten when the script is next run.
308 */
309void ERR_load_DSO_strings(void); 305void ERR_load_DSO_strings(void);
310 306
311/* Error codes for the DSO functions. */ 307/* Error codes for the DSO functions. */
diff --git a/src/lib/libcrypto/dso/dso_err.c b/src/lib/libcrypto/dso/dso_err.c
index be6375a3a7..2eee155b57 100644
--- a/src/lib/libcrypto/dso/dso_err.c
+++ b/src/lib/libcrypto/dso/dso_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dso_err.c,v 1.9 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: dso_err.c,v 1.10 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/dso.h> 61#include <openssl/dso.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSO,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSO,func,0)
diff --git a/src/lib/libcrypto/ec/ec.h b/src/lib/libcrypto/ec/ec.h
index d8ff42c0c9..52c8f2f329 100644
--- a/src/lib/libcrypto/ec/ec.h
+++ b/src/lib/libcrypto/ec/ec.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec.h,v 1.27 2021/09/12 16:23:19 tb Exp $ */ 1/* $OpenBSD: ec.h,v 1.28 2022/07/12 14:42:49 kn Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -1116,10 +1116,6 @@ EC_KEY *ECParameters_dup(EC_KEY *key);
1116#define EVP_PKEY_ECDH_KDF_NONE 1 1116#define EVP_PKEY_ECDH_KDF_NONE 1
1117#define EVP_PKEY_ECDH_KDF_X9_63 2 1117#define EVP_PKEY_ECDH_KDF_X9_63 2
1118 1118
1119/* BEGIN ERROR CODES */
1120/* The following lines are auto generated by the script mkerr.pl. Any changes
1121 * made after this point may be overwritten when the script is next run.
1122 */
1123void ERR_load_EC_strings(void); 1119void ERR_load_EC_strings(void);
1124 1120
1125/* Error codes for the EC functions. */ 1121/* Error codes for the EC functions. */
diff --git a/src/lib/libcrypto/ec/ec_err.c b/src/lib/libcrypto/ec/ec_err.c
index 95c15a1110..d8ead9636c 100644
--- a/src/lib/libcrypto/ec/ec_err.c
+++ b/src/lib/libcrypto/ec/ec_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_err.c,v 1.12 2019/09/29 10:09:09 tb Exp $ */ 1/* $OpenBSD: ec_err.c,v 1.13 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/ec.h> 61#include <openssl/ec.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_EC,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_EC,func,0)
diff --git a/src/lib/libcrypto/ecdh/ecdh.h b/src/lib/libcrypto/ecdh/ecdh.h
index ccc1312fd8..b39a90f165 100644
--- a/src/lib/libcrypto/ecdh/ecdh.h
+++ b/src/lib/libcrypto/ecdh/ecdh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecdh.h,v 1.5 2015/09/13 12:03:07 jsing Exp $ */ 1/* $OpenBSD: ecdh.h,v 1.6 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -102,10 +102,6 @@ int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
102void *ECDH_get_ex_data(EC_KEY *d, int idx); 102void *ECDH_get_ex_data(EC_KEY *d, int idx);
103 103
104 104
105/* BEGIN ERROR CODES */
106/* The following lines are auto generated by the script mkerr.pl. Any changes
107 * made after this point may be overwritten when the script is next run.
108 */
109void ERR_load_ECDH_strings(void); 105void ERR_load_ECDH_strings(void);
110 106
111/* Error codes for the ECDH functions. */ 107/* Error codes for the ECDH functions. */
diff --git a/src/lib/libcrypto/ecdh/ech_err.c b/src/lib/libcrypto/ecdh/ech_err.c
index 149c2a8505..e0cfddfe9c 100644
--- a/src/lib/libcrypto/ecdh/ech_err.c
+++ b/src/lib/libcrypto/ecdh/ech_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_err.c,v 1.6 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: ech_err.c,v 1.7 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/ecdh.h> 61#include <openssl/ecdh.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDH,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDH,func,0)
diff --git a/src/lib/libcrypto/ecdsa/ecdsa.h b/src/lib/libcrypto/ecdsa/ecdsa.h
index eccca65b5a..29ee8729ed 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.11 2022/01/14 08:31:03 tb Exp $ */ 1/* $OpenBSD: ecdsa.h,v 1.12 2022/07/12 14:42:49 kn Exp $ */
2/** 2/**
3 * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions 3 * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
4 * \author Written by Nils Larsch for the OpenSSL project 4 * \author Written by Nils Larsch for the OpenSSL project
@@ -293,11 +293,6 @@ void EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth,
293 int (**pverify_sig)(const unsigned char *dgst, int dgst_len, 293 int (**pverify_sig)(const unsigned char *dgst, int dgst_len,
294 const ECDSA_SIG *sig, EC_KEY *eckey)); 294 const ECDSA_SIG *sig, EC_KEY *eckey));
295 295
296
297/* BEGIN ERROR CODES */
298/* The following lines are auto generated by the script mkerr.pl. Any changes
299 * made after this point may be overwritten when the script is next run.
300 */
301void ERR_load_ECDSA_strings(void); 296void ERR_load_ECDSA_strings(void);
302 297
303/* Error codes for the ECDSA functions. */ 298/* Error codes for the ECDSA functions. */
diff --git a/src/lib/libcrypto/ecdsa/ecs_err.c b/src/lib/libcrypto/ecdsa/ecs_err.c
index ac8850dba5..c839c35221 100644
--- a/src/lib/libcrypto/ecdsa/ecs_err.c
+++ b/src/lib/libcrypto/ecdsa/ecs_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_err.c,v 1.6 2022/01/27 20:31:21 tb Exp $ */ 1/* $OpenBSD: ecs_err.c,v 1.7 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/ecdsa.h> 60#include <openssl/ecdsa.h>
66#include <openssl/err.h> 61#include <openssl/err.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDSA,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDSA,func,0)
diff --git a/src/lib/libcrypto/engine/eng_err.c b/src/lib/libcrypto/engine/eng_err.c
index b604cbba9e..5f86a41540 100644
--- a/src/lib/libcrypto/engine/eng_err.c
+++ b/src/lib/libcrypto/engine/eng_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_err.c,v 1.11 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: eng_err.c,v 1.12 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2010 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2010 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/engine.h> 61#include <openssl/engine.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ENGINE,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ENGINE,func,0)
diff --git a/src/lib/libcrypto/engine/engine.h b/src/lib/libcrypto/engine/engine.h
index dc14be8e38..5c21647fe3 100644
--- a/src/lib/libcrypto/engine/engine.h
+++ b/src/lib/libcrypto/engine/engine.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: engine.h,v 1.33 2019/01/19 01:07:00 tb Exp $ */ 1/* $OpenBSD: engine.h,v 1.34 2022/07/12 14:42:49 kn Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -716,10 +716,6 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
716 * values. */ 716 * values. */
717 void *ENGINE_get_static_state(void); 717 void *ENGINE_get_static_state(void);
718 718
719/* BEGIN ERROR CODES */
720/* The following lines are auto generated by the script mkerr.pl. Any changes
721 * made after this point may be overwritten when the script is next run.
722 */
723void ERR_load_ENGINE_strings(void); 719void ERR_load_ENGINE_strings(void);
724 720
725/* Error codes for the ENGINE functions. */ 721/* Error codes for the ENGINE functions. */
diff --git a/src/lib/libcrypto/err/openssl.ec b/src/lib/libcrypto/err/openssl.ec
deleted file mode 100644
index dcebbba6c4..0000000000
--- a/src/lib/libcrypto/err/openssl.ec
+++ /dev/null
@@ -1,96 +0,0 @@
1# crypto/err/openssl.ec
2
3# configuration file for util/mkerr.pl
4
5# files that may have to be rewritten by util/mkerr.pl
6L ERR NONE NONE
7L BN crypto/bn/bn.h crypto/bn/bn_err.c
8L RSA crypto/rsa/rsa.h crypto/rsa/rsa_err.c
9L DH crypto/dh/dh.h crypto/dh/dh_err.c
10L EVP crypto/evp/evp.h crypto/evp/evp_err.c
11L BUF crypto/buffer/buffer.h crypto/buffer/buf_err.c
12L OBJ crypto/objects/objects.h crypto/objects/obj_err.c
13L PEM crypto/pem/pem.h crypto/pem/pem_err.c
14L DSA crypto/dsa/dsa.h crypto/dsa/dsa_err.c
15L X509 crypto/x509/x509.h crypto/x509/x509_err.c
16L ASN1 crypto/asn1/asn1.h crypto/asn1/asn1_err.c
17L CONF crypto/conf/conf.h crypto/conf/conf_err.c
18L CRYPTO crypto/crypto.h crypto/cpt_err.c
19L EC crypto/ec/ec.h crypto/ec/ec_err.c
20L SSL ssl/ssl.h ssl/ssl_err.c
21L BIO crypto/bio/bio.h crypto/bio/bio_err.c
22L PKCS7 crypto/pkcs7/pkcs7.h crypto/pkcs7/pkcs7err.c
23L X509V3 crypto/x509v3/x509v3.h crypto/x509v3/v3err.c
24L PKCS12 crypto/pkcs12/pkcs12.h crypto/pkcs12/pk12err.c
25L RAND crypto/rand/rand.h crypto/rand/rand_err.c
26L DSO crypto/dso/dso.h crypto/dso/dso_err.c
27L ENGINE crypto/engine/engine.h crypto/engine/eng_err.c
28L OCSP crypto/ocsp/ocsp.h crypto/ocsp/ocsp_err.c
29L UI crypto/ui/ui.h crypto/ui/ui_err.c
30L COMP crypto/comp/comp.h crypto/comp/comp_err.c
31L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c
32L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c
33L STORE crypto/store/store.h crypto/store/str_err.c
34L TS crypto/ts/ts.h crypto/ts/ts_err.c
35L HMAC crypto/hmac/hmac.h crypto/hmac/hmac_err.c
36L CMS crypto/cms/cms.h crypto/cms/cms_err.c
37L GOST crypto/gost/gost.h crypto/gost/gost_err.c
38
39# additional header files to be scanned for function names
40L NONE crypto/x509/x509_vfy.h NONE
41L NONE crypto/ec/ec_lcl.h NONE
42L NONE crypto/asn1/asn_lcl.h NONE
43L NONE crypto/cms/cms_lcl.h NONE
44
45
46F RSAREF_F_RSA_BN2BIN
47F RSAREF_F_RSA_PRIVATE_DECRYPT
48F RSAREF_F_RSA_PRIVATE_ENCRYPT
49F RSAREF_F_RSA_PUBLIC_DECRYPT
50F RSAREF_F_RSA_PUBLIC_ENCRYPT
51#F SSL_F_CLIENT_CERTIFICATE
52
53R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010
54R SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020
55R SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021
56R SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022
57R SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030
58R SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040
59R SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041
60R SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042
61R SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043
62R SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044
63R SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045
64R SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046
65R SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047
66R SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048
67R SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049
68R SSL_R_TLSV1_ALERT_DECODE_ERROR 1050
69R SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051
70R SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060
71R SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070
72R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071
73R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080
74R SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
75R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100
76R SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110
77R SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111
78R SSL_R_TLSV1_UNRECOGNIZED_NAME 1112
79R SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113
80R SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114
81
82R RSAREF_R_CONTENT_ENCODING 0x0400
83R RSAREF_R_DATA 0x0401
84R RSAREF_R_DIGEST_ALGORITHM 0x0402
85R RSAREF_R_ENCODING 0x0403
86R RSAREF_R_KEY 0x0404
87R RSAREF_R_KEY_ENCODING 0x0405
88R RSAREF_R_LEN 0x0406
89R RSAREF_R_MODULUS_LEN 0x0407
90R RSAREF_R_NEED_RANDOM 0x0408
91R RSAREF_R_PRIVATE_KEY 0x0409
92R RSAREF_R_PUBLIC_KEY 0x040a
93R RSAREF_R_SIGNATURE 0x040b
94R RSAREF_R_SIGNATURE_ENCODING 0x040c
95R RSAREF_R_ENCRYPTION_ALGORITHM 0x040d
96
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 0574556b63..f016b6377c 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp.h,v 1.102 2022/07/07 13:01:28 tb Exp $ */ 1/* $OpenBSD: evp.h,v 1.103 2022/07/12 14:42:49 kn 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 *
@@ -1262,10 +1262,6 @@ int EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, unsigned char *out,
1262 1262
1263void EVP_add_alg_module(void); 1263void EVP_add_alg_module(void);
1264 1264
1265/* BEGIN ERROR CODES */
1266/* The following lines are auto generated by the script mkerr.pl. Any changes
1267 * made after this point may be overwritten when the script is next run.
1268 */
1269void ERR_load_EVP_strings(void); 1265void ERR_load_EVP_strings(void);
1270 1266
1271/* Error codes for the EVP functions. */ 1267/* Error codes for the EVP functions. */
diff --git a/src/lib/libcrypto/evp/evp_err.c b/src/lib/libcrypto/evp/evp_err.c
index 07ece82c3a..4feea1aabf 100644
--- a/src/lib/libcrypto/evp/evp_err.c
+++ b/src/lib/libcrypto/evp/evp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_err.c,v 1.27 2021/03/29 15:57:23 tb Exp $ */ 1/* $OpenBSD: evp_err.c,v 1.28 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/evp.h> 61#include <openssl/evp.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_EVP,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_EVP,func,0)
diff --git a/src/lib/libcrypto/gost/gost.h b/src/lib/libcrypto/gost/gost.h
index 092f96fb60..c7d9d25b2b 100644
--- a/src/lib/libcrypto/gost/gost.h
+++ b/src/lib/libcrypto/gost/gost.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: gost.h,v 1.3 2016/09/04 17:02:31 jsing Exp $ */ 1/* $OpenBSD: gost.h,v 1.4 2022/07/12 14:42:49 kn Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
4 * Copyright (c) 2005-2006 Cryptocom LTD 4 * Copyright (c) 2005-2006 Cryptocom LTD
@@ -199,10 +199,6 @@ size_t GOST_KEY_get_size(const GOST_KEY * r);
199#define GOST_SIG_FORMAT_SR_BE 0 199#define GOST_SIG_FORMAT_SR_BE 0
200#define GOST_SIG_FORMAT_RS_LE 1 200#define GOST_SIG_FORMAT_RS_LE 1
201 201
202/* BEGIN ERROR CODES */
203/* The following lines are auto generated by the script mkerr.pl. Any changes
204 * made after this point may be overwritten when the script is next run.
205 */
206void ERR_load_GOST_strings(void); 202void ERR_load_GOST_strings(void);
207 203
208/* Error codes for the GOST functions. */ 204/* Error codes for the GOST functions. */
diff --git a/src/lib/libcrypto/gost/gost_err.c b/src/lib/libcrypto/gost/gost_err.c
index e7111dd34b..0c46dbc36c 100644
--- a/src/lib/libcrypto/gost/gost_err.c
+++ b/src/lib/libcrypto/gost/gost_err.c
@@ -53,16 +53,10 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62#include <openssl/err.h> 57#include <openssl/err.h>
63#include <openssl/gost.h> 58#include <openssl/gost.h>
64 59
65/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 60#ifndef OPENSSL_NO_ERR
67 61
68#define ERR_FUNC(func) ERR_PACK(ERR_LIB_GOST,func,0) 62#define ERR_FUNC(func) ERR_PACK(ERR_LIB_GOST,func,0)
diff --git a/src/lib/libcrypto/kdf/kdf.h b/src/lib/libcrypto/kdf/kdf.h
index cc506e51bf..f823bf99e2 100644
--- a/src/lib/libcrypto/kdf/kdf.h
+++ b/src/lib/libcrypto/kdf/kdf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: kdf.h,v 1.7 2022/05/05 08:24:14 tb Exp $ */ 1/* $OpenBSD: kdf.h,v 1.8 2022/07/12 14:42:49 kn Exp $ */
2/* 2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
4 * project. 4 * project.
@@ -89,10 +89,6 @@ extern "C" {
89 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 89 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \
90 EVP_PKEY_CTRL_HKDF_MODE, mode, NULL) 90 EVP_PKEY_CTRL_HKDF_MODE, mode, NULL)
91 91
92/*
93 * Generated by util/mkerr.pl DO NOT EDIT
94 */
95
96int ERR_load_KDF_strings(void); 92int ERR_load_KDF_strings(void);
97 93
98/* 94/*
diff --git a/src/lib/libcrypto/kdf/kdf_err.c b/src/lib/libcrypto/kdf/kdf_err.c
index 703690a0d5..4dd323701a 100644
--- a/src/lib/libcrypto/kdf/kdf_err.c
+++ b/src/lib/libcrypto/kdf/kdf_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kdf_err.c,v 1.8 2022/05/05 08:24:14 tb Exp $ */ 1/* $OpenBSD: kdf_err.c,v 1.9 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,10 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/*
57 * Generated by util/mkerr.pl DO NOT EDIT
58 */
59
60#include <openssl/err.h> 56#include <openssl/err.h>
61#include <openssl/kdf.h> 57#include <openssl/kdf.h>
62 58
diff --git a/src/lib/libcrypto/man/ERR.3 b/src/lib/libcrypto/man/ERR.3
index 6d42d875a2..b1be67a037 100644
--- a/src/lib/libcrypto/man/ERR.3
+++ b/src/lib/libcrypto/man/ERR.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ERR.3,v 1.8 2019/06/10 09:49:48 schwarze Exp $ 1.\" $OpenBSD: ERR.3,v 1.9 2022/07/12 14:42:49 kn Exp $
2.\" OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700 2.\" OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org> and 4.\" This file was written by Ulf Moeller <ulf@openssl.org> and
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: June 10 2019 $ 52.Dd $Mdocdate: July 12 2022 $
53.Dt ERR 3 53.Dt ERR 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -171,14 +171,6 @@ definitions it uses.
171.Sh USING ERROR CODES IN EXTERNAL LIBRARIES 171.Sh USING ERROR CODES IN EXTERNAL LIBRARIES
172It is also possible to use OpenSSL's error code scheme in external 172It is also possible to use OpenSSL's error code scheme in external
173libraries. 173libraries.
174The library needs to load its own codes and call the OpenSSL error code
175insertion script
176.Pa mkerr.pl
177explicitly to add codes to the header file and generate the C error code
178file.
179This will normally be done if the external library needs to generate new
180ASN.1 structures but it can also be used to add more general purpose
181error code handling.
182.Sh INTERNALS 174.Sh INTERNALS
183The error queues are stored in a hash table with one 175The error queues are stored in a hash table with one
184.Vt ERR_STATE 176.Vt ERR_STATE
diff --git a/src/lib/libcrypto/objects/obj_err.c b/src/lib/libcrypto/objects/obj_err.c
index e1413190eb..50e2a0e0c4 100644
--- a/src/lib/libcrypto/objects/obj_err.c
+++ b/src/lib/libcrypto/objects/obj_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: obj_err.c,v 1.12 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: obj_err.c,v 1.13 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/objects.h> 61#include <openssl/objects.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_OBJ,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_OBJ,func,0)
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h
index 918928e2f0..fe3d7774d3 100644
--- a/src/lib/libcrypto/objects/objects.h
+++ b/src/lib/libcrypto/objects/objects.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: objects.h,v 1.17 2022/01/14 08:56:00 tb Exp $ */ 1/* $OpenBSD: objects.h,v 1.18 2022/07/12 14:42:49 kn 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 *
@@ -1038,10 +1038,6 @@ extern int obj_cleanup_defer;
1038void check_defer(int nid); 1038void check_defer(int nid);
1039#endif 1039#endif
1040 1040
1041/* BEGIN ERROR CODES */
1042/* The following lines are auto generated by the script mkerr.pl. Any changes
1043 * made after this point may be overwritten when the script is next run.
1044 */
1045void ERR_load_OBJ_strings(void); 1041void ERR_load_OBJ_strings(void);
1046 1042
1047/* Error codes for the OBJ functions. */ 1043/* Error codes for the OBJ functions. */
diff --git a/src/lib/libcrypto/ocsp/ocsp.h b/src/lib/libcrypto/ocsp/ocsp.h
index f869f8aa96..691ee4a3dc 100644
--- a/src/lib/libcrypto/ocsp/ocsp.h
+++ b/src/lib/libcrypto/ocsp/ocsp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp.h,v 1.19 2022/01/14 08:32:26 tb Exp $ */ 1/* $OpenBSD: ocsp.h,v 1.20 2022/07/12 14:42:49 kn Exp $ */
2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL 2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
3 * project. */ 3 * project. */
4 4
@@ -421,10 +421,6 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags);
421int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, 421int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
422 X509_STORE *st, unsigned long flags); 422 X509_STORE *st, unsigned long flags);
423 423
424/* BEGIN ERROR CODES */
425/* The following lines are auto generated by the script mkerr.pl. Any changes
426 * made after this point may be overwritten when the script is next run.
427 */
428void ERR_load_OCSP_strings(void); 424void ERR_load_OCSP_strings(void);
429 425
430/* Error codes for the OCSP functions. */ 426/* Error codes for the OCSP functions. */
diff --git a/src/lib/libcrypto/ocsp/ocsp_err.c b/src/lib/libcrypto/ocsp/ocsp_err.c
index 9e3237f6a4..7cf5b7e8a1 100644
--- a/src/lib/libcrypto/ocsp/ocsp_err.c
+++ b/src/lib/libcrypto/ocsp/ocsp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp_err.c,v 1.8 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: ocsp_err.c,v 1.9 2022/07/12 14:42:49 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/ocsp.h> 61#include <openssl/ocsp.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_OCSP,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_OCSP,func,0)
diff --git a/src/lib/libcrypto/pem/pem.h b/src/lib/libcrypto/pem/pem.h
index 95f1e030b1..a0f7d78c01 100644
--- a/src/lib/libcrypto/pem/pem.h
+++ b/src/lib/libcrypto/pem/pem.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem.h,v 1.23 2022/01/14 07:52:24 tb Exp $ */ 1/* $OpenBSD: pem.h,v 1.24 2022/07/12 14:42:50 kn Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -516,10 +516,6 @@ int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb,
516#endif 516#endif
517 517
518 518
519/* BEGIN ERROR CODES */
520/* The following lines are auto generated by the script mkerr.pl. Any changes
521 * made after this point may be overwritten when the script is next run.
522 */
523void ERR_load_PEM_strings(void); 519void ERR_load_PEM_strings(void);
524 520
525/* Error codes for the PEM functions. */ 521/* Error codes for the PEM functions. */
diff --git a/src/lib/libcrypto/pem/pem_err.c b/src/lib/libcrypto/pem/pem_err.c
index 8d3c278b54..d817cafff0 100644
--- a/src/lib/libcrypto/pem/pem_err.c
+++ b/src/lib/libcrypto/pem/pem_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_err.c,v 1.12 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: pem_err.c,v 1.13 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/pem.h> 61#include <openssl/pem.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_PEM,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_PEM,func,0)
diff --git a/src/lib/libcrypto/pkcs12/pk12err.c b/src/lib/libcrypto/pkcs12/pk12err.c
index c1d075a0ff..23166bfd59 100644
--- a/src/lib/libcrypto/pkcs12/pk12err.c
+++ b/src/lib/libcrypto/pkcs12/pk12err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk12err.c,v 1.11 2020/06/05 16:51:12 jsing Exp $ */ 1/* $OpenBSD: pk12err.c,v 1.12 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_PKCS12,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_PKCS12,func,0)
diff --git a/src/lib/libcrypto/pkcs12/pkcs12.h b/src/lib/libcrypto/pkcs12/pkcs12.h
index 56635f9d7e..920b4be202 100644
--- a/src/lib/libcrypto/pkcs12/pkcs12.h
+++ b/src/lib/libcrypto/pkcs12/pkcs12.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs12.h,v 1.24 2018/05/30 15:32:11 tb Exp $ */ 1/* $OpenBSD: pkcs12.h,v 1.25 2022/07/12 14:42:50 kn 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 1999. 3 * project 1999.
4 */ 4 */
@@ -283,10 +283,6 @@ PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12);
283PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12); 283PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);
284int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass); 284int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass);
285 285
286/* BEGIN ERROR CODES */
287/* The following lines are auto generated by the script mkerr.pl. Any changes
288 * made after this point may be overwritten when the script is next run.
289 */
290void ERR_load_PKCS12_strings(void); 286void ERR_load_PKCS12_strings(void);
291 287
292/* Error codes for the PKCS12 functions. */ 288/* Error codes for the PKCS12 functions. */
diff --git a/src/lib/libcrypto/pkcs7/pkcs7.h b/src/lib/libcrypto/pkcs7/pkcs7.h
index 520cc3c519..1a204c2858 100644
--- a/src/lib/libcrypto/pkcs7/pkcs7.h
+++ b/src/lib/libcrypto/pkcs7/pkcs7.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs7.h,v 1.18 2016/12/27 16:12:47 jsing Exp $ */ 1/* $OpenBSD: pkcs7.h,v 1.19 2022/07/12 14:42:50 kn 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 *
@@ -405,10 +405,6 @@ PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
405BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7); 405BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
406 406
407 407
408/* BEGIN ERROR CODES */
409/* The following lines are auto generated by the script mkerr.pl. Any changes
410 * made after this point may be overwritten when the script is next run.
411 */
412void ERR_load_PKCS7_strings(void); 408void ERR_load_PKCS7_strings(void);
413 409
414/* Error codes for the PKCS7 functions. */ 410/* Error codes for the PKCS7 functions. */
diff --git a/src/lib/libcrypto/pkcs7/pkcs7err.c b/src/lib/libcrypto/pkcs7/pkcs7err.c
index 251e781641..bd3791e358 100644
--- a/src/lib/libcrypto/pkcs7/pkcs7err.c
+++ b/src/lib/libcrypto/pkcs7/pkcs7err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs7err.c,v 1.12 2020/06/05 16:51:12 jsing Exp $ */ 1/* $OpenBSD: pkcs7err.c,v 1.13 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/pkcs7.h> 61#include <openssl/pkcs7.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_PKCS7,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_PKCS7,func,0)
diff --git a/src/lib/libcrypto/rand/rand.h b/src/lib/libcrypto/rand/rand.h
index fcb2e9218d..a0e9b47969 100644
--- a/src/lib/libcrypto/rand/rand.h
+++ b/src/lib/libcrypto/rand/rand.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand.h,v 1.22 2014/10/22 14:02:52 jsing Exp $ */ 1/* $OpenBSD: rand.h,v 1.23 2022/07/12 14:42:50 kn 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 *
@@ -101,10 +101,6 @@ int RAND_status(void);
101int RAND_poll(void); 101int RAND_poll(void);
102#endif 102#endif
103 103
104/* BEGIN ERROR CODES */
105/* The following lines are auto generated by the script mkerr.pl. Any changes
106 * made after this point may be overwritten when the script is next run.
107 */
108void ERR_load_RAND_strings(void); 104void ERR_load_RAND_strings(void);
109 105
110/* Error codes for the RAND functions. (no longer used) */ 106/* Error codes for the RAND functions. (no longer used) */
diff --git a/src/lib/libcrypto/rand/rand_err.c b/src/lib/libcrypto/rand/rand_err.c
index 1ac00be773..c57b9a8d63 100644
--- a/src/lib/libcrypto/rand/rand_err.c
+++ b/src/lib/libcrypto/rand/rand_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand_err.c,v 1.15 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: rand_err.c,v 1.16 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/rand.h> 61#include <openssl/rand.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0)
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h
index 888902d18c..73ec9d5a42 100644
--- a/src/lib/libcrypto/rsa/rsa.h
+++ b/src/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.h,v 1.57 2022/07/07 13:01:28 tb Exp $ */ 1/* $OpenBSD: rsa.h,v 1.58 2022/07/12 14:42:50 kn 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 *
@@ -475,10 +475,6 @@ int RSA_meth_set_verify(RSA_METHOD *rsa, int (*verify)(int dtype,
475 unsigned int siglen, const RSA *rsa)); 475 unsigned int siglen, const RSA *rsa));
476 476
477 477
478/* BEGIN ERROR CODES */
479/* The following lines are auto generated by the script mkerr.pl. Any changes
480 * made after this point may be overwritten when the script is next run.
481 */
482void ERR_load_RSA_strings(void); 478void ERR_load_RSA_strings(void);
483 479
484/* Error codes for the RSA functions. */ 480/* Error codes for the RSA functions. */
diff --git a/src/lib/libcrypto/rsa/rsa_err.c b/src/lib/libcrypto/rsa/rsa_err.c
index 46149370d8..79425c0f45 100644
--- a/src/lib/libcrypto/rsa/rsa_err.c
+++ b/src/lib/libcrypto/rsa/rsa_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_err.c,v 1.20 2019/11/01 15:13:05 jsing Exp $ */ 1/* $OpenBSD: rsa_err.c,v 1.21 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/rsa.h> 61#include <openssl/rsa.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RSA,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RSA,func,0)
diff --git a/src/lib/libcrypto/sm2/sm2.h b/src/lib/libcrypto/sm2/sm2.h
index 92eef8a6de..dee75eb68b 100644
--- a/src/lib/libcrypto/sm2/sm2.h
+++ b/src/lib/libcrypto/sm2/sm2.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sm2.h,v 1.1.1.1 2021/08/18 16:04:32 tb Exp $ */ 1/* $OpenBSD: sm2.h,v 1.2 2022/07/12 14:42:50 kn Exp $ */
2/* 2/*
3 * Copyright (c) 2017, 2019 Ribose Inc 3 * Copyright (c) 2017, 2019 Ribose Inc
4 * 4 *
@@ -59,10 +59,6 @@ int SM2_decrypt(const EC_KEY *key, const EVP_MD *digest,
59 const uint8_t *ciphertext, size_t ciphertext_len, uint8_t *ptext_buf, 59 const uint8_t *ciphertext, size_t ciphertext_len, uint8_t *ptext_buf,
60 size_t *ptext_len); 60 size_t *ptext_len);
61 61
62/* BEGIN ERROR CODES */
63/* The following lines are auto generated by the script mkerr.pl. Any changes
64 * made after this point may be overwritten when the script is next run.
65 */
66void ERR_load_SM2_strings(void); 62void ERR_load_SM2_strings(void);
67 63
68/* Error codes for the SM2 functions. */ 64/* Error codes for the SM2 functions. */
diff --git a/src/lib/libcrypto/sm2/sm2_err.c b/src/lib/libcrypto/sm2/sm2_err.c
index d34123cbf9..a7dc1e0d9e 100644
--- a/src/lib/libcrypto/sm2/sm2_err.c
+++ b/src/lib/libcrypto/sm2/sm2_err.c
@@ -1,6 +1,5 @@
1/* $OpenBSD: sm2_err.c,v 1.1.1.1 2021/08/18 16:04:32 tb Exp $ */ 1/* $OpenBSD: sm2_err.c,v 1.2 2022/07/12 14:42:50 kn Exp $ */
2/* 2/*
3 * Generated by util/mkerr.pl DO NOT EDIT
4 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. 3 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
5 * 4 *
6 * Licensed under the OpenSSL license (the "License"). You may not use 5 * Licensed under the OpenSSL license (the "License"). You may not use
diff --git a/src/lib/libcrypto/ts/ts.h b/src/lib/libcrypto/ts/ts.h
index fa8eb949a4..405d29e166 100644
--- a/src/lib/libcrypto/ts/ts.h
+++ b/src/lib/libcrypto/ts/ts.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts.h,v 1.10 2018/05/13 15:35:46 tb Exp $ */ 1/* $OpenBSD: ts.h,v 1.11 2022/07/12 14:42:50 kn Exp $ */
2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL
3 * project 2002, 2003, 2004. 3 * project 2002, 2003, 2004.
4 */ 4 */
@@ -732,11 +732,6 @@ int TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx);
732int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, 732int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section,
733 TS_RESP_CTX *ctx); 733 TS_RESP_CTX *ctx);
734 734
735/* -------------------------------------------------- */
736/* BEGIN ERROR CODES */
737/* The following lines are auto generated by the script mkerr.pl. Any changes
738 * made after this point may be overwritten when the script is next run.
739 */
740void ERR_load_TS_strings(void); 735void ERR_load_TS_strings(void);
741 736
742/* Error codes for the TS functions. */ 737/* Error codes for the TS functions. */
diff --git a/src/lib/libcrypto/ts/ts_err.c b/src/lib/libcrypto/ts/ts_err.c
index 4b89909384..ddd532a6a7 100644
--- a/src/lib/libcrypto/ts/ts_err.c
+++ b/src/lib/libcrypto/ts/ts_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_err.c,v 1.5 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: ts_err.c,v 1.6 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/ts.h> 61#include <openssl/ts.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_TS,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_TS,func,0)
diff --git a/src/lib/libcrypto/ui/ui.h b/src/lib/libcrypto/ui/ui.h
index 5ca65b0a36..c6888d22d6 100644
--- a/src/lib/libcrypto/ui/ui.h
+++ b/src/lib/libcrypto/ui/ui.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui.h,v 1.12 2020/09/24 19:20:32 tb Exp $ */ 1/* $OpenBSD: ui.h,v 1.13 2022/07/12 14:42:50 kn Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -371,11 +371,7 @@ int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
371int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, 371int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
372 int verify); 372 int verify);
373 373
374/* BEGIN ERROR CODES */
375/* 374/*
376 * The following lines are auto generated by the script mkerr.pl. Any changes
377 * made after this point may be overwritten when the script is next run.
378 */
379void ERR_load_UI_strings(void); 375void ERR_load_UI_strings(void);
380 376
381/* Error codes for the UI functions. */ 377/* Error codes for the UI functions. */
diff --git a/src/lib/libcrypto/ui/ui_err.c b/src/lib/libcrypto/ui/ui_err.c
index 8451d63253..691403aff6 100644
--- a/src/lib/libcrypto/ui/ui_err.c
+++ b/src/lib/libcrypto/ui/ui_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui_err.c,v 1.9 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: ui_err.c,v 1.10 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -65,7 +60,6 @@
65#include <openssl/err.h> 60#include <openssl/err.h>
66#include <openssl/ui.h> 61#include <openssl/ui.h>
67 62
68/* BEGIN ERROR CODES */
69#ifndef OPENSSL_NO_ERR 63#ifndef OPENSSL_NO_ERR
70 64
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_UI,func,0) 65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_UI,func,0)
diff --git a/src/lib/libcrypto/util/mkerr.pl b/src/lib/libcrypto/util/mkerr.pl
deleted file mode 100644
index aec401c773..0000000000
--- a/src/lib/libcrypto/util/mkerr.pl
+++ /dev/null
@@ -1,810 +0,0 @@
1#!/usr/local/bin/perl -w
2
3my $config = "crypto/err/openssl.ec";
4my $hprefix = "openssl/";
5my $debug = 0;
6my $rebuild = 0;
7my $static = 1;
8my $recurse = 0;
9my $reindex = 0;
10my $dowrite = 0;
11my $staticloader = "";
12
13my $pack_errcode;
14my $load_errcode;
15
16my $errcount;
17
18while (@ARGV) {
19 my $arg = $ARGV[0];
20 if($arg eq "-conf") {
21 shift @ARGV;
22 $config = shift @ARGV;
23 } elsif($arg eq "-hprefix") {
24 shift @ARGV;
25 $hprefix = shift @ARGV;
26 } elsif($arg eq "-debug") {
27 $debug = 1;
28 shift @ARGV;
29 } elsif($arg eq "-rebuild") {
30 $rebuild = 1;
31 shift @ARGV;
32 } elsif($arg eq "-recurse") {
33 $recurse = 1;
34 shift @ARGV;
35 } elsif($arg eq "-reindex") {
36 $reindex = 1;
37 shift @ARGV;
38 } elsif($arg eq "-nostatic") {
39 $static = 0;
40 shift @ARGV;
41 } elsif($arg eq "-staticloader") {
42 $staticloader = "static ";
43 shift @ARGV;
44 } elsif($arg eq "-write") {
45 $dowrite = 1;
46 shift @ARGV;
47 } elsif($arg eq "-help" || $arg eq "-h" || $arg eq "-?" || $arg eq "--help") {
48 print STDERR <<"EOF";
49mkerr.pl [options] ...
50
51Options:
52
53 -conf F Use the config file F instead of the default one:
54 crypto/err/openssl.ec
55
56 -hprefix P Prepend the filenames in generated #include <header>
57 statements with prefix P. Default: 'openssl/' (without
58 the quotes, naturally)
59
60 -debug Turn on debugging verbose output on stderr.
61
62 -rebuild Rebuild all header and C source files, irrespective of the
63 fact if any error or function codes have been added/removed.
64 Default: only update files for libraries which saw change
65 (of course, this requires '-write' as well, or no
66 files will be touched!)
67
68 -recurse scan a preconfigured set of directories / files for error and
69 function codes:
70 (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>, <apps/*.c>)
71 When this option is NOT specified, the filelist is taken from
72 the commandline instead. Here, wildcards may be embedded. (Be
73 sure to escape those to prevent the shell from expanding them
74 for you when you wish mkerr.pl to do so instead.)
75 Default: take file list to scan from the command line.
76
77 -reindex Discard the numeric values previously assigned to the error
78 and function codes as extracted from the scanned header files;
79 instead renumber all of them starting from 100. (Note that
80 the numbers assigned through 'R' records in the config file
81 remain intact.)
82 Default: keep previously assigned numbers. (You are warned
83 when collisions are detected.)
84
85 -nostatic Generates a different source code, where these additional
86 functions are generated for each library specified in the
87 config file:
88 void ERR_load_<LIB>_strings(void);
89 void ERR_unload_<LIB>_strings(void);
90 void ERR_<LIB>_error(int f, int r, char *fn, int ln);
91 #define <LIB>err(f,r) ERR_<LIB>_error(f,r,__FILE__,__LINE__)
92 while the code facilitates the use of these in an environment
93 where the error support routines are dynamically loaded at
94 runtime.
95 Default: 'static' code generation.
96
97 -staticloader Prefix generated functions with the 'static' scope modifier.
98 Default: don't write any scope modifier prefix.
99
100 -write Actually (over)write the generated code to the header and C
101 source files as assigned to each library through the config
102 file.
103 Default: don't write.
104
105 -help / -h / -? / --help Show this help text.
106
107 ... Additional arguments are added to the file list to scan,
108 assuming '-recurse' was NOT specified on the command line.
109
110EOF
111 exit 1;
112 } else {
113 last;
114 }
115}
116
117if($recurse) {
118 @source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>);
119} else {
120 @source = @ARGV;
121}
122
123# Read in the config file
124
125open(IN, "<$config") || die "Can't open config file $config";
126
127# Parse config file
128
129while(<IN>)
130{
131 if(/^L\s+(\S+)\s+(\S+)\s+(\S+)/) {
132 $hinc{$1} = $2;
133 $libinc{$2} = $1;
134 $cskip{$3} = $1;
135 if($3 ne "NONE") {
136 $csrc{$1} = $3;
137 $fmax{$1} = 100;
138 $rmax{$1} = 100;
139 $fassigned{$1} = ":";
140 $rassigned{$1} = ":";
141 $fnew{$1} = 0;
142 $rnew{$1} = 0;
143 }
144 } elsif (/^F\s+(\S+)/) {
145 # Add extra function with $1
146 } elsif (/^R\s+(\S+)\s+(\S+)/) {
147 $rextra{$1} = $2;
148 $rcodes{$1} = $2;
149 }
150}
151
152close IN;
153
154# Scan each header file in turn and make a list of error codes
155# and function names
156
157while (($hdr, $lib) = each %libinc)
158{
159 next if($hdr eq "NONE");
160 print STDERR "Scanning header file $hdr\n" if $debug;
161 my $line = "", $def= "", $linenr = 0, $gotfile = 0;
162 if (open(IN, "<$hdr")) {
163 $gotfile = 1;
164 while(<IN>) {
165 $linenr++;
166 print STDERR "line: $linenr\r" if $debug;
167
168 last if(/BEGIN\s+ERROR\s+CODES/);
169 if ($line ne '') {
170 $_ = $line . $_;
171 $line = '';
172 }
173
174 if (/\\$/) {
175 $line = $_;
176 next;
177 }
178
179 if(/\/\*/) {
180 if (not /\*\//) { # multiline comment...
181 $line = $_; # ... just accumulate
182 next;
183 } else {
184 s/\/\*.*?\*\///gs; # wipe it
185 }
186 }
187
188 if ($cpp) {
189 $cpp++ if /^#\s*if/;
190 $cpp-- if /^#\s*endif/;
191 next;
192 }
193 $cpp = 1 if /^#.*ifdef.*cplusplus/; # skip "C" declaration
194
195 next if (/^\#/); # skip preprocessor directives
196
197 s/{[^{}]*}//gs; # ignore {} blocks
198
199 if (/\{|\/\*/) { # Add a } so editor works...
200 $line = $_;
201 } else {
202 $def .= $_;
203 }
204 }
205 }
206
207 print STDERR " \r" if $debug;
208 $defnr = 0;
209 # Delete any DECLARE_ macros
210 $def =~ s/DECLARE_\w+\([\w,\s]+\)//gs;
211 foreach (split /;/, $def) {
212 $defnr++;
213 print STDERR "def: $defnr\r" if $debug;
214
215 # The goal is to collect function names from function declarations.
216
217 s/^[\n\s]*//g;
218 s/[\n\s]*$//g;
219
220 # Skip over recognized non-function declarations
221 next if(/typedef\W/ or /DECLARE_STACK_OF/ or /TYPEDEF_.*_OF/);
222
223 # Remove STACK_OF(foo)
224 s/STACK_OF\(\w+\)/void/;
225
226 # Reduce argument lists to empty ()
227 # fold round brackets recursively: (t(*v)(t),t) -> (t{}{},t) -> {}
228 while(/\(.*\)/s) {
229 s/\([^\(\)]+\)/\{\}/gs;
230 s/\(\s*\*\s*(\w+)\s*\{\}\s*\)/$1/gs; #(*f{}) -> f
231 }
232 # pretend as we didn't use curly braces: {} -> ()
233 s/\{\}/\(\)/gs;
234
235 if (/(\w+)\s*\(\).*/s) { # first token prior [first] () is
236 my $name = $1; # a function name!
237 $name =~ tr/[a-z]/[A-Z]/;
238 $ftrans{$name} = $1;
239 } elsif (/[\(\)]/ and not (/=/)) {
240 print STDERR "Header $hdr: cannot parse: $_;\n";
241 }
242 }
243
244 print STDERR " \r" if $debug;
245
246 next if $reindex;
247
248 # Scan function and reason codes and store them: keep a note of the
249 # maximum code used.
250
251 if ($gotfile) {
252 while(<IN>) {
253 if(/^\#define\s+(\S+)\s+(\S+)/) {
254 $name = $1;
255 $code = $2;
256 next if $name =~ /^${lib}err/;
257 unless($name =~ /^${lib}_([RF])_(\w+)$/) {
258 print STDERR "Invalid error code $name\n";
259 next;
260 }
261 if($1 eq "R") {
262 $rcodes{$name} = $code;
263 if ($rassigned{$lib} =~ /:$code:/) {
264 print STDERR "!! ERROR: $lib reason code $code assigned twice (collision at $name)\n";
265 ++$errcount;
266 }
267 $rassigned{$lib} .= "$code:";
268 if(!(exists $rextra{$name}) &&
269 ($code > $rmax{$lib}) ) {
270 $rmax{$lib} = $code;
271 }
272 } else {
273 if ($fassigned{$lib} =~ /:$code:/) {
274 print STDERR "!! ERROR: $lib function code $code assigned twice (collision at $name)\n";
275 ++$errcount;
276 }
277 $fassigned{$lib} .= "$code:";
278 if($code > $fmax{$lib}) {
279 $fmax{$lib} = $code;
280 }
281 $fcodes{$name} = $code;
282 }
283 }
284 }
285 }
286
287 if ($debug) {
288 if (defined($fmax{$lib})) {
289 print STDERR "Max function code fmax" . "{" . "$lib" . "} = $fmax{$lib}\n";
290 $fassigned{$lib} =~ m/^:(.*):$/;
291 @fassigned = sort {$a <=> $b} split(":", $1);
292 print STDERR " @fassigned\n";
293 }
294 if (defined($rmax{$lib})) {
295 print STDERR "Max reason code rmax" . "{" . "$lib" . "} = $rmax{$lib}\n";
296 $rassigned{$lib} =~ m/^:(.*):$/;
297 @rassigned = sort {$a <=> $b} split(":", $1);
298 print STDERR " @rassigned\n";
299 }
300 }
301
302 if ($lib eq "SSL") {
303 if ($rmax{$lib} >= 1000) {
304 print STDERR "!! ERROR: SSL error codes 1000+ are reserved for alerts.\n";
305 print STDERR "!! Any new alerts must be added to $config.\n";
306 ++$errcount;
307 print STDERR "\n";
308 }
309 }
310 close IN;
311}
312
313# Scan each C source file and look for function and reason codes
314# This is done by looking for strings that "look like" function or
315# reason codes: basically anything consisting of all upper case and
316# numerics which has _F_ or _R_ in it and which has the name of an
317# error library at the start. This seems to work fine except for the
318# oddly named structure BIO_F_CTX which needs to be ignored.
319# If a code doesn't exist in list compiled from headers then mark it
320# with the value "X" as a place holder to give it a value later.
321# Store all function and reason codes found in %ufcodes and %urcodes
322# so all those unreferenced can be printed out.
323
324
325foreach $file (@source) {
326 # Don't parse the error source file.
327 next if exists $cskip{$file};
328 print STDERR "File loaded: ".$file."\r" if $debug;
329 open(IN, "<$file") || die "Can't open source file $file\n";
330 while(<IN>) {
331 # skip obsoleted source files entirely!
332 last if(/^#error\s+obsolete/);
333
334 if(/(([A-Z0-9]+)_F_([A-Z0-9_]+))/) {
335 next unless exists $csrc{$2};
336 next if($1 eq "BIO_F_BUFFER_CTX");
337 $ufcodes{$1} = 1;
338 if(!exists $fcodes{$1}) {
339 $fcodes{$1} = "X";
340 $fnew{$2}++;
341 }
342 $notrans{$1} = 1 unless exists $ftrans{$3};
343 print STDERR "Function: $1\t= $fcodes{$1} (lib: $2, name: $3)\n" if $debug;
344 }
345 if(/(([A-Z0-9]+)_R_[A-Z0-9_]+)/) {
346 next unless exists $csrc{$2};
347 $urcodes{$1} = 1;
348 if(!exists $rcodes{$1}) {
349 $rcodes{$1} = "X";
350 $rnew{$2}++;
351 }
352 print STDERR "Reason: $1\t= $rcodes{$1} (lib: $2)\n" if $debug;
353 }
354 }
355 close IN;
356}
357print STDERR " \n" if $debug;
358
359# Now process each library in turn.
360
361foreach $lib (keys %csrc)
362{
363 my $hfile = $hinc{$lib};
364 my $cfile = $csrc{$lib};
365 if(!$fnew{$lib} && !$rnew{$lib}) {
366 print STDERR "$lib:\t\tNo new error codes\n";
367 next unless $rebuild;
368 } else {
369 print STDERR "$lib:\t\t$fnew{$lib} New Functions,";
370 print STDERR " $rnew{$lib} New Reasons.\n";
371 next unless $dowrite;
372 }
373
374 # If we get here then we have some new error codes so we
375 # need to rebuild the header file and C file.
376
377 # Make a sorted list of error and reason codes for later use.
378
379 my @function = sort grep(/^${lib}_/,keys %fcodes);
380 my @reasons = sort grep(/^${lib}_/,keys %rcodes);
381
382 # Rewrite the header file
383
384 if (open(IN, "<$hfile")) {
385 # Copy across the old file
386 while(<IN>) {
387 push @out, $_;
388 last if (/BEGIN ERROR CODES/);
389 }
390 close IN;
391 } else {
392 push @out,
393"/* ====================================================================\n",
394" * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved.\n",
395" *\n",
396" * Redistribution and use in source and binary forms, with or without\n",
397" * modification, are permitted provided that the following conditions\n",
398" * are met:\n",
399" *\n",
400" * 1. Redistributions of source code must retain the above copyright\n",
401" * notice, this list of conditions and the following disclaimer. \n",
402" *\n",
403" * 2. Redistributions in binary form must reproduce the above copyright\n",
404" * notice, this list of conditions and the following disclaimer in\n",
405" * the documentation and/or other materials provided with the\n",
406" * distribution.\n",
407" *\n",
408" * 3. All advertising materials mentioning features or use of this\n",
409" * software must display the following acknowledgment:\n",
410" * \"This product includes software developed by the OpenSSL Project\n",
411" * for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n",
412" *\n",
413" * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n",
414" * endorse or promote products derived from this software without\n",
415" * prior written permission. For written permission, please contact\n",
416" * openssl-core\@openssl.org.\n",
417" *\n",
418" * 5. Products derived from this software may not be called \"OpenSSL\"\n",
419" * nor may \"OpenSSL\" appear in their names without prior written\n",
420" * permission of the OpenSSL Project.\n",
421" *\n",
422" * 6. Redistributions of any form whatsoever must retain the following\n",
423" * acknowledgment:\n",
424" * \"This product includes software developed by the OpenSSL Project\n",
425" * for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n",
426" *\n",
427" * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n",
428" * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n",
429" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n",
430" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR\n",
431" * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n",
432" * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n",
433" * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n",
434" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n",
435" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n",
436" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n",
437" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n",
438" * OF THE POSSIBILITY OF SUCH DAMAGE.\n",
439" * ====================================================================\n",
440" *\n",
441" * This product includes cryptographic software written by Eric Young\n",
442" * (eay\@cryptsoft.com). This product includes software written by Tim\n",
443" * Hudson (tjh\@cryptsoft.com).\n",
444" *\n",
445" */\n",
446"\n",
447"#ifndef HEADER_${lib}_ERR_H\n",
448"#define HEADER_${lib}_ERR_H\n",
449"\n",
450"#ifdef __cplusplus\n",
451"extern \"C\" {\n",
452"#endif\n",
453"\n",
454"/* BEGIN ERROR CODES */\n";
455 }
456 open (OUT, ">$hfile") || die "Can't Open File $hfile for writing\n";
457
458 print OUT @out;
459 undef @out;
460 print OUT <<"EOF";
461/* The following lines are auto generated by the script mkerr.pl. Any changes
462 * made after this point may be overwritten when the script is next run.
463 */
464EOF
465 if($static) {
466 print OUT <<"EOF";
467${staticloader}void ERR_load_${lib}_strings(void);
468
469EOF
470 } else {
471 print OUT <<"EOF";
472${staticloader}void ERR_load_${lib}_strings(void);
473${staticloader}void ERR_unload_${lib}_strings(void);
474${staticloader}void ERR_${lib}_error(int function, int reason, char *file, int line);
475#define ${lib}err(f,r) ERR_${lib}_error((f),(r),__FILE__,__LINE__)
476
477EOF
478 }
479 print OUT <<"EOF";
480/* Error codes for the $lib functions. */
481
482/* Function codes. */
483EOF
484
485 foreach $i (@function) {
486 $z=6-int(length($i)/8);
487 if($fcodes{$i} eq "X") {
488 $fassigned{$lib} =~ m/^:([^:]*):/;
489 $findcode = $1;
490 if (!defined($findcode)) {
491 $findcode = $fmax{$lib};
492 }
493 while ($fassigned{$lib} =~ m/:$findcode:/) {
494 $findcode++;
495 }
496 $fcodes{$i} = $findcode;
497 $fassigned{$lib} .= "$findcode:";
498 print STDERR "New Function code $i\n" if $debug;
499 }
500 printf OUT "#define $i%s $fcodes{$i}\n","\t" x $z;
501 }
502
503 print OUT "\n/* Reason codes. */\n";
504
505 foreach $i (@reasons) {
506 $z=6-int(length($i)/8);
507 if($rcodes{$i} eq "X") {
508 $rassigned{$lib} =~ m/^:([^:]*):/;
509 $findcode = $1;
510 if (!defined($findcode)) {
511 $findcode = $rmax{$lib};
512 }
513 while ($rassigned{$lib} =~ m/:$findcode:/) {
514 $findcode++;
515 }
516 $rcodes{$i} = $findcode;
517 $rassigned{$lib} .= "$findcode:";
518 print STDERR "New Reason code $i\n" if $debug;
519 }
520 printf OUT "#define $i%s $rcodes{$i}\n","\t" x $z;
521 }
522 print OUT <<"EOF";
523
524#ifdef __cplusplus
525}
526#endif
527#endif
528EOF
529 close OUT;
530
531 # Rewrite the C source file containing the error details.
532
533 # First, read any existing reason string definitions:
534 my %err_reason_strings;
535 if (open(IN,"<$cfile")) {
536 while (<IN>) {
537 if (/\b(${lib}_R_\w*)\b.*\"(.*)\"/) {
538 $err_reason_strings{$1} = $2;
539 }
540 if (/\b${lib}_F_(\w*)\b.*\"(.*)\"/) {
541 if (!exists $ftrans{$1} && ($1 ne $2)) {
542 print STDERR "WARNING: Mismatched function string $2\n";
543 $ftrans{$1} = $2;
544 }
545 }
546 }
547 close(IN);
548 }
549
550
551 my $hincf;
552 if($static) {
553 $hfile =~ /([^\/]+)$/;
554 $hincf = "<${hprefix}$1>";
555 } else {
556 $hincf = "\"$hfile\"";
557 }
558
559 # If static we know the error code at compile time so use it
560 # in error definitions.
561
562 if ($static)
563 {
564 $pack_errcode = "ERR_LIB_${lib}";
565 $load_errcode = "0";
566 }
567 else
568 {
569 $pack_errcode = "0";
570 $load_errcode = "ERR_LIB_${lib}";
571 }
572
573
574 open (OUT,">$cfile") || die "Can't open $cfile for writing";
575
576 print OUT <<"EOF";
577/* $cfile */
578/* ====================================================================
579 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
580 *
581 * Redistribution and use in source and binary forms, with or without
582 * modification, are permitted provided that the following conditions
583 * are met:
584 *
585 * 1. Redistributions of source code must retain the above copyright
586 * notice, this list of conditions and the following disclaimer.
587 *
588 * 2. Redistributions in binary form must reproduce the above copyright
589 * notice, this list of conditions and the following disclaimer in
590 * the documentation and/or other materials provided with the
591 * distribution.
592 *
593 * 3. All advertising materials mentioning features or use of this
594 * software must display the following acknowledgment:
595 * "This product includes software developed by the OpenSSL Project
596 * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
597 *
598 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
599 * endorse or promote products derived from this software without
600 * prior written permission. For written permission, please contact
601 * openssl-core\@OpenSSL.org.
602 *
603 * 5. Products derived from this software may not be called "OpenSSL"
604 * nor may "OpenSSL" appear in their names without prior written
605 * permission of the OpenSSL Project.
606 *
607 * 6. Redistributions of any form whatsoever must retain the following
608 * acknowledgment:
609 * "This product includes software developed by the OpenSSL Project
610 * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
611 *
612 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
613 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
614 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
615 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
616 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
617 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
618 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
619 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
620 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
621 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
622 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
623 * OF THE POSSIBILITY OF SUCH DAMAGE.
624 * ====================================================================
625 *
626 * This product includes cryptographic software written by Eric Young
627 * (eay\@cryptsoft.com). This product includes software written by Tim
628 * Hudson (tjh\@cryptsoft.com).
629 *
630 */
631
632/* NOTE: this file was auto generated by the mkerr.pl script: any changes
633 * made to it will be overwritten when the script next updates this file,
634 * only reason strings will be preserved.
635 */
636
637#include <stdio.h>
638#include <openssl/err.h>
639#include $hincf
640
641/* BEGIN ERROR CODES */
642#ifndef OPENSSL_NO_ERR
643
644#define ERR_FUNC(func) ERR_PACK($pack_errcode,func,0)
645#define ERR_REASON(reason) ERR_PACK($pack_errcode,0,reason)
646
647static ERR_STRING_DATA ${lib}_str_functs[]=
648 {
649EOF
650 # Add each function code: if a function name is found then use it.
651 foreach $i (@function) {
652 my $fn;
653 $i =~ /^${lib}_F_(\S+)$/;
654 $fn = $1;
655 if(exists $ftrans{$fn}) {
656 $fn = $ftrans{$fn};
657 }
658# print OUT "{ERR_PACK($pack_errcode,$i,0),\t\"$fn\"},\n";
659 print OUT "{ERR_FUNC($i),\t\"$fn\"},\n";
660 }
661 print OUT <<"EOF";
662{0,NULL}
663 };
664
665static ERR_STRING_DATA ${lib}_str_reasons[]=
666 {
667EOF
668 # Add each reason code.
669 foreach $i (@reasons) {
670 my $rn;
671 my $rstr = "ERR_REASON($i)";
672 my $nspc = 0;
673 if (exists $err_reason_strings{$i}) {
674 $rn = $err_reason_strings{$i};
675 } else {
676 $i =~ /^${lib}_R_(\S+)$/;
677 $rn = $1;
678 $rn =~ tr/_[A-Z]/ [a-z]/;
679 }
680 $nspc = 40 - length($rstr) unless length($rstr) > 40;
681 $nspc = " " x $nspc;
682 print OUT "{${rstr}${nspc},\"$rn\"},\n";
683 }
684if($static) {
685 print OUT <<"EOF";
686{0,NULL}
687 };
688
689#endif
690
691${staticloader}void ERR_load_${lib}_strings(void)
692 {
693#ifndef OPENSSL_NO_ERR
694
695 if (ERR_func_error_string(${lib}_str_functs[0].error) == NULL)
696 {
697 ERR_load_strings($load_errcode,${lib}_str_functs);
698 ERR_load_strings($load_errcode,${lib}_str_reasons);
699 }
700#endif
701 }
702EOF
703} else {
704 print OUT <<"EOF";
705{0,NULL}
706 };
707
708#endif
709
710#ifdef ${lib}_LIB_NAME
711static ERR_STRING_DATA ${lib}_lib_name[]=
712 {
713{0 ,${lib}_LIB_NAME},
714{0,NULL}
715 };
716#endif
717
718
719static int ${lib}_lib_error_code=0;
720static int ${lib}_error_init=1;
721
722${staticloader}void ERR_load_${lib}_strings(void)
723 {
724 if (${lib}_lib_error_code == 0)
725 ${lib}_lib_error_code=ERR_get_next_error_library();
726
727 if (${lib}_error_init)
728 {
729 ${lib}_error_init=0;
730#ifndef OPENSSL_NO_ERR
731 ERR_load_strings(${lib}_lib_error_code,${lib}_str_functs);
732 ERR_load_strings(${lib}_lib_error_code,${lib}_str_reasons);
733#endif
734
735#ifdef ${lib}_LIB_NAME
736 ${lib}_lib_name->error = ERR_PACK(${lib}_lib_error_code,0,0);
737 ERR_load_strings(0,${lib}_lib_name);
738#endif
739 }
740 }
741
742${staticloader}void ERR_unload_${lib}_strings(void)
743 {
744 if (${lib}_error_init == 0)
745 {
746#ifndef OPENSSL_NO_ERR
747 ERR_unload_strings(${lib}_lib_error_code,${lib}_str_functs);
748 ERR_unload_strings(${lib}_lib_error_code,${lib}_str_reasons);
749#endif
750
751#ifdef ${lib}_LIB_NAME
752 ERR_unload_strings(0,${lib}_lib_name);
753#endif
754 ${lib}_error_init=1;
755 }
756 }
757
758${staticloader}void ERR_${lib}_error(int function, int reason, char *file, int line)
759 {
760 if (${lib}_lib_error_code == 0)
761 ${lib}_lib_error_code=ERR_get_next_error_library();
762 ERR_PUT_error(${lib}_lib_error_code,function,reason,file,line);
763 }
764EOF
765
766}
767
768 close OUT;
769 undef %err_reason_strings;
770}
771
772if($debug && %notrans) {
773 print STDERR "The following function codes were not translated:\n";
774 foreach(sort keys %notrans)
775 {
776 print STDERR "$_\n";
777 }
778}
779
780# Make a list of unreferenced function and reason codes
781
782foreach (keys %fcodes) {
783 push (@funref, $_) unless exists $ufcodes{$_};
784}
785
786foreach (keys %rcodes) {
787 push (@runref, $_) unless exists $urcodes{$_};
788}
789
790if($debug && defined(@funref) ) {
791 print STDERR "The following function codes were not referenced:\n";
792 foreach(sort @funref)
793 {
794 print STDERR "$_\n";
795 }
796}
797
798if($debug && defined(@runref) ) {
799 print STDERR "The following reason codes were not referenced:\n";
800 foreach(sort @runref)
801 {
802 print STDERR "$_\n";
803 }
804}
805
806if($errcount) {
807 print STDERR "There were errors, failing...\n\n";
808 exit $errcount;
809}
810
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h
index 8a78a4c38d..7795181efc 100644
--- a/src/lib/libcrypto/x509/x509.h
+++ b/src/lib/libcrypto/x509/x509.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509.h,v 1.89 2022/01/10 14:13:03 tb Exp $ */ 1/* $OpenBSD: x509.h,v 1.90 2022/07/12 14:42:50 kn 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 *
@@ -1123,10 +1123,6 @@ int X509_TRUST_get_trust(const X509_TRUST *xp);
1123int X509_up_ref(X509 *x); 1123int X509_up_ref(X509 *x);
1124STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); 1124STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain);
1125 1125
1126/* BEGIN ERROR CODES */
1127/* The following lines are auto generated by the script mkerr.pl. Any changes
1128 * made after this point may be overwritten when the script is next run.
1129 */
1130void ERR_load_X509_strings(void); 1126void ERR_load_X509_strings(void);
1131 1127
1132/* Error codes for the X509 functions. */ 1128/* Error codes for the X509 functions. */
diff --git a/src/lib/libcrypto/x509/x509_err.c b/src/lib/libcrypto/x509/x509_err.c
index a8e9155718..588ed85411 100644
--- a/src/lib/libcrypto/x509/x509_err.c
+++ b/src/lib/libcrypto/x509/x509_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_err.c,v 1.16 2021/11/10 13:57:42 schwarze Exp $ */ 1/* $OpenBSD: x509_err.c,v 1.17 2022/07/12 14:42:50 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
@@ -66,7 +61,6 @@
66#include <openssl/x509.h> 61#include <openssl/x509.h>
67#include <openssl/x509v3.h> 62#include <openssl/x509v3.h>
68 63
69/* BEGIN ERROR CODES */
70#ifndef OPENSSL_NO_ERR 64#ifndef OPENSSL_NO_ERR
71 65
72#define ERR_FUNC(func) ERR_PACK(ERR_LIB_X509,func,0) 66#define ERR_FUNC(func) ERR_PACK(ERR_LIB_X509,func,0)
diff --git a/src/lib/libcrypto/x509/x509v3.h b/src/lib/libcrypto/x509/x509v3.h
index c82ecae08a..2bc87f6047 100644
--- a/src/lib/libcrypto/x509/x509v3.h
+++ b/src/lib/libcrypto/x509/x509v3.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509v3.h,v 1.14 2022/01/14 09:01:36 tb Exp $ */ 1/* $OpenBSD: x509v3.h,v 1.15 2022/07/12 14:42:50 kn 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 1999. 3 * project 1999.
4 */ 4 */
@@ -1036,10 +1036,6 @@ int X509v3_addr_validate_resource_set(STACK_OF(X509) *chain, IPAddrBlocks *ext,
1036 1036
1037#endif /* !OPENSSL_NO_RFC3779 */ 1037#endif /* !OPENSSL_NO_RFC3779 */
1038 1038
1039/* BEGIN ERROR CODES */
1040/* The following lines are auto generated by the script mkerr.pl. Any changes
1041 * made after this point may be overwritten when the script is next run.
1042 */
1043void ERR_load_X509V3_strings(void); 1039void ERR_load_X509V3_strings(void);
1044 1040
1045/* Error codes for the X509V3 functions. */ 1041/* Error codes for the X509V3 functions. */
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index d9a56b1901..d475cb24ba 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.219 2022/07/07 13:02:59 tb Exp $ */ 1/* $OpenBSD: ssl.h,v 1.220 2022/07/12 14:42:48 kn 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 *
@@ -1600,10 +1600,6 @@ void SSL_get_peer_quic_transport_params(const SSL *ssl,
1600 const uint8_t **out_params, size_t *out_params_len); 1600 const uint8_t **out_params, size_t *out_params_len);
1601#endif 1601#endif
1602 1602
1603/* BEGIN ERROR CODES */
1604/* The following lines are auto generated by the script mkerr.pl. Any changes
1605 * made after this point may be overwritten when the script is next run.
1606 */
1607void ERR_load_SSL_strings(void); 1603void ERR_load_SSL_strings(void);
1608 1604
1609/* Error codes for the SSL functions. */ 1605/* Error codes for the SSL functions. */
diff --git a/src/lib/libssl/ssl_err.c b/src/lib/libssl/ssl_err.c
index 98ac620bd7..6078378568 100644
--- a/src/lib/libssl/ssl_err.c
+++ b/src/lib/libssl/ssl_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_err.c,v 1.42 2022/06/28 20:46:45 tb Exp $ */ 1/* $OpenBSD: ssl_err.c,v 1.43 2022/07/12 14:42:48 kn Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,11 +53,6 @@
53 * 53 *
54 */ 54 */
55 55
56/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57 * made to it will be overwritten when the script next updates this file,
58 * only reason strings will be preserved.
59 */
60
61#include <stdio.h> 56#include <stdio.h>
62 57
63#include <openssl/err.h> 58#include <openssl/err.h>
@@ -66,7 +61,6 @@
66 61
67#include "ssl_locl.h" 62#include "ssl_locl.h"
68 63
69/* BEGIN ERROR CODES */
70#ifndef OPENSSL_NO_ERR 64#ifndef OPENSSL_NO_ERR
71 65
72#define ERR_FUNC(func) ERR_PACK(ERR_LIB_SSL,func,0) 66#define ERR_FUNC(func) ERR_PACK(ERR_LIB_SSL,func,0)