Python wrapper for wolfSSL embedded SSL/TLS library.
 
 
Go to file
lealem47 0a8a76c6d4
Merge pull request #42 from danielinux/prepare-5.6.0-0
Updating wolfSSL to v5.6.0
2023-05-02 09:30:53 -06:00
.github/workflows Add GitHub Actions 2022-05-13 11:54:47 +02:00
certs Adding CRL support 2022-08-29 23:00:52 -07:00
docs Minor spelling fixes. 2022-02-07 11:17:40 -08:00
examples Adding DTLS13 support 2022-08-29 23:00:52 -07:00
lib Updating wolfSSL to v5.6.0 2023-05-02 12:38:28 +02:00
requirements Modernize 2020-11-05 09:36:24 -08:00
tests Add support for disable-oldtls 2022-07-22 13:20:13 +01:00
wolfssl Updating wolfSSL to v5.6.0 2023-05-02 12:38:28 +02:00
.gitignore Refactor build to be more Python-like 2022-02-08 15:04:22 +00:00
.gitmodules Backport fixes from wolfcrypt-py 2022-01-31 14:56:55 +00:00
ChangeLog.rst Updating wolfSSL to v5.6.0 2023-05-02 12:38:28 +02:00
LICENSING.rst moving files from wolfssl/wrapper/python/wolfssl to here 2017-12-19 13:55:23 -03:00
MANIFEST.in Add ChangeLog file 2022-08-09 07:45:05 +01:00
Makefile Backport fixes from wolfcrypt-py 2022-01-31 14:56:55 +00:00
README.rst Add prerequisites section to README 2022-07-13 16:23:45 +02:00
setup.py Update to version 5.5.3 2022-11-03 14:37:54 +01:00
tox.ini Update to wolfSSL 5.3.0 2022-05-12 18:48:33 +02:00

README.rst

Welcome
=======

**wolfSSL Python**, a.k.a. ``wolfssl`` is a Python module
that encapsulates `wolfSSL's SSL/TLS library
<https://wolfssl.com/wolfSSL/Products-wolfssl.html>`_.

The **wolfSSL SSL/TLS library** is a lightweight, portable, C-language-based
library targeted at IoT, embedded, and RTOS environments primarily because of
its size, speed, and feature set. It works seamlessly in desktop, enterprise,
and cloud environments as well.

Prerequisites
=============

Linux
-----

During installation via pip this will download the wolfSSL source and compile it, it therefore needs the same prerequisites as the wolfSSL C library. Therefore in Debian / Ubuntu you should do:

.. code-block:: bash

   $ sudo apt install build-essential
   $ sudo apt build-dep libwolfssl-dev

Compiling
=========

The `setup.py` file covers most things you will need to do to build and install from source. As pre-requisites you will need to install either from your OS repository or pip. You'll also need the Python development package for your Python version:

* `cffi`
* `tox`
* `pytest`

To build a source package run `python setup.py sdist`, to build a wheel package run `python setup.py bdist_wheel`. To test the build run `tox`. The `tox` tests rely on Python 3.9 being installed, if you do not have this version we recommend using `pyenv` to install it.

Installation
============

We provide Python wheels (prebuilt binaries) for OSX 64 bits and Linux 64 bits:

.. code-block:: bash

    $ pip install wheel
    $ pip install wolfssl

To build wolfssl-py from source:

.. code-block:: bash

    $ cd wolfssl-py
    $ pip install .

The default pip install clones wolfSSL from GitHub. To build wolfssl-py using a
local installation of the native wolfSSL C library, the USE_LOCAL_WOLFSSL
environment variable should be set.  USE_LOCAL_WOLFSSL can be set to "1" to use
the default library installation location (/usr/local/lib, /usr/local/include),
or to use a custom location it can be set to the install location of your native
wolfSSL library.  For example:

.. code-block:: bash

    # Uses default install location
    $ USE_LOCAL_WOLFSSL=1 pip install .

    # Uses custom install location
    $ USE_LOCAL_WOLFSSL=/tmp/install pip install .

Testing
=======

To run the tox tests in the source code, you'll need ``tox`` and a few other
requirements.

1. Make sure that the testing requirements are installed:

.. code-block:: shell

    sudo -H pip install -r requirements/test.txt


2. Run ``make check``:

.. code-block:: console

    $ make check
    ...
    _________________________________ summary _________________________________
    py3: commands succeeded
    congratulations :)

Support
=======

For support and questions, please email support@wolfssl.com.