Files

31 lines
1.3 KiB
Plaintext

# ============================================================
# openssl — Viper FFI binding package for OpenSSL 3.x
#
# Usage:
# import openssl
# v = openssl.OpenSSL_version(openssl.OpenSslVersion) # version text
# openssl.OPENSSL_init_ssl(0, None)
#
# Notes:
# * Everything is extern FFI (extern def, directly bound to libcrypto/libssl
# exported symbols), with no C++ bridge layer; objects are all opaque pointers (the *Ptr typedefs in openssl.types).
# * Headers are grouped by the official openssl headers: crypto/err/rand/sha/md5/hmac/objects/
# evp/bio/pem/x509/ssl.
# * Functions that return pointers return *Ptr; after acquiring an object, call the corresponding *_free/SSL_free etc. to release it as needed.
# * Password-callback parameters are always placeholder bytes; pass t.CPtr(0)/None when unused.
# * Linked libraries: libcrypto + libssl (on Windows with mingw, this means -lcrypto -lssl).
# ============================================================
from openssl.types import *
from openssl.crypto import *
from openssl.err import *
from openssl.rand import *
from openssl.sha import *
from openssl.md5 import *
from openssl.hmac import *
from openssl.objects import *
from openssl.evp import *
from openssl.bio import *
from openssl.pem import *
from openssl.x509 import *
from openssl.ssl import *