- SSL_CloseLibrary
void SSL_CloseLibrary()
- SSL_CloseLibrary
void SSL_CloseLibrary()
- SSL_OpenLibrary
bool SSL_OpenLibrary()
- SSL_OpenLibrary
void SSL_OpenLibrary()
- SSL_x509_get_DER_as_B64URL
char[] SSL_x509_get_DER_as_B64URL(X509_REQ* x509_req)
Get a CSR as base64url-encoded DER string
- SSL_x509_get_PEM
char[] SSL_x509_get_PEM(X509_REQ* x509_req)
- SSL_x509_make_csr
X509_REQ* SSL_x509_make_csr(EVP_PKEY* pkey, string[] domainNames)
Make a x509 CSR (cert signing request)
@param pkey pointer to pkey struct to store
@param dev_serial pointer to device serial string
- SSL_x509_make_csr
X509_REQ* SSL_x509_make_csr(EVP_PKEY* pkey, string[] domainNames)
- SSL_x509_make_pkey
EVP_PKEY* SSL_x509_make_pkey(int bits)
- SSL_x509_make_pkey
EVP_PKEY* SSL_x509_make_pkey(int bits)
- SSL_x509_read_pkey
EVP_PKEY* SSL_x509_read_pkey(char[] path)
Read a x509 pkey from a file
@param path pathname of file to read
- SSL_x509_read_pkey_memory
EVP_PKEY* SSL_x509_read_pkey_memory(char[] pkeyString, RSA** rsaRef)
Read a x509 pkey pem string from memory
- SSL_x509_write_pkey
int SSL_x509_write_pkey(char[] path, EVP_PKEY* pkey)
Save a x509 pkey to a file
@param path pathname of file to write
@param pkey pointer to pkey struct to store
- base64EncodeUrlSafe
char[] base64EncodeUrlSafe(T t)
Encode data as URl-safe Base64
- base64EncodeUrlSafe
char[] base64EncodeUrlSafe(BIGNUM* bn)
Encode BIGNUM data as URl-safe Base64
- convertDERtoPEM
string convertDERtoPEM(char[] der)
Convert certificate from DER format to PEM format
- extractExpiryData
T extractExpiryData(const(char[]) cert)
Extract expiry date from a PEM encoded Zertificate
- getBigNumber
string getBigNumber(BIGNUM* bn)
Get the contents of a big number as string
- getBigNumberBytes
ubyte[] getBigNumberBytes(BIGNUM* bn)
Get the content bytes of a big number as string
- openSSL_CreateCertificateSignRequest
char[] openSSL_CreateCertificateSignRequest(char[] prkey, string[] domainNames)
Create a SSL cert signing request from a pkey and a serial number
- openSSL_CreatePrivateKey
char[] openSSL_CreatePrivateKey(int bits)
- sha256Encode
auto sha256Encode(char[] s)
Calculate the SHA256 of a string
- signDataWithSHA256
char[] signDataWithSHA256(char[] s, EVP_PKEY* privateKey)
Sign a given string with an SHA256 hash
- toVector
char[] toVector(BIO* bio)
Export BIO contents as an array of chars
Small helpers for openssl
This module contains all the OpenSSL related helpers to wrap functionality of the D language binding provided by the dub module 'openssl'.
See: https://github.com/D-Programming-Deimos/openssl
Note: The D binding seem to be outdated or otherwise broken. At least some code only works in C. That's why a C stub was added. However, the code is still available in D below in hope that things can be fixed later.