MatrixSSL Integration for GoAhead WebServer
2.5
GoAhead WebServer 2.5 includes a fully supported layer to the PeerSec MatrixSSL 3 library. This
document describes how to compile and configure an SSL-enabled Web server.
Building an SSL-enabled Web server with MatrixSSL! 2
Makefile-based LINUX/MACOSX/POSIX builds ! 2
Visual Studio Express Windows Builds! 4
Testing the Secure Web server! 16
Configuring the secure Web server! 17
SSL Options! 17
Building an SSL-enabled Web server with MatrixSSL
MatrixSSL source is not included in the WebServer package. The MatrixSSL library must first be
downloaded from http://www.matrixssl.org.
Makefile-based LINUX/MACOSX/POSIX builds
The WebServer package contains maintained Makefile build systems for the LINUX and MAC OS X
platforms. These supported Makefiles include mechanisms for detecting a MatrixSSL source directory
at the top level WebServer directory and automatically enabling the compile and link options to
generate an SSL-enabled server.
1. Unzip/untar the WebServer 2.5 package to the directory of your choosing.
2. Unzip/untar the MatrixSSL 3 package to the top directory of that WebServer directory:
!$> cd webs-2-5
!$> tar -xzvf matrixssl-3-1-3-open.tgz
!$> ls -d matrix*
!matrixSSLSocket.c! ! matrixssl-3-1-3-open
!matrixSSLSocket.h! ! matrixssl-3-1-3-open.tgz
3. Change directory to the matrixssl source, compile the package, and confirm the library was
successfully created:
!$> cd matrixssl-3-1-3-open
!$> make
!$> ls libmatrixssl.a
!libmatrixssl.a
4. Return to the WebServer source directory in the proper OS_Type subdirectory and compile. This
example shows the LINUX OS_Type:
!$> cd ../LINUX
!$> pwd
!/Users/john/webs-2-5/LINUX
!$> make
5. Confirm through the build output that there were no errors, that the webs objects were generated
with the WEBS_SSL_SUPPORT preprocessor define enabled, and that the executable was linked
with the libmatrixssl.a static object. For example:
!cc -c -o ../webs.o -Os -DWEBS -DUEMF -DPOSIX -DOS="MACOSX" -DMACOSX -
DUSER_MANAGEMENT_SUPPORT -DDIGEST_ACCESS_SUPPORT -DWEBS_SSL_SUPPORT -I../
matrixssl-3-1-2-open/ -I.. ../webs.c
!cc -o webs -Os -DWEBS -DUEMF -DPOSIX -DOS="MACOSX" -DMACOSX -DUSER_MANAGEMENT_SUPPORT -
DDIGEST_ACCESS_SUPPORT -DWEBS_SSL_SUPPORT -I../matrixssl-3-1-2-open/ -I.. main.o
libwebs.a ../matrixssl-3-1-2-open/libmatrixssl.a
6. Confirm SSL support by executing the WebServer server application and connecting a local Web
browser using HTTPS on port 4433 (https://localhost:4433).
Troubleshooting
The mechanism for detecting the presence of a MatrixSSL source directory is based on a simple ‘ls’
shell command. If the MatrixSSL source directory is not being correctly detected, manually edit the
Makefile so that the SSLINC, SSLLIB, SSLWS, and OPT_FILES macros are defined as shown in the
file.
!
Visual Studio Express Windows Builds
The WebServer and MatrixSSL packages both contain Visual Studio Express project files. The
WebServer package contains a solution file that should be used to add both the project files to. Once
the MatrixSSL project file is loaded, there are a few manual changes the user must make for the
WebServer solution to succeed.
1. Extract the WebServer package to a directory of your choosing.
2. Extract the MatrixSSL 3 package to the top level directory of the WebServer source. The directory
structure should now look like the following:
3. Navigate to the WIN directory of the WebServer package and open the SSL version of the Visual
Studio solution, websSSL.sln.
4. Add the MatrixSSL project to the solution by right-clicking the websSSL solution, clicking Add,
and then clicking Existing Project.
- 1
- 2
前往页