This change to the "dl", "dlfcn", and "win32" DSO_METHODs adds the filename
authorGeoff Thorpe <geoff@openssl.org>
Wed, 25 Apr 2001 22:40:55 +0000 (22:40 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Wed, 25 Apr 2001 22:40:55 +0000 (22:40 +0000)
or symbol name to the error stack in the event a load or bind operation
failed.

crypto/dso/dso_dl.c
crypto/dso/dso_dlfcn.c
crypto/dso/dso_win32.c

index 4dbb51fb8c13295868775c3b6c1884d13f6c4b39..a831877c07fa31cfa3afbd19d0813ce00e1db11d 100644 (file)
@@ -130,6 +130,7 @@ static int dl_load(DSO *dso)
        if(ptr == NULL)
                {
                DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED);
+               ERR_add_error_data(3, "filename(", filename, ")");
                goto err;
                }
        if(!sk_push(dso->meth_data, (char *)ptr))
@@ -198,6 +199,7 @@ static void *dl_bind_var(DSO *dso, const char *symname)
        if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0)
                {
                DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE);
+               ERR_add_error_data(3, "symname(", symname, ")");
                return(NULL);
                }
        return(sym);
@@ -227,6 +229,7 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname)
        if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0)
                {
                DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE);
+               ERR_add_error_data(3, "symname(", symname, ")");
                return(NULL);
                }
        return((DSO_FUNC_TYPE)sym);
index 22e5059dd86dea0097e3ceca023d2a0f65e29270..681e9782ad14d822bb69d7856efd47d7cac994f0 100644 (file)
@@ -147,6 +147,7 @@ static int dlfcn_load(DSO *dso)
        if(ptr == NULL)
                {
                DSOerr(DSO_F_DLFCN_LOAD,DSO_R_LOAD_FAILED);
+               ERR_add_error_data(3, "filename(", filename, ")");
                goto err;
                }
        if(!sk_push(dso->meth_data, (char *)ptr))
@@ -214,6 +215,7 @@ static void *dlfcn_bind_var(DSO *dso, const char *symname)
        if(sym == NULL)
                {
                DSOerr(DSO_F_DLFCN_BIND_VAR,DSO_R_SYM_FAILURE);
+               ERR_add_error_data(3, "symname(", symname, ")");
                return(NULL);
                }
        return(sym);
@@ -244,6 +246,7 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
        if(sym == NULL)
                {
                DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE);
+               ERR_add_error_data(3, "symname(", symname, ")");
                return(NULL);
                }
        return(sym);
index 1e9fd91e0c42f1a04d5bbf1ac4e79142b047a20c..af8586d7542364c801b26c3c1783440274f7dd51 100644 (file)
@@ -126,6 +126,7 @@ static int win32_load(DSO *dso)
        if(h == NULL)
                {
                DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED);
+               ERR_add_error_data(3, "filename(", filename, ")");
                goto err;
                }
        p = (HINSTANCE *)OPENSSL_malloc(sizeof(HINSTANCE));
@@ -210,6 +211,7 @@ static void *win32_bind_var(DSO *dso, const char *symname)
        if(sym == NULL)
                {
                DSOerr(DSO_F_WIN32_BIND_VAR,DSO_R_SYM_FAILURE);
+               ERR_add_error_data(3, "symname(", symname, ")");
                return(NULL);
                }
        return(sym);
@@ -240,6 +242,7 @@ static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname)
        if(sym == NULL)
                {
                DSOerr(DSO_F_WIN32_BIND_FUNC,DSO_R_SYM_FAILURE);
+               ERR_add_error_data(3, "symname(", symname, ")");
                return(NULL);
                }
        return((DSO_FUNC_TYPE)sym);