{ NULL }
};
-fr_dict_attr_t const *attr_module_method;
+static fr_dict_attr_t const *attr_module_method;
extern fr_dict_attr_autoload_t module_method_attr[];
fr_dict_attr_autoload_t module_method_attr[] = {
}
}
+DIAG_OFF(used-but-marked-unused) /* fix spurious warnings for sk macros */
/** Print out the current stack of certs
*
* @param[in] file File where this function is being called.
}
_tls_ctx_print_cert_line(file, line, request, i, cert);
}
-
+DIAG_ON(used-but-marked-unused)
/** Print errors raised by OpenSSL I/O functions
*
*/
#define OCSP_MAX_VALIDITY_PERIOD (5 * 60)
+DIAG_OFF(used-but-marked-unused) /* fix spurious warnings for sk macros */
/** Extract components of OCSP responser URL from a certificate
*
* @param[in] cert to extract URL from.
}
return found_uri ? -1 : 0;
}
+DIAG_ON(used-but-marked-unused)
/** Set the OCSP TLS stapling extension for a SSL session, from cached response data
*
return 0;
}
+DIAG_OFF(used-but-marked-unused) /* fix spurious warnings for sk macros */
/** Callback used to get stapling data for the current server cert
*
* @param ssl Current SSL session.
return ret;
}
+DIAG_ON(used-but-marked-unused)
/** Sends a OCSP request to a defined OCSP responder
*
*/
* - >0 if a PSK matching identity was found (the length of bytes written to psk).
*/
unsigned int fr_tls_session_psk_client_cb(SSL *ssl, UNUSED char const *hint,
- char *identity, unsigned int max_identity_len,
- unsigned char *psk, unsigned int max_psk_len)
+ char *identity, unsigned int max_identity_len,
+ unsigned char *psk, unsigned int max_psk_len)
{
unsigned int psk_len;
fr_tls_conf_t *conf;
}
#endif /* PSK_MAX_IDENTITY_LEN */
+DIAG_OFF(used-but-marked-unused) /* Fix spurious warnings for sk_ macros */
/** Record session state changes
*
* Called by OpenSSL whenever the session state changes, an alert is received or an error occurs.
}
}
}
+DIAG_ON(used-but-marked-unused)
/** Print a message to the request or global log detailing handshake state
*
return vp;
}
+DIAG_OFF(used-but-marked-unused) /* fix spurious warnings for sk macros */
/** Extract attributes from an X509 certificate
*
* @param pair_list to copy attributes to.
* - < 0 on failure.
*/
int fr_tls_session_pairs_from_x509_cert(fr_pair_list_t *pair_list, TALLOC_CTX *ctx,
- fr_tls_session_t *session, X509 *cert, int depth)
+ fr_tls_session_t *session, X509 *cert, int depth)
{
char buffer[1024];
char attribute[256];
return 0;
}
+DIAG_ON(used-but-marked-unused)
/** Decrypt application data
*
#include "base.h"
#include "missing.h"
+DIAG_OFF(used-but-marked-unused) /* fix spurious warnings for sk macros */
/** Validates a certificate using custom logic
*
* Before trusting a certificate, we make sure that the certificate is
RDEBUG2("[verify client] = %s", my_ok ? "ok" : "invalid");
return my_ok;
}
+DIAG_ON(used-but-marked-unused)
/** Revalidates the client's certificate chain
*
# define CHECK_DBUFF_INIT(_sbuff)
#endif
+DIAG_OFF(overlength-strings) /* Seems broken */
/** Internal macro for defining dbuff move functions
* @private
*/
FR_DBUFF_MOVE_DEF(dbuff, dbuff_marker)
FR_DBUFF_MOVE_DEF(dbuff_marker, dbuff)
FR_DBUFF_MOVE_DEF(dbuff_marker, dbuff_marker)
+DIAG_ON(overlength-strings)
static inline CC_HINT(always_inline) size_t min(size_t x, size_t y)
{
TEST_CHECK(fr_dbuff_in(&dbuff2, *(uint32_t *)&fval1) == 4);
fr_dbuff_set_to_start(&dbuff2);
TEST_CHECK(fr_dbuff_out(&fval2, &dbuff2) == 4);
- TEST_CHECK(fval1 == fval2);
+ TEST_CHECK(memcmp(&fval1, &fval2, sizeof(fval1)) == 0);
fr_dbuff_set_to_start(&dbuff2);
TEST_CHECK(fr_dbuff_in(&dbuff2, *(uint64_t *)&dval1) == 8);
fr_dbuff_set_to_start(&dbuff2);
TEST_CHECK(fr_dbuff_out(&dval2, &dbuff2) == 8);
- TEST_CHECK(dval1 == dval2);
+ TEST_CHECK(memcmp(&fval1, &fval2, sizeof(fval1)) == 0);
TEST_CASE("Check variable length uint64_t read");
fr_dbuff_set_to_start(&dbuff1);
#include <ctype.h>
-#ifndef NDEBUG
-# define FREE_MAGIC (0xF4EEF4EE)
-#endif
-
/** Initialise a pair list header
*
* @param[in,out] list to initialise
*/
-inline void fr_pair_list_init(fr_pair_list_t *list)
+void fr_pair_list_init(fr_pair_list_t *list)
{
fr_dlist_talloc_init(&list->head, fr_pair_t, entry);
}
*
* @hidecallergraph
*/
-inline void fr_pair_list_free(fr_pair_list_t *list)
+void fr_pair_list_free(fr_pair_list_t *list)
{
fr_dlist_talloc_free(&list->head);
}
*
* @hidecallergraph
*/
-inline bool fr_pair_list_empty(fr_pair_list_t const *list)
+bool fr_pair_list_empty(fr_pair_list_t const *list)
{
return fr_dlist_empty(&list->head);
}
* - NULL on error
* - pointer to head of the child list.
*/
-inline fr_pair_list_t *fr_pair_children(fr_pair_t *vp)
+fr_pair_list_t *fr_pair_children(fr_pair_t *vp)
{
return pair_children(vp);
}
* - pointer to the first item in the list.
* @hidecallergraph
*/
-inline void *fr_pair_list_head(fr_pair_list_t const *list)
+void *fr_pair_list_head(fr_pair_list_t const *list)
{
return fr_dlist_head(&list->head);
}
* - pointer to the next item
* @hidecallergraph
*/
-inline void *fr_pair_list_next(fr_pair_list_t const *list, fr_pair_t const *item)
+void *fr_pair_list_next(fr_pair_list_t const *list, fr_pair_t const *item)
{
return fr_dlist_next(&list->head, item);
}
* - NULL if the head of the list has been reached
* - pointer to the previous item
*/
-inline void *fr_pair_list_prev(fr_pair_list_t const *list, fr_pair_t const *item)
+void *fr_pair_list_prev(fr_pair_list_t const *list, fr_pair_t const *item)
{
return fr_dlist_prev(&list->head, item);
}
* - NULL if the list is empty
* - pointer to the last item in the list.
*/
-inline void *fr_pair_list_tail(fr_pair_list_t const *list)
+void *fr_pair_list_tail(fr_pair_list_t const *list)
{
return fr_dlist_tail(&list->head);
}
*
* @return number of entries in the list
*/
-inline size_t fr_pair_list_len(fr_pair_list_t const *list)
+size_t fr_pair_list_len(fr_pair_list_t const *list)
{
return list->head.num_elements;
}
#include <ctype.h>
-fr_sbuff_term_t const bareword_terminals =
+static fr_sbuff_term_t const bareword_terminals =
FR_SBUFF_TERMS(
L("\t"),
L("\n"),
return true;
}
-uint32_t non_primes[] = { 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28,
- 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50};
+static uint32_t non_primes[] = { 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28,
+ 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50};
static void test_rbtree_iter_delete(void)
{