Coder Social home page Coder Social logo

vanlink / lwip_openssl Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 3.43 MB

Integrate openssl into LWIP.

License: GNU General Public License v3.0

CMake 2.01% Shell 0.07% C 79.91% Makefile 0.44% C# 4.37% Batchfile 0.02% JavaScript 12.69% CSS 0.47% Perl 0.04%
lwip openssl

lwip_openssl's Introduction

INTRODUCTION

lwIP is a small independent implementation of the TCP/IP protocol suite. (https://savannah.nongnu.org/projects/lwip/)

lwIP supports TLS basing on mbedtls. (https://www.trustedfirmware.org/projects/mbed-tls/)

This project integrates OpenSSL into lwIP.

HOW TO USE

Tested on CentOS 8

  1. Install OpenSSL
yum install openssl openssl-devel
  1. Create tap interface and net bridge.
ip tuntap add dev tap0 mode tap
ip link set tap0 up
brctl addbr lwipbridge
brctl addbr lwipbridge
brctl addif lwipbridge tap0
ip addr add 192.168.1.1/24 dev lwipbridge
ip link set dev lwipbridge up
  1. Start an HTTPS server (e.g. Nginx) and listen on port 443.

  2. Compile and run.

cd lwip
cp ./contrib/examples/example_app/lwipcfg.h.example ./contrib/examples/example_app/lwipcfg.h

# Uncomment "#define USE_DHCP 0" and "#define USE_AUTOIP 0", and set LWIP_OPENSSL_EXAMPLES_APP to 1
vim ./contrib/examples/example_app/lwipcfg.h

cd ./contrib/ports/unix/example_app/
mkdir build && cd build
cmake -DLWIP_DIR=../../../.. ..
make

# Run the test app
./example_app

When you run example_app, it will send an HTTPs request "GET /" to 192.168.1.1:443 (which is the IP of lwipbridge), and read the response then print it.

It also starts an HTTPs server listening on 192.168.1.200:443, and you can do "curl -k -v https://192.168.1.200/".

lwip_openssl's People

Contributors

vanlink avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.