mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Adjust spacing in sample programs
Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
committed by
Minos Galanakis
parent
8db8d6182f
commit
0420093795
@ -598,7 +598,7 @@ static int my_verify(void *data, mbedtls_x509_crt *crt,
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
static int report_cid_usage(mbedtls_ssl_context *ssl,
|
||||
const char *additional_description)
|
||||
const char *additional_description)
|
||||
{
|
||||
int ret;
|
||||
unsigned char peer_cid[MBEDTLS_SSL_CID_OUT_LEN_MAX];
|
||||
|
@ -248,7 +248,7 @@ static void print_b64(const uint8_t *b, size_t len)
|
||||
* /p prefix prefix for the new lines
|
||||
*/
|
||||
static void print_hex(const uint8_t *b, size_t len,
|
||||
const size_t in_line, const char *prefix)
|
||||
const size_t in_line, const char *prefix)
|
||||
{
|
||||
size_t i = 0;
|
||||
const uint8_t *end = b + len;
|
||||
@ -510,7 +510,7 @@ static void print_deserialized_ssl_cert(const uint8_t *ssl, uint32_t len)
|
||||
* /p session_cfg_flag session configuration flags
|
||||
*/
|
||||
static void print_deserialized_ssl_session(const uint8_t *ssl, uint32_t len,
|
||||
int session_cfg_flag)
|
||||
int session_cfg_flag)
|
||||
{
|
||||
const struct mbedtls_ssl_ciphersuite_t *ciphersuite_info;
|
||||
int ciphersuite_id;
|
||||
|
@ -879,7 +879,7 @@ error:
|
||||
* SNI callback.
|
||||
*/
|
||||
static int sni_callback(void *p_info, mbedtls_ssl_context *ssl,
|
||||
const unsigned char *name, size_t name_len)
|
||||
const unsigned char *name, size_t name_len)
|
||||
{
|
||||
const sni_entry *cur = (const sni_entry *) p_info;
|
||||
|
||||
@ -1028,7 +1028,7 @@ error:
|
||||
* PSK callback
|
||||
*/
|
||||
static int psk_callback(void *p_info, mbedtls_ssl_context *ssl,
|
||||
const unsigned char *name, size_t name_len)
|
||||
const unsigned char *name, size_t name_len)
|
||||
{
|
||||
psk_entry *cur = (psk_entry *) p_info;
|
||||
|
||||
@ -1106,10 +1106,10 @@ typedef struct {
|
||||
} ssl_async_key_context_t;
|
||||
|
||||
static int ssl_async_set_key(ssl_async_key_context_t *ctx,
|
||||
mbedtls_x509_crt *cert,
|
||||
mbedtls_pk_context *pk,
|
||||
int pk_take_ownership,
|
||||
unsigned delay)
|
||||
mbedtls_x509_crt *cert,
|
||||
mbedtls_pk_context *pk,
|
||||
int pk_take_ownership,
|
||||
unsigned delay)
|
||||
{
|
||||
if (ctx->slots_used >= sizeof(ctx->slots) / sizeof(*ctx->slots)) {
|
||||
return -1;
|
||||
@ -1333,7 +1333,7 @@ static psa_status_t psa_setup_psk_key_slot(mbedtls_svc_key_id_t *slot,
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
static int report_cid_usage(mbedtls_ssl_context *ssl,
|
||||
const char *additional_description)
|
||||
const char *additional_description)
|
||||
{
|
||||
int ret;
|
||||
unsigned char peer_cid[MBEDTLS_SSL_CID_OUT_LEN_MAX];
|
||||
@ -1384,8 +1384,8 @@ static inline void put_unaligned_uint32(void *p, uint32_t x)
|
||||
|
||||
/* Functions for session ticket tests */
|
||||
static int dummy_ticket_write(void *p_ticket, const mbedtls_ssl_session *session,
|
||||
unsigned char *start, const unsigned char *end,
|
||||
size_t *tlen, uint32_t *ticket_lifetime)
|
||||
unsigned char *start, const unsigned char *end,
|
||||
size_t *tlen, uint32_t *ticket_lifetime)
|
||||
{
|
||||
int ret;
|
||||
unsigned char *p = start;
|
||||
@ -1411,7 +1411,7 @@ static int dummy_ticket_write(void *p_ticket, const mbedtls_ssl_session *session
|
||||
}
|
||||
|
||||
static int dummy_ticket_parse(void *p_ticket, mbedtls_ssl_session *session,
|
||||
unsigned char *buf, size_t len)
|
||||
unsigned char *buf, size_t len)
|
||||
{
|
||||
int ret;
|
||||
((void) p_ticket);
|
||||
|
@ -13,12 +13,12 @@
|
||||
*/
|
||||
|
||||
static void eap_tls_key_derivation(void *p_expkey,
|
||||
mbedtls_ssl_key_export_type secret_type,
|
||||
const unsigned char *secret,
|
||||
size_t secret_len,
|
||||
const unsigned char client_random[32],
|
||||
const unsigned char server_random[32],
|
||||
mbedtls_tls_prf_types tls_prf_type)
|
||||
mbedtls_ssl_key_export_type secret_type,
|
||||
const unsigned char *secret,
|
||||
size_t secret_len,
|
||||
const unsigned char client_random[32],
|
||||
const unsigned char server_random[32],
|
||||
mbedtls_tls_prf_types tls_prf_type)
|
||||
{
|
||||
eap_tls_keys *keys = (eap_tls_keys *) p_expkey;
|
||||
|
||||
@ -37,12 +37,12 @@ static void eap_tls_key_derivation(void *p_expkey,
|
||||
}
|
||||
|
||||
static void nss_keylog_export(void *p_expkey,
|
||||
mbedtls_ssl_key_export_type secret_type,
|
||||
const unsigned char *secret,
|
||||
size_t secret_len,
|
||||
const unsigned char client_random[32],
|
||||
const unsigned char server_random[32],
|
||||
mbedtls_tls_prf_types tls_prf_type)
|
||||
mbedtls_ssl_key_export_type secret_type,
|
||||
const unsigned char *secret,
|
||||
size_t secret_len,
|
||||
const unsigned char client_random[32],
|
||||
const unsigned char server_random[32],
|
||||
mbedtls_tls_prf_types tls_prf_type)
|
||||
{
|
||||
char nss_keylog_line[200];
|
||||
size_t const client_random_len = 32;
|
||||
@ -107,12 +107,12 @@ exit:
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_SRTP)
|
||||
static void dtls_srtp_key_derivation(void *p_expkey,
|
||||
mbedtls_ssl_key_export_type secret_type,
|
||||
const unsigned char *secret,
|
||||
size_t secret_len,
|
||||
const unsigned char client_random[32],
|
||||
const unsigned char server_random[32],
|
||||
mbedtls_tls_prf_types tls_prf_type)
|
||||
mbedtls_ssl_key_export_type secret_type,
|
||||
const unsigned char *secret,
|
||||
size_t secret_len,
|
||||
const unsigned char client_random[32],
|
||||
const unsigned char server_random[32],
|
||||
mbedtls_tls_prf_types tls_prf_type)
|
||||
{
|
||||
dtls_srtp_keys *keys = (dtls_srtp_keys *) p_expkey;
|
||||
|
||||
@ -132,7 +132,7 @@ static void dtls_srtp_key_derivation(void *p_expkey,
|
||||
#endif /* MBEDTLS_SSL_DTLS_SRTP */
|
||||
|
||||
static int ssl_check_record(mbedtls_ssl_context const *ssl,
|
||||
unsigned char const *buf, size_t len)
|
||||
unsigned char const *buf, size_t len)
|
||||
{
|
||||
int my_ret = 0, ret_cr1, ret_cr2;
|
||||
unsigned char *tmp_buf;
|
||||
@ -224,7 +224,7 @@ static int recv_cb(void *ctx, unsigned char *buf, size_t len)
|
||||
}
|
||||
|
||||
static int recv_timeout_cb(void *ctx, unsigned char *buf, size_t len,
|
||||
uint32_t timeout)
|
||||
uint32_t timeout)
|
||||
{
|
||||
io_ctx_t *io_ctx = (io_ctx_t *) ctx;
|
||||
int ret;
|
||||
@ -320,7 +320,7 @@ uint16_t ssl_sig_algs_for_test[] = {
|
||||
* for more info.
|
||||
*/
|
||||
static int x509_crt_verify_info(char *buf, size_t size, const char *prefix,
|
||||
uint32_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
#if !defined(MBEDTLS_X509_REMOVE_INFO)
|
||||
return mbedtls_x509_crt_verify_info(buf, size, prefix, flags);
|
||||
|
Reference in New Issue
Block a user