aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-03-05 00:19:36 +0000
committerBodo Möller <bodo@openssl.org>2000-03-05 00:19:36 +0000
commit59fc2b0fc21f0c90a328edb7b2755c242adfb27a (patch)
tree8ea25ac20ed309b25f8086c13fbd543e1c8e7468
parent5ba7c902e559a695ed202042b8dd4c893bdb0ae7 (diff)
downloadopenssl-59fc2b0fc21f0c90a328edb7b2755c242adfb27a.tar.gz
Preserve reason strings in automatically build tables.
-rw-r--r--CHANGES6
-rw-r--r--crypto/asn1/asn1_err.c3
-rw-r--r--crypto/bio/bio_err.c3
-rw-r--r--crypto/bn/bn_err.c3
-rw-r--r--crypto/buffer/buf_err.c3
-rw-r--r--crypto/comp/comp_err.c3
-rw-r--r--crypto/conf/conf_err.c3
-rw-r--r--crypto/cpt_err.c3
-rw-r--r--crypto/dh/dh_err.c3
-rw-r--r--crypto/dsa/dsa_err.c3
-rw-r--r--crypto/evp/evp_err.c3
-rw-r--r--crypto/objects/obj_err.c3
-rw-r--r--crypto/pem/pem_err.c3
-rw-r--r--crypto/pkcs12/pk12err.c3
-rw-r--r--crypto/pkcs7/pkcs7err.c3
-rw-r--r--crypto/rand/rand_err.c3
-rw-r--r--crypto/rsa/rsa_err.c3
-rw-r--r--crypto/x509/x509_err.c3
-rw-r--r--crypto/x509v3/v3err.c3
-rw-r--r--rsaref/rsar_err.c3
-rw-r--r--ssl/ssl_err.c3
-rw-r--r--util/mkerr.pl26
22 files changed, 67 insertions, 25 deletions
diff --git a/CHANGES b/CHANGES
index 295e037db4..aa752fd973 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,12 @@
Changes between 0.9.5 and 0.9.6 [XX XXX 2000]
+ *) In util/mkerr.pl (which implements 'make errors'), preserve
+ reason strings from the previous version of the .c file, as
+ the default to have only downcase letters (and digits) in
+ automatically generated reasons codes is not always appropriate.
+ [Bodo Moeller]
+
*) In ERR_load_ERR_strings(), build an ERR_LIB_SYS error reason table
using strerror. Previously, ERR_reason_error_string() returned
library names as reason strings for SYSerr; but SYSerr is a special
diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c
index b183814242..cecd555c88 100644
--- a/crypto/asn1/asn1_err.c
+++ b/crypto/asn1/asn1_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/bio/bio_err.c b/crypto/bio/bio_err.c
index b5f07de5a0..f38e7b9178 100644
--- a/crypto/bio/bio_err.c
+++ b/crypto/bio/bio_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c
index f3b9497dca..988270bcf4 100644
--- a/crypto/bn/bn_err.c
+++ b/crypto/bn/bn_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/buffer/buf_err.c b/crypto/buffer/buf_err.c
index 7f9fd1f6c3..2f971a5f38 100644
--- a/crypto/buffer/buf_err.c
+++ b/crypto/buffer/buf_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/comp/comp_err.c b/crypto/comp/comp_err.c
index 77a3f7070c..c10282a73c 100644
--- a/crypto/comp/comp_err.c
+++ b/crypto/comp/comp_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/conf/conf_err.c b/crypto/conf/conf_err.c
index eb4b3cfc70..5c1ca59090 100644
--- a/crypto/conf/conf_err.c
+++ b/crypto/conf/conf_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/cpt_err.c b/crypto/cpt_err.c
index c2a2dd4af6..dadd8d8d92 100644
--- a/crypto/cpt_err.c
+++ b/crypto/cpt_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c
index 0348bd24a2..ff2d1684c2 100644
--- a/crypto/dh/dh_err.c
+++ b/crypto/dh/dh_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/dsa/dsa_err.c b/crypto/dsa/dsa_err.c
index 38e4af968c..2b3ab3a9ad 100644
--- a/crypto/dsa/dsa_err.c
+++ b/crypto/dsa/dsa_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c
index 97953a0fc1..fc149cbb1a 100644
--- a/crypto/evp/evp_err.c
+++ b/crypto/evp/evp_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/objects/obj_err.c b/crypto/objects/obj_err.c
index cef401db27..7aec0ed47a 100644
--- a/crypto/objects/obj_err.c
+++ b/crypto/objects/obj_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/pem/pem_err.c b/crypto/pem/pem_err.c
index 642129da20..8b1789b11c 100644
--- a/crypto/pem/pem_err.c
+++ b/crypto/pem/pem_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/pkcs12/pk12err.c b/crypto/pkcs12/pk12err.c
index 9d8de10e1e..12db54f49e 100644
--- a/crypto/pkcs12/pk12err.c
+++ b/crypto/pkcs12/pk12err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/pkcs7/pkcs7err.c b/crypto/pkcs7/pkcs7err.c
index 813a8af9ed..8ded8913db 100644
--- a/crypto/pkcs7/pkcs7err.c
+++ b/crypto/pkcs7/pkcs7err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/rand/rand_err.c b/crypto/rand/rand_err.c
index e6a7e56dca..1af0aa0b8a 100644
--- a/crypto/rand/rand_err.c
+++ b/crypto/rand/rand_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/rsa/rsa_err.c b/crypto/rsa/rsa_err.c
index 5cfbea2b03..1cde7c0da4 100644
--- a/crypto/rsa/rsa_err.c
+++ b/crypto/rsa/rsa_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/x509/x509_err.c b/crypto/x509/x509_err.c
index fdedbdac34..848add56e9 100644
--- a/crypto/x509/x509_err.c
+++ b/crypto/x509/x509_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/crypto/x509v3/v3err.c b/crypto/x509v3/v3err.c
index b7d4e350c4..aa4a605dc4 100644
--- a/crypto/x509v3/v3err.c
+++ b/crypto/x509v3/v3err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/rsaref/rsar_err.c b/rsaref/rsar_err.c
index d2eb3a2b01..5e7871f803 100644
--- a/rsaref/rsar_err.c
+++ b/rsaref/rsar_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c
index 5618e34a30..1ffee87522 100644
--- a/ssl/ssl_err.c
+++ b/ssl/ssl_err.c
@@ -54,7 +54,8 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
diff --git a/util/mkerr.pl b/util/mkerr.pl
index ebc059ef22..8e18f3c2df 100644
--- a/util/mkerr.pl
+++ b/util/mkerr.pl
@@ -284,6 +284,17 @@ EOF
# Rewrite the C source file containing the error details.
+ # First, read any existing reason string definitions:
+ my %err_reason_strings;
+ if (open(IN,"<$cfile")) {
+ while (<IN>) {
+ if (/\b(${lib}_R_\w*)\b.*\"(.*)\"/) {
+ $err_reason_strings{$1} = $2;
+ }
+ }
+ close(IN);
+ }
+
my $hincf;
if($static) {
$hfile =~ /([^\/]+)$/;
@@ -352,7 +363,8 @@ EOF
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
*/
#include <stdio.h>
@@ -385,9 +397,13 @@ EOF
foreach $i (@reasons) {
my $rn;
my $nspc = 0;
- $i =~ /^${lib}_R_(\S+)$/;
- $rn = $1;
- $rn =~ tr/_[A-Z]/ [a-z]/;
+ if (exists $err_reason_strings{$i}) {
+ $rn = $err_reason_strings{$i};
+ } else {
+ $i =~ /^${lib}_R_(\S+)$/;
+ $rn = $1;
+ $rn =~ tr/_[A-Z]/ [a-z]/;
+ }
$nspc = 40 - length($i) unless length($i) > 40;
$nspc = " " x $nspc;
print OUT "{${i}${nspc},\"$rn\"},\n";
@@ -465,7 +481,7 @@ EOF
}
close OUT;
-
+ undef %err_reason_strings;
}
if($debug && defined(%notrans)) {