源码地址:https://github.com/openssl/openssl.git
分支OpenSSL_1_0_2-stable在windows10编译
1.使用ActiveState Perl工具
有nasm工具,启用汇编文件1
2perl Configure VC-WIN32 --prefix=c:\some\openssl\dir
ms\do_nasm
无nasm工具1
2perl Configure VC-WIN32 no-asm --prefix=c:/some/openssl/dir
ms\do_ms
2.使用nmake工具
在开始菜单中找到vs的开发工具命令提示,使用如下命令1
2
3
4
5
6// 编译
nmake -f ms\ntdll.mak
// 测试
nmake -f ms\ntdll.mak test
// 安装
nmake -f ms\ntdll.mak install
openssl证书转换
1 | // Convert a DER file (.crt .cer .der) to PEM |
OpenSSL Convert PEM
1 | // Convert PEM to DER |
OpenSSL Convert DER1
2Convert DER to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem
OpenSSL Convert P7B1
2
3
4
5
6
7Convert P7B to PEM
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
Convert P7B to PFX
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer
OpenSSL Convert PFX1
2Convert PFX to PEM
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes