SSL

Introduction

This example is a port of the openssl package for the Lightfoot system. The port has been stripped down, but can be configured using the setup.mk and opensslconf.h files.

Building the example

Change directory to the ssl example
    cd %LF_HOME%\examples\ssl
Rebuild the application
    lfmake clean all

Running the example

When the example runs, it uses a secure socket to send an HTML query to port 443 on the server specified in the config.xml file. This server must be able to establish a secure socket connection and return a default web page.

You can install openssl and configure and run a simple web server using the following commands. This assumes that openssl is in the path.

    openssl req -new -x509 -out CAcert.pem -keyout CAkey.pem
    openssl s_server -cert CAcert.pem -key CAkey.pem -www -accept 443


To run the example on the board
    lfdownload example\ssl.bin

You should see a number of connecting messages and then the response back from the server.

Features

This example demonstrates the following SDK features.