Copyright
Copyright © 2025 Dejan Lekic
License
Boost Software License, Version 1.0
Linux OpenSSL TLS Implementation
This module provides TLS/SSL support for Linux using the OpenSSL library. It implements the eve.tls.api contract using OpenSSL's libssl/libcrypto.
Opaque SSL context pointer.
Opaque SSL connection pointer.
Opaque X509 certificate pointer.
Opaque BIO (Basic I/O) pointer.
OpenSSL context wrapper.
Manages the lifecycle of an SSL_CTX object and provides methods for configuring TLS parameters.
private SSL_CTX ctx_TlsErrorCode initialize(ref const(TlsContext) tlsCtx) @trusted nothrow @nogcInitialize the OpenSSL context from a TLS configuration.OpenSSL TLS Stream.
Provides TLS encryption/decryption over an underlying transport using OpenSSL. This struct implements the TLS stream interface defined in eve.tls.api.
Transport | The underlying transport type (must support read/write). |
Transport * transport_TlsContext context_OpenSslContext sslContext_SSL ssl_TlsState state_HandshakeState handshakeState_TlsErrorCode lastError_this(Transport * transport, TlsContext ctx)Construct a TLS stream over the given transport.int OPENSSL_init_ssl(ulong opts, void * settings)SSL_CTX SSL_CTX_new(SSL_METHOD method)void SSL_CTX_free(SSL_CTX ctx)long SSL_CTX_ctrl(SSL_CTX ctx, int cmd, long larg, void * parg)void SSL_CTX_set_verify(SSL_CTX ctx, int mode, void * callback)int SSL_CTX_load_verify_locations(SSL_CTX ctx, const(char) * CAfile, const(char) * CApath)int SSL_CTX_use_certificate_file(SSL_CTX ctx, const(char) * file, int type)int SSL_CTX_use_PrivateKey_file(SSL_CTX ctx, const(char) * file, int type)int SSL_set_fd(SSL ssl, int fd)int SSL_connect(SSL ssl)int SSL_accept(SSL ssl)int SSL_get_error(SSL ssl, int ret)int SSL_shutdown(SSL ssl)X509 SSL_get1_peer_certificate(SSL ssl)char * X509_NAME_oneline(void * name, char * buf, int size)void * X509_get_subject_name(X509 cert)void * X509_get_issuer_name(X509 cert)int tlsVersionToOpenSSL(TlsVersion ver) pure @safe nothrow @nogcConvert TlsVersion to OpenSSL protocol version constant.int verifyModeToOpenSSL(TlsVerifyMode mode) pure @safe nothrow @nogcConvert TlsVerifyMode to OpenSSL verification flags.TlsErrorCode sslErrorToCode(int sslError) pure @safe nothrow @nogcConvert OpenSSL error code to TlsErrorCode.SSL_FILETYPE_PEM = 1SSL_ERROR_NONE = 0SSL_ERROR_SSL = 1SSL_ERROR_WANT_READ = 2SSL_ERROR_WANT_WRITE = 3SSL_ERROR_SYSCALL = 5SSL_ERROR_ZERO_RETURN = 6SSL_VERIFY_NONE = 0x00SSL_VERIFY_PEER = 0x01SSL_VERIFY_FAIL_IF_NO_PEER_CERT = 0x02SSL_VERIFY_CLIENT_ONCE = 0x04TLS1_VERSION = 0x0301TLS1_1_VERSION = 0x0302TLS1_2_VERSION = 0x0303TLS1_3_VERSION = 0x0304