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.

Default TLS configuration is to always accept incoming TLS requests (VortexTlsAcceptQuery).

This function does not disable the possibility to connect to a remote peer and request TLS security. In only applies to incoming requests on the provided vortex context.

There are an alternative method which provides more control over the TLS process. This is controlled by the following functions:

Previous functions allows application layer to provide handlers that are executed to create the TLS context (SSL_CTX), configuring all parameters required. See also VortexTlsCtxCreation handler for more information.

Along with previous functions, the following allows to provide some callbacks to perform additional TLS post-checks.

NOTE: Using vortex_tls_set_ctx_creation or vortex_tls_set_default_ctx_creation function will cause the following handlers to be not called:

This is because providing a function to create the SSL context (SSL_CTX) assumes the application layer on top of Vortex Library wants to take control over the SSL configuration process. This ensures Vortex Library will not do any additional configure operation once created the SSL context (SSL_CTX).

Parameters
accept_handlerA handler executed to notify user app level that a TLS request was received, allowing to accept or deny it according to the value returned by the handler. You can use NULL value for this parameter. This will make Vortex Library to set the default accept handler which always accept every TLS negotiation.
certificate_handlerA handler executed to know where is located the certificate file to be used to cipher the session. You can use NULL value for this parameter. This will make Vortex Library to set the default certificate handler which returns a path to a test certificate. It is highly recommended to set this handler, however you can use NULL value for development environment.
private_key_handlerA handler executed to know where is located the private key file to be used to cipher the session. You can use NULL value for this parameter. This will make Vortex Library to set the default private key handler which returns a path to the test private key. It is highly recommended to set this handler, however you can use NULL values under development environment.
ctxThe context where the operation will be performed.
Returns
Returns axl_true if the current vortex context instance could accept incoming TLS connections, otherwise axl_false is returned.

References vortex_ctx_get_data(), vortex_profiles_register(), vortex_profiles_register_extended_start(), vortex_tls_init(), and VORTEX_TLS_PROFILE_URI.