beautypg.com

Ssl initialization – Zilog EZ80F91AZA User Manual

Page 27

background image

UM020107-1211

SSL Configuration

ZTP Network Security SSL Plug-In

User Manual

21

Adding SSL Headers to the List of Include Paths

To access the SSL API, it is necessary to include the

SSL.h

header file in your application

program. The

SSL.h

header file also includes other SSL-related header files. For your

ZDS II project to build correctly, the path for all of the SSL-related header files must be
specified in the Include paths input section in the

Preprocessor

tab of the

Project

Settings

C

menu. The default location of the SSL-related header files depends on the

version of ZTP used; these paths are:


..\ZTP\Apps\Crypto\Inc for source package

..\ZTP\Inc for Library

Add the location of the above SSL-related header files to both the

User

and

Standard

text

fields.

Linking the SSL Libraries

Before ZDS II can link a project using the SSL API, the SSL libraries to be used must be
specified in the

Object/library

modules

text field in either the

General

or

Input

cat-

egories on the

Linker

tab of the

Project Settings

menu. Zilog recommends that you

always include all SSL-related libraries in the linker settings, and allow the ZDS II linker
to decide which libraries are used and which are ignored. Adding unused libraries to the
list of object/library modules does not increase the size of the final application. When
specifying libraries, be sure to separate each library using a semicolon character (;).

The libraries listed in Table 3 are used to work with SSL.

SSL Initialization

Before attempting to initialize any of the SSL handshake protocols or using the SSL inter-
face layer, the application program must call the

Initialize_SSL

API. This API acti-

vates the interface used by application programs to establish SSL sessions and securely
transfer information. Because SSL uses the TCP transport layer, TCP must also be initial-
ized to enable SSL functionality.

The

Initialize_SSL

API takes no parameters and will return either

SSL_SUCESS

or

SSL_FAILURE

. If

Initialize_SSL

is called more than once, all subsequent calls will

fail.

Table 3. SSL Libraries

Library

Description

Crypto_SSL.lib

Contains SSL and Crypto files.

ZTPSSLCore.lib

Contains the socket files that are used for SSL.

This manual is related to the following products: