projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix things so DH_free() will be no-op when passed NULL, like RSA_free() and
[oweals/openssl.git]
/
crypto
/
err
/
err_genc.pl
diff --git
a/crypto/err/err_genc.pl
b/crypto/err/err_genc.pl
index d3251da8428939836623a6318b49ce51f6e04cdb..5ebfa1a15e3fcb0119ed13048de8ff21f970af4b 100644
(file)
--- a/
crypto/err/err_genc.pl
+++ b/
crypto/err/err_genc.pl
@@
-65,7
+65,23
@@
print "#endif\n";
if ($static)
{ $lib="ERR_LIB_$type"; }
else
if ($static)
{ $lib="ERR_LIB_$type"; }
else
- { $lib="${type}_lib_error_code"; }
+ {
+ print <<"EOF";
+
+#ifdef ${type}_LIB_NAME
+static ERR_STRING_DATA ${type}_lib_name[]=
+ {
+{0 ,${type}_LIB_NAME},
+{0,NULL}
+ };
+#endif
+
+EOF
+ $lib="${type}_lib_error_code";
+
+
+
+ }
$str="";
$str.="#ifndef NO_ERR\n";
$str="";
$str.="#ifndef NO_ERR\n";
@@
-77,7
+93,7
@@
if (!$static)
{
print <<"EOF";
{
print <<"EOF";
-
static
int ${type}_lib_error_code=0;
+int ${type}_lib_error_code=0;
void ERR_load_${type}_strings()
{
void ERR_load_${type}_strings()
{
@@
-86,10
+102,14
@@
void ERR_load_${type}_strings()
if (${type}_lib_error_code == 0)
${type}_lib_error_code=ERR_get_next_error_library();
if (${type}_lib_error_code == 0)
${type}_lib_error_code=ERR_get_next_error_library();
- if (init)
;
- {
;
+ if (init)
+ {
init=0;
$str
init=0;
$str
+#ifdef ${type}_LIB_NAME
+ ${type}_lib_name->error = ERR_PACK(${type}_lib_error_code,0,0);
+ ERR_load_strings(0,${type}_lib_name);
+#endif;
}
}
}
}
@@
-113,8
+133,8
@@
void ERR_load_${type}_strings()
{
static int init=1;
{
static int init=1;
- if (init)
;
- {
;
+ if (init)
+ {
init=0;
$str
}
init=0;
$str
}