Skip to content
Snippets Groups Projects
Commit 75e7ac1f authored by deuce's avatar deuce
Browse files

Add patch contributed by Scott Comstock fixing static linking of Cryptlib.

parent 5a67738c
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,20 @@ int init_crypt(void)
if(crypt_loaded)
return(0);
#ifdef STATIC_CRYPTLIB
cl.PopData=cryptPopData;
cl.PushData=cryptPushData;
cl.FlushData=cryptFlushData;
cl.Init=cryptInit;
cl.End=cryptEnd;
cl.CreateSession=cryptCreateSession;
cl.GetAttribute=cryptGetAttribute;
cl.GetAttributeString=cryptGetAttributeString;
cl.SetAttribute=cryptSetAttribute;
cl.SetAttributeString=cryptSetAttributeString;
cl.DestroySession=cryptDestroySession;
cl.AddRandom=cryptAddRandom;
#else
cryptlib=xp_dlopen(libnames,RTLD_LAZY, CRYPTLIB_VERSION/1000);
if(cryptlib==NULL)
return(-1);
......@@ -80,6 +94,7 @@ int init_crypt(void)
xp_dlclose(cryptlib);
return(-1);
}
#endif
if(cryptStatusOK(cl.Init())) {
if(cryptStatusOK(cl.AddRandom(NULL, CRYPT_RANDOM_SLOWPOLL))) {
crypt_loaded=1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment