Initialize error table first in s2n_init()
Allow error map to be first initialized. If other parts of s2n_init()
fails, this allows an error message to be returned.
@@ -36,13 +36,13 @@ unsigned long s2n_get_openssl_version(void)
int s2n_init(void)
{
+ GUARD(s2n_error_table_init()); /* initalize error table first so error look up is possible */
GUARD(s2n_fips_init());
GUARD(s2n_mem_init());
GUARD(s2n_rand_init());
GUARD(s2n_cipher_suites_init());
GUARD(s2n_cipher_preferences_init());
GUARD(s2n_client_key_share_init());
- GUARD(s2n_error_table_init());
S2N_ERROR_IF(atexit(s2n_cleanup_atexit) != 0, S2N_ERR_ATEXIT);
