HOW TO BUILD ============= Download tar.gz from https://www.openssl.org/source/ Download Strawberry Perl 5.10.x from http://strawberryperl.com/releases.html Download NASM from http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/ Main build instructions: INSTALL NOTES.WIN windows 32 bit - OpenSSL 1.1.0b ========================================= call "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /XP32 /RETAIL cd /d D:\cvsbin\release builder\openssl-1.1.0b set PATH=E:\perl-5.10\perl\bin;%PATH%;c:\cygwin\bin set PATH=E:\nasm-2.12.02;%PATH% set PROGFILES=Program Files IF %PROCESSOR_ARCHITECTURE%~==AMD64~ set PROGFILES=Program Files (x86) IF "%ProgramFiles(x86)%~"=="C:\Program Files (x86)~" set PROGFILES=Program Files (x86) perl Configure VC-WIN32 --prefix=D:/cvsdeps/openSSL --openssldir=D:/cvsdeps/openSSL/ssl enable-crypto-mdebug enable-ssl3 enable-ssl3-method D:\GnuWin32\bin\sed < makefile > makefile.1 "s/libcrypto\.lib/libcrypto_vc71.lib/g" D:\GnuWin32\bin\sed < makefile.1 > makefile.2 "s/libcrypto-1_1\.dll/libcrypto-1_1_vc71.dll/g" D:\GnuWin32\bin\sed < makefile.2 > makefile.3 "s/libcrypto-1_1\.pdb/libcrypto-1_1_vc71.pdb/g" D:\GnuWin32\bin\sed < makefile.3 > makefile.4 "s/libssl\.lib/libssl_vc71.lib/g" D:\GnuWin32\bin\sed < makefile.4 > makefile.5 "s/libssl-1_1\.dll/libssl-1_1_vc71.dll/g" D:\GnuWin32\bin\sed < makefile.5 > makefile.6 "s/libcrypto-1_1\./libcrypto-1_1_vc71./g" D:\GnuWin32\bin\sed < makefile.6 > makefile.7 "s/LIBRARY libcrypto-1_1/LIBRARY libcrypto-1_1_vc71/g" D:\GnuWin32\bin\sed < makefile.7 > makefile.8 "s/libssl-1_1\./libssl-1_1_vc71./g" D:\GnuWin32\bin\sed < makefile.8 > makefile.9 "s/LIBRARY libssl-1_1/LIBRARY libssl-1_1_vc71/g" D:\GnuWin32\bin\sed < makefile.9 > makefile.A "s/crypt32.lib user32.lib/crypt32.lib user32.lib kernel32.lib/g" D:\GnuWin32\bin\sed < makefile.A > makefile.B "s/^CFLAGS\=-DOPENSSL_USE_APPLINK/CFLAGS=-D_WIN32_WINNT=0x0502 -DOPENSSL_USE_APPLINK/" D:\GnuWin32\bin\sed < makefile.B > makefile.C "s/copy\.pl. ..BLDDIR..include.openssl...h ./copy.pl""" """$(BLDDIR)\\include\\openssl\\*.h""" \\/" D:\GnuWin32\bin\sed < makefile.C > makefile.D "s/..PERL.. ...SRCDIR.\\util\\copy.pl/c:\\cygwin\\bin\\perl.exe""" """$(SRCDIR)\\util\\copy.pl/" D:\GnuWin32\bin\sed < makefile.D > makefile "s/libssl-1_1\.pdb/libssl-1_1_vc71.pdb/g" D:\GnuWin32\bin\sed < test\recipes\80-test_pkcs12.t > test\recipes\80-test_pkcs12_fix.t "s/my .pass = """.*"""/my \$pass = """blat"""/" D:\GnuWin32\bin\sed < test\recipes\80-test_pkcs12_fix.t > test\recipes\80-test_pkcs12.t "s/shibboleth\.pfx/shibboleth-blat.pfx/" del /q test\recipes\80-test_pkcs12_fix.t copy /y ..\shibboleth-blat.pfx .\test\ nmake > make_results.txt 2>&1 nmake test nmake install windows 64 bit - OpenSSL 1.1.0b ========================================= call "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /XP64 /RETAIL cd /d D:\cvsbin\release builder\openssl-1.1.0b set PATH=E:\perl-5.10\perl\bin;%PATH%;c:\cygwin\bin set PATH=E:\nasm-2.12.02;%PATH% set PROGFILES=Program Files IF %PROCESSOR_ARCHITECTURE%~==AMD64~ set PROGFILES=Program Files (x86) IF "%ProgramFiles(x86)%~"=="C:\Program Files (x86)~" set PROGFILES=Program Files (x86) perl Configure VC-WIN64A --prefix=D:/cvsdeps/openSSL --openssldir=D:/cvsdeps/openSSL/ssl/x64 enable-crypto-mdebug enable-ssl3 enable-ssl3-method D:\GnuWin32\bin\sed < makefile > makefile.1 "s/libcrypto\.lib/libcrypto_vc71-x64.lib/g" D:\GnuWin32\bin\sed < makefile.1 > makefile.2 "s/libcrypto-1_1-x64\.dll/libcrypto-1_1_vc71-x64.dll/g" D:\GnuWin32\bin\sed < makefile.2 > makefile.3 "s/libcrypto-1_1-x64\.pdb/libcrypto-1_1_vc71-x64.pdb/g" D:\GnuWin32\bin\sed < makefile.3 > makefile.4 "s/libssl\.lib/libssl_vc71-x64.lib/g" D:\GnuWin32\bin\sed < makefile.4 > makefile.5 "s/libssl-1_1-x64\.dll/libssl-1_1_vc71-x64.dll/g" D:\GnuWin32\bin\sed < makefile.5 > makefile.6 "s/libcrypto-1_1-x64\./libcrypto-1_1_vc71-x64./g" D:\GnuWin32\bin\sed < makefile.6 > makefile.7 "s/LIBRARY libcrypto-1_1-x64/LIBRARY libcrypto-1_1_vc71-x64/g" D:\GnuWin32\bin\sed < makefile.7 > makefile.8 "s/libssl-1_1-x64\./libssl-1_1_vc71-x64./g" D:\GnuWin32\bin\sed < makefile.8 > makefile.9 "s/LIBRARY libssl-1_1-x64/LIBRARY libssl-1_1_vc71-x64/g" D:\GnuWin32\bin\sed < makefile.9 > makefile.A "s/crypt32.lib user32.lib/crypt32.lib user32.lib kernel32.lib/g" D:\GnuWin32\bin\sed < makefile.A > makefile.B "s/^CFLAGS\=-DOPENSSL_USE_APPLINK/CFLAGS=-D_WIN32_WINNT=0x0502 -DOPENSSL_USE_APPLINK/" D:\GnuWin32\bin\sed < makefile.B > makefile.C "s/copy\.pl. ..BLDDIR..include.openssl...h ./copy.pl""" """$(BLDDIR)\\include\\openssl\\*.h""" \\/" D:\GnuWin32\bin\sed < makefile.C > makefile.D "s/..PERL.. ...SRCDIR.\\util\\copy.pl/c:\\cygwin\\bin\\perl.exe""" """$(SRCDIR)\\util\\copy.pl/" D:\GnuWin32\bin\sed < makefile.D > makefile "s/libssl-1_1-x64\.pdb/libssl-1_1-x64_vc71-x64.pdb/g" D:\GnuWin32\bin\sed < test\recipes\80-test_pkcs12.t > test\recipes\80-test_pkcs12_fix.t "s/my .pass = """.*"""/my \$pass = """blat"""/" D:\GnuWin32\bin\sed < test\recipes\80-test_pkcs12_fix.t > test\recipes\80-test_pkcs12.t "s/shibboleth\.pfx/shibboleth-blat.pfx/" del /q test\recipes\80-test_pkcs12_fix.t copy /y ..\shibboleth-blat.pfx .\test\ ren crypto\o_str.c o_str.c.orig D:\GnuWin32\bin\sed < crypto\o_str.c.orig > crypto\o_str.c "s/_MSC_VER>=1400/_MSC_VER>=1500/g" nmake > make_results64.txt 2>&1 nmake test nmake install test_pkcs12 test fail - OpenSSL 1.1.0b ========================================= The system locale of the build Windows 7 x64 system is English - Great Britain (en en-gb 2057) 0x809 This test should be skipped anyway, because the password is in Greek, and there is a specific test to skip it if the system locale is not greek: my $pass = "σύνθημα γνώρισμα"; if (GetSystemDefaultLCID() != 0x408) { plan skip_all => "Non-Greek system locale" && GetSystemDefaultLCID(); http://www.science.co.il/Language/Locale-codes.php nmake TESTS=test_pkcs12 V=1 tests Microsoft (R) Program Maintenance Utility Version 7.00.8882 Copyright (C) Microsoft Corp 1988-2000. All rights reserved. set SRCTOP=. set BLDTOP=. set PERL=E:\perl-5.10\perl\bin\perl.exe "E:\perl-5.10\perl\bin\perl.exe" ".\test\run_tests.pl" test_pkcs12 test\recipes\80-test_pkcs12.t .. 1..1 Mac verify error: invalid password? ..\apps\openssl.exe pkcs12 -noout -password "pass:¤â¤ì╬¢╬©╬À╬╝╬▒ ╬│╬¢¤Ä¤ü╬╣¤â╬╝╬▒" -in ..\test\shibboleth.pfx => 1 not ok 1 - test_pkcs12# Failed test 'test_pkcs12' # at test\recipes\80-test_pkcs12.t line 61. # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- test\recipes\80-test_pkcs12.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 0 wallclock secs ( 0.02 usr + 0.03 sys = 0.05 CPU) Result: FAIL Failed 1/1 test programs. 1/1 subtests failed. NMAKE : fatal error U1077: '"E:\perl-5.10\perl\bin\perl.exe"' : return code '0x1' Stop. The alternative is to re-generate the certificate with an ASCII password and re-run: Here is a failure: cd /d D:\cvsbin\release builder\openssl-1.1.0b .\apps\openssl.exe pkcs12 -noout -password "pass:blast" -in .\test\shibboleth-blat.pfx Mac verify error: invalid password? Here is a success: cd /d D:\cvsbin\release builder\openssl-1.1.0b .\apps\openssl.exe pkcs12 -noout -password "pass:blat" -in .\test\shibboleth-blat.pfx You can even change the script: D:\GnuWin32\bin\sed < test\recipes\80-test_pkcs12.t > test\recipes\80-test_pkcs12_fix.t "s/my .pass = """.*"""/my \$pass = """blat"""/" D:\GnuWin32\bin\sed < test\recipes\80-test_pkcs12_fix.t > test\recipes\80-test_pkcs12.t "s/shibboleth\.pfx/shibboleth-blat.pfx/" Then re-run this test: Microsoft (R) Program Maintenance Utility Version 7.00.8882 Copyright (C) Microsoft Corp 1988-2000. All rights reserved. set SRCTOP=. set BLDTOP=. set PERL=E:\perl-5.10\perl\bin\perl.exe "E:\perl-5.10\perl\bin\perl.exe" ".\test\run_tests.pl" test_pkcs12 test\recipes\80-test_pkcs12.t .. 1..1 ..\apps\openssl.exe pkcs12 -noout -password pass:blat -in ..\test\shibboleth-bla t.pfx => 0 ok 1 - test_pkcs12 ok All tests successful. Files=1, Tests=1, 1 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU) Result: PASS SSLAPI test fail - OpenSSL 1.1.0b ========================================= This seems to be a bug in this release of OpenSSL (when compiled with enable-crypto-mdebug), otherwise OK: https://github.com/openssl/openssl/issues/1623 nmake TESTS=test_sslapi V=1 tests Microsoft (R) Program Maintenance Utility Version 7.00.8882 Copyright (C) Microsoft Corp 1988-2000. All rights reserved. set SRCTOP=. set BLDTOP=. set PERL=E:\perl-5.10\perl\bin\perl.exe "E:\perl-5.10\perl\bin\perl.exe" ".\test\run_tests.pl" test_sslapi test\recipes\90-test_sslapi.t .. 1..1 [22:50:27] 11231 file=crypto\bio\bio_meth.c, line=38, thread=5808, number=40, address=0x2c06f0 40 bytes leaked in 1 chunks sslapitest.exe: 91 test cases SSL_accept() failed -1, 1 SSL_connect() failed -1, 1 SSL_connect() failed -1, 1 SSL_accept() failed -1, 1 SSL_connect() failed -1, 1 SSL_accept() failed -1, 1 SSL_connect() failed -1, 1 SSL_accept() failed -1, 1 All tests passed. sslapitest.exe ..\apps\server.pem ..\apps\server.pem => 1 not ok 1 - running sslapitest # Failed test 'running sslapitest' # at test\recipes\90-test_sslapi.t line 21. # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- test\recipes\90-test_sslapi.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 1 wallclock secs ( 0.03 usr + 0.03 sys = 0.06 CPU) Result: FAIL Failed 1/1 test programs. 1/1 subtests failed. NMAKE : fatal error U1077: '"E:\perl-5.10\perl\bin\perl.exe"' : return code '0x1' Stop. 31 bit test results - OpenSSL 1.1.0b ========================================= D:\cvsbin\release builder\openssl-1.1.0b>nmake test Microsoft (R) Program Maintenance Utility Version 7.00.8882 Copyright (C) Microsoft Corp 1988-2000. All rights reserved. set SRCTOP=. set BLDTOP=. set PERL=E:\perl-5.10\perl\bin\perl.exe "E:\perl-5.10\perl\bin\perl.exe" ".\test\run_tests.pl" test\recipes\01-test_abort.t ............ ok test\recipes\01-test_sanity.t ........... ok test\recipes\01-test_symbol_presence.t .. ok test\recipes\02-test_ordinals.t ......... ok test\recipes\05-test_bf.t ............... ok test\recipes\05-test_cast.t ............. ok test\recipes\05-test_des.t .............. ok test\recipes\05-test_hmac.t ............. ok test\recipes\05-test_idea.t ............. ok test\recipes\05-test_md2.t .............. skipped: md2 is not supported by this OpenSSL build test\recipes\05-test_md4.t .............. ok test\recipes\05-test_md5.t .............. ok test\recipes\05-test_mdc2.t ............. ok test\recipes\05-test_rand.t ............. ok test\recipes\05-test_rc2.t .............. ok test\recipes\05-test_rc4.t .............. ok test\recipes\05-test_rc5.t .............. skipped: rc5 is not supported by this OpenSSL build test\recipes\05-test_rmd.t .............. ok test\recipes\05-test_sha1.t ............. ok test\recipes\05-test_sha256.t ........... ok test\recipes\05-test_sha512.t ........... ok test\recipes\05-test_wp.t ............... ok test\recipes\10-test_bn.t ............... ok test\recipes\10-test_exp.t .............. ok test\recipes\15-test_dh.t ............... ok test\recipes\15-test_dsa.t .............. ok test\recipes\15-test_ec.t ............... ok test\recipes\15-test_ecdh.t ............. ok test\recipes\15-test_ecdsa.t ............ ok test\recipes\15-test_rsa.t .............. ok test\recipes\20-test_enc.t .............. ok test\recipes\20-test_passwd.t ........... ok test\recipes\25-test_crl.t .............. ok test\recipes\25-test_d2i.t .............. ok test\recipes\25-test_pkcs7.t ............ ok test\recipes\25-test_req.t .............. ok test\recipes\25-test_sid.t .............. ok test\recipes\25-test_verify.t ........... ok test\recipes\25-test_x509.t ............. ok test\recipes\30-test_afalg.t ............ skipped: test_afalg not supported for this build test\recipes\30-test_engine.t ........... ok test\recipes\30-test_evp.t .............. ok test\recipes\30-test_evp_extra.t ........ ok test\recipes\30-test_pbelu.t ............ ok test\recipes\40-test_rehash.t ........... skipped: test_rehash is not available on this platform test\recipes\70-test_asyncio.t .......... ok test\recipes\70-test_bad_dtls.t ......... ok test\recipes\70-test_clienthello.t ...... ok test\recipes\70-test_packet.t ........... ok test\recipes\70-test_sslcertstatus.t .... skipped: TLSProxy isn't usable on MSWin32 test\recipes\70-test_sslextension.t ..... skipped: TLSProxy isn't usable on MSWin32 test\recipes\70-test_sslrecords.t ....... skipped: TLSProxy isn't usable on MSWin32 test\recipes\70-test_sslsessiontick.t ... skipped: TLSProxy isn't usable on MSWin32 test\recipes\70-test_sslskewith0p.t ..... skipped: TLSProxy isn't usable on MSWin32 test\recipes\70-test_sslvertol.t ........ skipped: TLSProxy isn't usable on MSWin32 test\recipes\70-test_tlsextms.t ......... skipped: TLSProxy isn't usable on MSWin32 test\recipes\70-test_verify_extra.t ..... ok test\recipes\80-test_ca.t ............... ok test\recipes\80-test_cipherlist.t ....... ok test\recipes\80-test_cms.t .............. ok test\recipes\80-test_ct.t ............... ok test\recipes\80-test_dane.t ............. ok test\recipes\80-test_dtls.t ............. ok test\recipes\80-test_dtlsv1listen.t ..... ok test\recipes\80-test_ocsp.t ............. ok test\recipes\80-test_pkcs12.t ........... 1/1 # Failed test 'test_pkcs12' # at test\recipes\80-test_pkcs12.t line 61. # Looks like you failed 1 test of 1. test\recipes\80-test_pkcs12.t ........... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests test\recipes\80-test_ssl_new.t .......... ok test\recipes\80-test_ssl_old.t .......... ok test\recipes\80-test_ssl_test_ctx.t ..... ok test\recipes\80-test_tsa.t .............. ok test\recipes\80-test_x509aux.t .......... ok test\recipes\90-test_async.t ............ ok test\recipes\90-test_bio_enc.t .......... ok test\recipes\90-test_bioprint.t ......... ok test\recipes\90-test_constant_time.t .... ok test\recipes\90-test_fuzz.t ............. ok test\recipes\90-test_gmdiff.t ........... ok test\recipes\90-test_heartbeat.t ........ skipped: heartbeats is not supported by this OpenSSL build test\recipes\90-test_ige.t .............. ok test\recipes\90-test_memleak.t .......... ok test\recipes\90-test_p5_crpt2.t ......... ok test\recipes\90-test_secmem.t ........... ok test\recipes\90-test_srp.t .............. ok test\recipes\90-test_sslapi.t ........... 1/1 # Failed test 'running sslapitest' # at test\recipes\90-test_sslapi.t line 21. # Looks like you failed 1 test of 1. test\recipes\90-test_sslapi.t ........... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests test\recipes\90-test_threads.t .......... ok test\recipes\90-test_v3name.t ........... ok Test Summary Report ------------------- test\recipes\80-test_pkcs12.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 test\recipes\90-test_sslapi.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=86, Tests=423, 156 wallclock secs ( 0.55 usr + 0.50 sys = 1.04 CPU) Result: FAIL Failed 2/86 test programs. 2/423 subtests failed. NMAKE : fatal error U1077: '"E:\perl-5.10\perl\bin\perl.exe"' : return code '0xff' Stop.