-
Notifications
You must be signed in to change notification settings - Fork 802
Compiling on Windows
- New Microsoft's Cryptographic Provider Development Kit
- OpenSSL (optional)
- OpenPACE (optional)
- zlib (optional)
Prebuilt OpenSSL libraries are available here. Download and install the 32 bit or 64 bit package for your target platform. OpenSSL can then be found on C:\OpenSSL-Win32 or C:\OpenSSL-Win64 respectively.
Download and unpack the source code of the latest release of OpenPACE. Open a Visual Studio Developer Command Prompt and change to the OpenPACE's src directory. Compile the library:
set OPENSSL=C:\OpenSSL-Win64When compiling for 32 bit, use
set OPENSSL=C:\OpenSSL-Win32 cl /I%OPENSSL%\include /I. /DX509DIR=\"/\" /DCVCDIR=\"/\" /W3 /D_CRT_SECURE_NO_DEPRECATE /DWIN32_LEAN_AND_MEAN /GS /MT /c ca_lib.c cv_cert.c cvc_lookup.c x509_lookup.c eac_asn1.c eac.c eac_ca.c eac_dh.c eac_ecdh.c eac_kdf.c eac_lib.c eac_print.c eac_util.c misc.c pace.c pace_lib.c pace_mappings.c ri.c ri_lib.c ta.c ta_lib.c objects.c
lib /out:libeac.lib ca_lib.obj cv_cert.obj cvc_lookup.obj x509_lookup.obj eac_asn1.obj eac.obj eac_ca.obj eac_dh.obj eac_ecdh.obj eac_kdf.obj eac_lib.obj eac_print.obj eac_util.obj misc.obj pace.obj pace_lib.obj pace_mappings.obj ri.obj ri_lib.obj ta.obj ta_lib.obj objects.objDownload and unpack the source code of the latest release of zlib. Open a Visual Studio Developer Command Prompt and change to the zlib directory.
Compile the library for 32 bit:
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj" zlib.libCompile the library for 64 bit:
nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF -I." OBJA="inffasx64.obj gvmat64.obj inffas8664.obj" zlib.libChange win32/Make.rules.mak according to your desired build configuration. Specifically, you may want to change
-
OPENSSL_DEFfor OpenSSL -
OPENPACE_DEFandOPENPACE_DIRfor OpenPACE -
ZLIBSTATIC_DEF,ZLIB_LIBandZLIB_INCL_DIRfor zlib
Open a Visual Studio Developer Command Prompt and change to the OpenSC directory. Build the OpenSC binaries and installer:
nmake /f Makefile.mak
powershell -ExecutionPolicy ByPass -File .github\setup-wix.ps1
nmake /f Makefile.mak OpenSC.msiFree code signing provided by SignPath.io, certificate by SignPath Foundation.
Warning: Due to attempts to plant malicious links to our wiki, it is no longer open to anyone to edit. If you want to contribute to this, wiki, please open a pull request here: https://github.com/OpenSC/Wiki.