Pony wrappers for OpenSSL and LibreSSL.
Status
Production ready.
Installation
- Install corral
corral add github.com/ponylang/ssl.git --version 2.0.1corral fetchto fetch your dependenciesuse "ssl/crypto"to include thecryptosub-packageuse "ssl/net"to include thenetsub-packagecorral run -- ponycto compile your application
Supported SSL versions
OpenSSL 1.1.x, OpenSSL 3.0.x, and LibreSSL are supported. Select the library version at compile-time using Pony's compile time definition functionality.
Using OpenSSL 1.1.x
corral run -- ponyc -Dopenssl_1.1.x
Using OpenSSL 3.0.x
corral run -- ponyc -Dopenssl_3.0.x
Using LibreSSL
corral run -- ponyc -Dlibressl
Dependencies
ssl requires either LibreSSL or OpenSSL in order to operate. You'll might need to install it within your environment of choice.
Installing on APT based Linux distributions
sudo apt-get install -y libssl-dev
Installing on Alpine Linux
apk add --update libressl-dev
Installing on Arch Linux
Installing on macOS with Homebrew
brew update brew install libressl
Installing on macOS with MacPorts
sudo port install libressl
Installing on RPM based Linux distributions with dnf
sudo dnf install openssl-devel
Installing on RPM based Linux distributions with yum
sudo yum install openssl-devel
Installing on RPM based Linux distributions with zypper
sudo zypper install libopenssl-devel
Installing on Windows
If you use Corral to include this package as dependency of a project, Corral will download and build LibreSSL for you the first time you run corral fetch. Otherwise, before using this package, you must run .\make.ps1 libs in its base directory to download and build LibreSSL for Windows. In both cases, you will need CMake (3.15 or higher) and 7Zip (7z.exe) in your PATH; and Visual Studio 2017 or later (or the Visual C++ Build Tools 2017 or later) installed in your system.
You should pass --define libressl to Ponyc when using this package on Windows.