The attached patch is for openssl head and allow capi engine to be build 
with mingw (tested with cross-compilation). Details for the patch follow:

Build:
- export of OPENSSL_isservice:
The new capi engine require function OPENSSL_isservice() if engine 
dialog is enabled.
To get correct record in "util/libeay.num", "crypto/cryptlib.h" is added
to the header files list in "util/mkdef.pl" and function declaration is
put in #if *WIN* statement.

May be the repository file util/libeay.num isn't refreshed since I get a 
unexpected number of differences (see the patch).


- engine extra libraries:
The capi engine require additional library - crypt32.
The mingw crypt32 library declare limited number of import functions.
So a new def-file("engines/mingw-crypt32.def") is added to be used by
linker instead mingw import library and "engines/Makefile" is updated
accordingly.

The following makefiles are changed to add extra engine libraries:
   apps/Makefile
   test/Makefile
FIXME: how to add properly engine extra libraries or extra linker
flags(mingw case) only for static build ?
Also how to detect if engine is disabled ?


- engine mingw port:
The engine code is updated with missing form mingw headers required 
declarions. Some of them are in #if statement depending from mingw 
w32api version.


- engine fixes:
Increment by one definitions of lookup methods to match help string and
check in engine control method.
Last argument of function CryptDecrypt() is long.


Test (only rsa is tested):
- rsautl -{encrypt|decrypt} pass
- dgst   -{sign|prverify} fail ("unimplemented public key method")
- engine require init to be set to 1 in engine section from openssl 
config file otherwise command like "engine -pre list_csps" fail.
Also if init is not set we can't add engine specific parameters as 
example store_name - "module initialization error".


Attachment: openssl-cvs-mingw-capi.patch.gz
Description: application/gzip

Reply via email to