OpenSSL installation and programming in Windows
Column selected from Nataka: http://blog.csdn.net/nataka/archive/2005/09/03/470539.aspx
Prerequisites:
1. Install VC ++ 6.0. 2. Download The ActivePerl-5.8.0.806-MSWin32-x86 and install: http://www.sogoz.info/down.asp? Id = 3683 & NO = 13. Download openssl0.98 and decompress it. Http://www.openssl.org/source/openssl-0.9.8.tar.gz
Installation steps:You can refer to install. win321,
Perl configure VC-WIN32If the call fails, the following message is displayed: 2,
MS/do_msWe recommend that you use this method. If you use this method, you must ensure that the local machine has a compiler. : MS/do_masm (default VC compiler; also download and install it by yourself)
: MS/do_nasm (you need to download it yourself) 3. Go to the Microsoft Visual Studio/vc98/bin directory in the DOS window and execute
Vcvars32.batTo configure environment variables. 4. Jump to the OpenSSL directory and execute:
Nmake-f ms/NTDLL. Mak
If the compilation is successful, the final output is under the out32dll Directory: including executable files, two DLL files, and two lib files:
Libeay32.dll, libeay32.lib, ssleay32.dll, ssleay32.lib
Preliminary programming:
1. Open VC-tools-options-Directores and add the [openssl-0.9.8]/inc32 directory in include files; add openssl-0.9.8/out32dll2 to libray files, include the following three header files in the source program, and add Lib:
# Include
<OpenSSL/SSL. h>
# Include
<OpenSSL/err. h>
# Include
<OpenSSL/Bio. h>
# Pragma comment (Lib, "libeay32.lib ")
# Pragma comment (Lib, "ssleay32.lib ")
3, reference source code programming: http://www.kennethballard.com/Download/intro-openssl.zip
Refer:
Use OpenSSL APIs
Security Programming
Bytes/
Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 470539