Macros | Typedefs | Enumerations | Functions
Vortex TLS: TLS profile support and related functions

Macros

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

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. More...
 
typedef void(* VortexTlsActivation )(VortexConnection *connection, VortexStatus status, char *status_message, axlPointer user_data)
 Async notifications for TLS activation. More...
 
typedef char *(* VortexTlsCertificateFileLocator )(VortexConnection *connection, const char *serverName)
 Handler definition for those functions that allows to locate the certificate file to be used while enabling TLS support. More...
 
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. More...
 
typedef void(* VortexTlsFailureHandler )(VortexConnection *connection, const char *error_message, axlPointer user_data)
 Handler called when a failure is found during TLS handshake. More...
 
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. More...
 
typedef char *(* VortexTlsPrivateKeyFileLocator )(VortexConnection *connection, const char *serverName)
 Handler definition for those functions that allows to locate the private key file to be used while enabling TLS support. More...
 

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. More...
 
char * vortex_tls_get_digest (VortexDigestMethod method, const char *string)
 Allows to create a digest from the provided string. More...
 
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. More...
 
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). More...
 
char * vortex_tls_get_ssl_digest (const char *path, VortexDigestMethod method)
 Allows to return the certificate digest from a local stored certificate file (this is also called the certificate fingerprint). More...
 
axlPointer vortex_tls_get_ssl_object (VortexConnection *connection)
 Returns the SSL object associated to the given connection. More...
 
axl_bool vortex_tls_init (VortexCtx *ctx)
 Initialize TLS library. More...
 
void vortex_tls_set_auto_tls (VortexCtx *ctx, axl_bool enabled, axl_bool allow_tls_failures, const char *serverName)
 Allows to activate TLS profile automatic negotiation for every connection created. More...
 
void vortex_tls_set_ctx_creation (VortexConnection *connection, VortexTlsCtxCreation ctx_creation, axlPointer user_data)
 Allows to configure the SSL context creation function. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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). More...
 
axl_bool vortex_tls_verify_cert (VortexConnection *connection)
 Allows to verify peer certificate after successfully establish TLS session. More...
 

Detailed Description