Defines | Typedefs | Enumerations | Functions

Vortex TLS: TLS profile support and related functions

Defines

#define VORTEX_TLS_PROFILE_URI   "http://iana.org/beep/TLS"
 TLS Profile unique URI identifier.

Typedefs

typedef axl_bool(* VortexTlsAcceptQuery )(VortexConnection *connection, const char *serverName)
 Handler definition for those function used to configure if a given TLS request should be accepted or denied.
typedef void(* VortexTlsActivation )(VortexConnection *connection, VortexStatus status, char *status_message, axlPointer user_data)
 Async notifications for TLS activation.
typedef char *(* VortexTlsCertificateFileLocator )(VortexConnection *connection, const char *serverName)
 Handler definition for those function allowing to locate the certificate file to be used while enabling TLS support.
typedef axlPointer(* VortexTlsCtxCreation )(VortexConnection *connection, axlPointer user_data)
 Handler definition used by the TLS profile, to allow the application level to provide the function that must be executed to create an (SSL_CTX *) object, used to perform the TLS activation.
typedef void(* VortexTlsFailureHandler )(VortexConnection *connection, const char *error_message, axlPointer user_data)
 Handler called when a failure is found during TLS handshake.
typedef axl_bool(* VortexTlsPostCheck )(VortexConnection *connection, axlPointer user_data, axlPointer ssl, axlPointer ctx)
 Allows to configure a post-condition function to be executed to perform additional checkings.
typedef char *(* VortexTlsPrivateKeyFileLocator )(VortexConnection *connection, const char *serverName)
 Handler definition for those function allowing to locate the private key file to be used while enabling TLS support.

Enumerations

enum  VortexDigestMethod { VORTEX_SHA1 = 1, VORTEX_MD5 = 2 }
 

Digest method provided.

More...

Functions

axl_bool vortex_tls_accept_negotiation (VortexCtx *ctx, VortexTlsAcceptQuery accept_handler, VortexTlsCertificateFileLocator certificate_handler, VortexTlsPrivateKeyFileLocator private_key_handler)
 Allows to configure if the provided Vortex context will accept TLS incoming connections.
char * vortex_tls_get_digest (VortexDigestMethod method, const char *string)
 Allows to create a digest from the provided string.
char * vortex_tls_get_digest_sized (VortexDigestMethod method, const char *content, int content_size)
 Allows to create a digest from the provided string, configuring the size of the string to be calculated.
char * vortex_tls_get_peer_ssl_digest (VortexConnection *connection, VortexDigestMethod method)
 Allows to return the certificate digest from the remote peer given TLS session is activated (this is also called the certificate fingerprint).
axlPointer vortex_tls_get_ssl_object (VortexConnection *connection)
 Returns the SSL object associated to the given connection.
axl_bool vortex_tls_init (VortexCtx *ctx)
 Initialize TLS library.
void vortex_tls_set_auto_tls (VortexCtx *ctx, int enabled, int allow_tls_failures, const char *serverName)
 Allows to activate TLS profile automatic negotiation for every connection created.
void vortex_tls_set_common_data (VortexConnection *connection, SSL *ssl, SSL_CTX *_ctx)
 Common function which sets needed data for the TLS transport and default callbacks for read and write data.
void vortex_tls_set_ctx_creation (VortexConnection *connection, VortexTlsCtxCreation ctx_creation, axlPointer user_data)
 Allows to configure the SSL context creation function.
void vortex_tls_set_default_ctx_creation (VortexCtx *ctx, VortexTlsCtxCreation ctx_creation, axlPointer user_data)
 Allows to configure the default SSL context creation function to be called when it is required a SSL_CTX object.
void vortex_tls_set_default_post_check (VortexCtx *ctx, VortexTlsPostCheck post_check, axlPointer user_data)
 Allows to configure a function that will be executed at the end of the TLS process, before returning the connection to the application level.
void vortex_tls_set_failure_handler (VortexCtx *ctx, VortexTlsFailureHandler failure_handler, axlPointer user_data)
 Allows to configure a failure handler that will be called when a failure is found at SSL level or during the handshake with the particular function failing.
void vortex_tls_set_post_check (VortexConnection *connection, VortexTlsPostCheck post_check, axlPointer user_data)
 Allows to configure a function that will be executed at the end of the TLS process, before returning the connection to the application level.
void vortex_tls_start_negotiation (VortexConnection *connection, const char *serverName, VortexTlsActivation process_status, axlPointer user_data)
 Starts the TLS transport security negotiation on the given connection.
VortexConnectionvortex_tls_start_negotiation_sync (VortexConnection *connection, const char *serverName, VortexStatus *status, char **status_message)
 Allows to start a TLS profile negotiation in a synchronous way (blocking the caller).