diff --git a/CHANGES b/CHANGES index 4b5a9d3b2..008f259b0 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,10 @@ Changes between 0.9.7l and 0.9.7m [xx XXX xxxx] + *) Load error codes if they are not already present instead of using a + static variable. This allows them to be cleanly unloaded and reloaded. + [Steve Henson] + Changes between 0.9.7k and 0.9.7l [28 Sep 2006] *) Introduce limits to prevent malicious keys being able to diff --git a/util/mkerr.pl b/util/mkerr.pl index 967851460..4171e0c98 100644 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -422,7 +422,7 @@ EOF print OUT <<"EOF"; /* $cfile */ /* ==================================================================== - * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -536,17 +536,14 @@ if($static) { ${staticloader}void ERR_load_${lib}_strings(void) { - static int init=1; - - if (init) - { - init=0; #ifndef OPENSSL_NO_ERR + + if (ERR_func_error_string(${lib}_str_functs[0].error) == NULL) + { ERR_load_strings($load_errcode,${lib}_str_functs); ERR_load_strings($load_errcode,${lib}_str_reasons); -#endif - } +#endif } EOF } else {