在win32下编译openssl
生活随笔
收集整理的這篇文章主要介紹了
在win32下编译openssl
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
- 一、關于openssl
- 二、下載openssl
- 三、編譯openssl
- 編譯環境準備
- 執行編譯
- 四、查看編譯好的openssl
- openssl目錄結構如下
一、關于openssl
OpenSSL 是一個安全套接字層密碼庫,囊括主要的密碼算法、常用的密鑰和證書封裝管理功能及SSL協議,并提供豐富的應用程序供測試或其它目的使用。—— 引用百度百科openssl詞條 openssl是開源的(也就是公開源碼)二、下載openssl
- 因為,openssl開源,并且托管于GitHub上。openssl Github
- 可以直接選擇在官網下載:[openssl Dwonload]
- 我下載的是官網的1.0.2o版本,openssl-1.0.2o.tar.gz.0.2o.tar.gz。
三、編譯openssl
為什么我選擇編譯使用,openssl Win32
其中最大的原因是兼容性。
解壓下載后的壓縮包。openssl-1.0.2o文件夾下,有以下文件。這些文件是對應不同環境下的編譯教程。
我們選擇查看的是INSTALL.W32
編譯環境準備
根據INSTALL.W32文件中寫到的一下內容
you need Perl for Win32. Unless you will build on Cygwin, you will need
ActiveState Perl, available from http://www.activestate.com/ActivePerl.one of the following C compilers:
- Visual C++
- Borland C
- GNU C (Cygwin or MinGW)
Netwide Assembler, a.k.a. NASM, available from http://nasm.sourceforge.net/
is required if you intend to utilize assembler modules. Note that NASM
is now the only supported assembler.
執行編譯
將當前目錄切換到切換到下載的openssl目錄下。
3.順序執行下列命令。
- 如果你想用NASM在安裝后,你需要執行ms\do_nasm
- 如果你不需要使用匯編語言文件則執行下面兩條命令
perl Configure VC-WIN32 no-asm --prefix=c:/some/openssl/dir
ms\do_ms
- 如果結果輸出passed all tests代表編譯正確執行
四、查看編譯好的openssl
編譯好的openssl在C:\some\openssl下。
openssl目錄結構如下
- openssl
- dir
- bin 可執行文件,以及openssl庫的動態鏈接文件
- include 編程時要用的頭文件
- lib 靜態鏈接文件
- ssl ssl的配置文件
- dir
總結
以上是生活随笔為你收集整理的在win32下编译openssl的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 臭名昭著的黑客攻击事件 20件
- 下一篇: 欧盟ROHS