Python wrapper for wolfSSL embedded SSL/TLS library.
 
 
Go to file
Andrew Hutchings b34b40f7f4 Update wolfSSL to 5.1.1 and fix any issues
* Bumps to wolfSSL 5.1.1
* Fixup `make clean`
* Move `wolfssl` src to root
* Switch test from DigiCert to GlobalSign (`python.org` ditched DigiCert
  years ago)
* Make SSLContext call `wolfSSL_Init()` which fixes a few issues
* Make `setup.py` compile CFFI and wolfSSL C code
* Fully enable SSLv3 support
* Add TLSv1.3 support
* Fix bug in `wolfSSL_Free()` usage
* Update `tox.ini` to a currently supported platform
2022-01-20 12:13:57 +00:00
certs Update wolfSSL to 5.1.1 and fix any issues 2022-01-20 12:13:57 +00:00
docs update copyright to 2020 2020-01-03 16:24:35 -08:00
examples update copyright to 2020 2020-01-03 16:24:35 -08:00
make Modernize 2020-11-05 09:36:24 -08:00
requirements Modernize 2020-11-05 09:36:24 -08:00
tests Update wolfSSL to 5.1.1 and fix any issues 2022-01-20 12:13:57 +00:00
wolfssl Update wolfSSL to 5.1.1 and fix any issues 2022-01-20 12:13:57 +00:00
.gitignore
.travis.yml add language python for linux 2020-11-05 11:10:21 -08:00
LICENSING.rst
MANIFEST.in
Makefile Update wolfSSL to 5.1.1 and fix any issues 2022-01-20 12:13:57 +00:00
README.rst Update wolfSSL to 5.1.1 and fix any issues 2022-01-20 12:13:57 +00:00
setup.py Update wolfSSL to 5.1.1 and fix any issues 2022-01-20 12:13:57 +00:00
tox.ini Update wolfSSL to 5.1.1 and fix any issues 2022-01-20 12:13:57 +00:00

README.rst

Welcome
=======

.. image:: https://travis-ci.org/wolfSSL/wolfssl-py.svg?branch=master
    :target: https://travis-ci.org/wolfSSL/wolfssl-py

**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.

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 locaiton 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 .

Tests
=====

To run the tests that ship with wolfssl-py, after compiling the library run
one of the following commands:

.. code-block:: bash

    $ pytest
    $ py.test tests

Note: If you used USE_LOCAL_WOLFSSL in the installation step or otherwise have
wolfSSL installed in a non-standard location, you'll need to prepend `pytest`
with `USE_LOCAL_WOLFSSL=<path/to/wolfssl>`.

Support
=======

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