acme.openssl_helpers

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

Members

Aliases

tupleCsrPkey
alias tupleCsrPkey = Tuple!(string, "csr", string, "pkey")

Return tuple of makeCertificateSigningRequest

Functions

C_SSL_CloseLibrary
void C_SSL_CloseLibrary()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
C_SSL_OpenLibrary
bool C_SSL_OpenLibrary()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
C_SSL_x509_make_cert
X509* C_SSL_x509_make_cert(EVP_PKEY* pkey, char* subject)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
C_SSL_x509_make_csr
X509_REQ* C_SSL_x509_make_csr(EVP_PKEY* pkey, char** domainNames, int domainNamesLength)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
C_SSL_x509_make_pkey
EVP_PKEY* C_SSL_x509_make_pkey(int bits)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
C_X509_get_notAfter
ASN1_TIME* C_X509_get_notAfter(char* certPtr, int certLen)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
C_add_ext
bool C_add_ext(X509* cert, int nid, char* value)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SSL_CloseLibrary
void SSL_CloseLibrary()

Teardown SSL library

SSL_CloseLibrary
void SSL_CloseLibrary()
Undocumented in source. Be warned that the author may not have intended to support it.
SSL_OpenLibrary
bool SSL_OpenLibrary()

Initialize SSL library

SSL_OpenLibrary
bool SSL_OpenLibrary()
Undocumented in source. Be warned that the author may not have intended to support it.
SSL_x509_get_PEM
char[] SSL_x509_get_PEM(X509_REQ* csr)

Get a CSR as PEM string

SSL_x509_make_cert
X509* SSL_x509_make_cert(EVP_PKEY* pkey, char[] dev_serial)

Make a x509 cert

SSL_x509_make_cert
X509* SSL_x509_make_cert(EVP_PKEY* pkey, char[] subject)
Undocumented in source. Be warned that the author may not have intended to support it.
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)
Undocumented in source. Be warned that the author may not have intended to support it.
SSL_x509_make_pkey
EVP_PKEY* SSL_x509_make_pkey(int bits)

Make a x509 pkey

SSL_x509_make_pkey
EVP_PKEY* SSL_x509_make_pkey(int bits)
Undocumented in source. Be warned that the author may not have intended to support it.
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_cert
int SSL_x509_write_cert(char[] path, X509* x509)

Save a x509 cert to a file @param path pathname of file to write @param x509 pointer to x509 struct to store

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

base64Encode
char[] base64Encode(T t)

Encode data as Base64

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

makeCertificateSigningRequest
tupleCsrPkey makeCertificateSigningRequest(string[] domainNames)

Create a CSR with our domains

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)

Create a SSL private key

sha256Encode
ubyte[SHA256_DIGEST_LENGTH] 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

toString
string toString(BIO* bio)

Export BIO contents as an array of immutable chars (string)

toVector
char[] toVector(BIO* bio)

Export BIO contents as an array of chars

Meta