X509_STORE *verify_store;
int verify_mode = SSL_VERIFY_NONE;
int ctx_options = 0;
- void *app_data_index;
/*
* This addresses memory leaks in OpenSSL 1.0.2
/*
* Save the config on the context so that callbacks which
- * only get SSL_CTX* e.g. session persistence, can get it
+ * only get SSL_CTX* e.g. session persistence, can get at it.
*/
- memcpy(&app_data_index, &conf, sizeof(app_data_index));
- SSL_CTX_set_app_data(ctx, app_data_index);
+ SSL_CTX_set_app_data(ctx, UNCONST(void *, conf));
/*
* Identify the type of certificates that needs to be loaded
* @param[in] arg The #fr_tls_session_t holding the SSL session.
*/
void fr_tls_session_msg_cb(int write_p, int msg_version, int content_type,
- void const *inbuf, size_t len,
- SSL *ssl, void *arg)
+ void const *inbuf, size_t len,
+ SSL *ssl, void *arg)
{
- uint8_t const *buf = inbuf;
+ uint8_t const *buf = inbuf;
fr_tls_session_t *session = talloc_get_type_abort(arg, fr_tls_session_t);
request_t *request = SSL_get_ex_data(session->ssl, FR_TLS_EX_INDEX_REQUEST);
session_msg_log(request, session, (uint8_t const *)inbuf, len);
}
-static inline fr_pair_t *fr_tls_session_cert_attr_add(TALLOC_CTX *ctx, request_t *request, fr_pair_list_t *pair_list,
- int attr, int attr_index, char const *value)
+static inline CC_HINT(always_inline)
+fr_pair_t *fr_tls_session_cert_attr_add(TALLOC_CTX *ctx, request_t *request, fr_pair_list_t *pair_list,
+ int attr, int attr_index, char const *value)
{
fr_pair_t *vp;
fr_dict_attr_t const *da = *(cert_attr_names[attr][attr_index]);