diff options
| author | beck <> | 2001-06-22 00:03:44 +0000 |
|---|---|---|
| committer | beck <> | 2001-06-22 00:03:44 +0000 |
| commit | 38b6ff9e5294811c57541ad47940f8f8f41dc114 (patch) | |
| tree | 402699541cee3cf3f2943b0384dbda7de534de70 /src/lib/libcrypto/dso | |
| parent | afae624d63e4e717c5bae8c7842a4712309f728f (diff) | |
| download | openbsd-38b6ff9e5294811c57541ad47940f8f8f41dc114.tar.gz openbsd-38b6ff9e5294811c57541ad47940f8f8f41dc114.tar.bz2 openbsd-38b6ff9e5294811c57541ad47940f8f8f41dc114.zip | |
openssl-engine-0.9.6a merge
Diffstat (limited to 'src/lib/libcrypto/dso')
| -rw-r--r-- | src/lib/libcrypto/dso/Makefile.ssl | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/dso/dso_dl.c | 23 | ||||
| -rw-r--r-- | src/lib/libcrypto/dso/dso_vms.c | 4 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/lib/libcrypto/dso/Makefile.ssl b/src/lib/libcrypto/dso/Makefile.ssl index a37f547482..48b36c8330 100644 --- a/src/lib/libcrypto/dso/Makefile.ssl +++ b/src/lib/libcrypto/dso/Makefile.ssl | |||
| @@ -41,7 +41,8 @@ all: lib | |||
| 41 | 41 | ||
| 42 | lib: $(LIBOBJ) | 42 | lib: $(LIBOBJ) |
| 43 | $(AR) $(LIB) $(LIBOBJ) | 43 | $(AR) $(LIB) $(LIBOBJ) |
| 44 | $(RANLIB) $(LIB) | 44 | @echo You may get an error following this line. Please ignore. |
| 45 | - $(RANLIB) $(LIB) | ||
| 45 | @touch lib | 46 | @touch lib |
| 46 | 47 | ||
| 47 | files: | 48 | files: |
diff --git a/src/lib/libcrypto/dso/dso_dl.c b/src/lib/libcrypto/dso/dso_dl.c index 69810fc3bb..455bd66ecf 100644 --- a/src/lib/libcrypto/dso/dso_dl.c +++ b/src/lib/libcrypto/dso/dso_dl.c | |||
| @@ -82,7 +82,7 @@ static int dl_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | |||
| 82 | static int dl_init(DSO *dso); | 82 | static int dl_init(DSO *dso); |
| 83 | static int dl_finish(DSO *dso); | 83 | static int dl_finish(DSO *dso); |
| 84 | #endif | 84 | #endif |
| 85 | static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg); | 85 | static long dl_ctrl(DSO *dso, int cmd, long larg, void *parg); |
| 86 | 86 | ||
| 87 | static DSO_METHOD dso_meth_dl = { | 87 | static DSO_METHOD dso_meth_dl = { |
| 88 | "OpenSSL 'dl' shared library method", | 88 | "OpenSSL 'dl' shared library method", |
| @@ -111,6 +111,11 @@ DSO_METHOD *DSO_METHOD_dl(void) | |||
| 111 | * type so the cast is safe. | 111 | * type so the cast is safe. |
| 112 | */ | 112 | */ |
| 113 | 113 | ||
| 114 | #if defined(__hpux) | ||
| 115 | static const char extension[] = ".sl"; | ||
| 116 | #else | ||
| 117 | static const char extension[] = ".so"; | ||
| 118 | #endif | ||
| 114 | static int dl_load(DSO *dso, const char *filename) | 119 | static int dl_load(DSO *dso, const char *filename) |
| 115 | { | 120 | { |
| 116 | shl_t ptr; | 121 | shl_t ptr; |
| @@ -118,12 +123,12 @@ static int dl_load(DSO *dso, const char *filename) | |||
| 118 | int len; | 123 | int len; |
| 119 | 124 | ||
| 120 | /* The same comment as in dlfcn_load applies here. bleurgh. */ | 125 | /* The same comment as in dlfcn_load applies here. bleurgh. */ |
| 121 | len = strlen(filename); | 126 | len = strlen(filename) + strlen(extension); |
| 122 | if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && | 127 | if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && |
| 123 | (len + 6 < DSO_MAX_TRANSLATED_SIZE) && | 128 | (len + 3 < DSO_MAX_TRANSLATED_SIZE) && |
| 124 | (strstr(filename, "/") == NULL)) | 129 | (strstr(filename, "/") == NULL)) |
| 125 | { | 130 | { |
| 126 | sprintf(translated, "lib%s.so", filename); | 131 | sprintf(translated, "lib%s%s", filename, extension); |
| 127 | ptr = shl_load(translated, BIND_IMMEDIATE, NULL); | 132 | ptr = shl_load(translated, BIND_IMMEDIATE, NULL); |
| 128 | } | 133 | } |
| 129 | else | 134 | else |
| @@ -187,7 +192,7 @@ static void *dl_bind_var(DSO *dso, const char *symname) | |||
| 187 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_NULL_HANDLE); | 192 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_NULL_HANDLE); |
| 188 | return(NULL); | 193 | return(NULL); |
| 189 | } | 194 | } |
| 190 | if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0) | 195 | if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0) |
| 191 | { | 196 | { |
| 192 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE); | 197 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE); |
| 193 | return(NULL); | 198 | return(NULL); |
| @@ -216,7 +221,7 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname) | |||
| 216 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_NULL_HANDLE); | 221 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_NULL_HANDLE); |
| 217 | return(NULL); | 222 | return(NULL); |
| 218 | } | 223 | } |
| 219 | if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0) | 224 | if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0) |
| 220 | { | 225 | { |
| 221 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE); | 226 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE); |
| 222 | return(NULL); | 227 | return(NULL); |
| @@ -224,7 +229,7 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname) | |||
| 224 | return((DSO_FUNC_TYPE)sym); | 229 | return((DSO_FUNC_TYPE)sym); |
| 225 | } | 230 | } |
| 226 | 231 | ||
| 227 | static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg) | 232 | static long dl_ctrl(DSO *dso, int cmd, long larg, void *parg) |
| 228 | { | 233 | { |
| 229 | if(dso == NULL) | 234 | if(dso == NULL) |
| 230 | { | 235 | { |
| @@ -236,10 +241,10 @@ static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg) | |||
| 236 | case DSO_CTRL_GET_FLAGS: | 241 | case DSO_CTRL_GET_FLAGS: |
| 237 | return dso->flags; | 242 | return dso->flags; |
| 238 | case DSO_CTRL_SET_FLAGS: | 243 | case DSO_CTRL_SET_FLAGS: |
| 239 | dso->flags = (int)larg; | 244 | dso->flags = larg; |
| 240 | return(0); | 245 | return(0); |
| 241 | case DSO_CTRL_OR_FLAGS: | 246 | case DSO_CTRL_OR_FLAGS: |
| 242 | dso->flags |= (int)larg; | 247 | dso->flags |= larg; |
| 243 | return(0); | 248 | return(0); |
| 244 | default: | 249 | default: |
| 245 | break; | 250 | break; |
diff --git a/src/lib/libcrypto/dso/dso_vms.c b/src/lib/libcrypto/dso/dso_vms.c index 8ff7090129..ab48b63eb7 100644 --- a/src/lib/libcrypto/dso/dso_vms.c +++ b/src/lib/libcrypto/dso/dso_vms.c | |||
| @@ -62,7 +62,6 @@ | |||
| 62 | #ifdef VMS | 62 | #ifdef VMS |
| 63 | #pragma message disable DOLLARID | 63 | #pragma message disable DOLLARID |
| 64 | #include <lib$routines.h> | 64 | #include <lib$routines.h> |
| 65 | #include <libfisdef.h> | ||
| 66 | #include <stsdef.h> | 65 | #include <stsdef.h> |
| 67 | #include <descrip.h> | 66 | #include <descrip.h> |
| 68 | #include <starlet.h> | 67 | #include <starlet.h> |
| @@ -260,7 +259,8 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym) | |||
| 260 | { | 259 | { |
| 261 | DSO_VMS_INTERNAL *ptr; | 260 | DSO_VMS_INTERNAL *ptr; |
| 262 | int status; | 261 | int status; |
| 263 | int flags = LIB$M_FIS_MIXEDCASE; | 262 | int flags = (1<<4); /* LIB$M_FIS_MIXEDCASE, but this symbol isn't |
| 263 | defined in VMS older than 7.0 or so */ | ||
| 264 | struct dsc$descriptor_s symname_dsc; | 264 | struct dsc$descriptor_s symname_dsc; |
| 265 | *sym = NULL; | 265 | *sym = NULL; |
| 266 | 266 | ||
