You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Linux limitation is somewhat artificial. The only platform-specific
parts of the module are dynamic linking and loading of the OpenSSL
library, and the OpenSSL 1.0.2 threading callbacks. The implementations
of both are already portable to any Unix-like OS as dlfcn.h and pthreads
are part of the POSIX standard. The only issue with the dynamic loader
implementation is that it assumes the naming convention for the library
shared object is "libcrypto.so.<version>" which limits support for
darwin and other platforms which follow a different convention. Change
openssl.Init() and openssl.CheckVersion() to take the library file name
as its argument to make the bindings agnostic to the target platform's
library file naming convention. Widen the build constraints to allow
the module with the dlopen()-based loader to be built on any OS which
satisfies the "unix" Go build constraint.
Windows's dynamic library loader API is shaped very similarly to
POSIX's, aside from the function names. Add support for Windows by
adding Windows implementations for linking and loading the OpenSSL
library, and the threading callbacks.
Signed-off-by: Cory Snider <[email protected]>
0 commit comments