Skip to content

Commit

Permalink
Result of running the script
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
  • Loading branch information
mstarzyk-mobica committed May 13, 2021
1 parent bf98b46 commit 4c196b9
Show file tree
Hide file tree
Showing 27 changed files with 427 additions and 427 deletions.
24 changes: 12 additions & 12 deletions include/mbedtls/asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ extern "C" {
*/
typedef struct mbedtls_asn1_buf
{
int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */
size_t len; /**< ASN1 length, in octets. */
unsigned char *p; /**< ASN1 data, e.g. in ASCII. */
int MBEDTLS_PRIVATE(tag); /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */
size_t MBEDTLS_PRIVATE(len); /**< ASN1 MBEDTLS_PRIVATE(len)gth, in octets. */
unsigned char *MBEDTLS_PRIVATE(p); /**< ASN1 data, e.g. in ASCII. */
}
mbedtls_asn1_buf;

Expand All @@ -159,9 +159,9 @@ mbedtls_asn1_buf;
*/
typedef struct mbedtls_asn1_bitstring
{
size_t len; /**< ASN1 length, in octets. */
unsigned char unused_bits; /**< Number of unused bits at the end of the string */
unsigned char *p; /**< Raw ASN1 data for the bit string */
size_t MBEDTLS_PRIVATE(len); /**< ASN1 MBEDTLS_PRIVATE(len)gth, in octets. */
unsigned char MBEDTLS_PRIVATE(unused_bits); /**< Number of unused bits at the end of the string */
unsigned char *MBEDTLS_PRIVATE(p); /**< Raw ASN1 data for the bit string */
}
mbedtls_asn1_bitstring;

Expand All @@ -170,8 +170,8 @@ mbedtls_asn1_bitstring;
*/
typedef struct mbedtls_asn1_sequence
{
mbedtls_asn1_buf buf; /**< Buffer containing the given ASN.1 item. */
struct mbedtls_asn1_sequence *next; /**< The next entry in the sequence. */
mbedtls_asn1_MBEDTLS_PRIVATE(buf) MBEDTLS_PRIVATE(buf); /**< Buffer containing the given ASN.1 item. */
struct mbedtls_asn1_sequence *MBEDTLS_PRIVATE(next); /**< The MBEDTLS_PRIVATE(next) entry in the sequence. */
}
mbedtls_asn1_sequence;

Expand All @@ -180,10 +180,10 @@ mbedtls_asn1_sequence;
*/
typedef struct mbedtls_asn1_named_data
{
mbedtls_asn1_buf oid; /**< The object identifier. */
mbedtls_asn1_buf val; /**< The named value. */
struct mbedtls_asn1_named_data *next; /**< The next entry in the sequence. */
unsigned char next_merged; /**< Merge next item into the current one? */
mbedtls_asn1_buf MBEDTLS_PRIVATE(oid); /**< The object identifier. */
mbedtls_asn1_buf MBEDTLS_PRIVATE(val); /**< The named MBEDTLS_PRIVATE(val)ue. */
struct mbedtls_asn1_named_data *MBEDTLS_PRIVATE(next); /**< The MBEDTLS_PRIVATE(next) entry in the sequence. */
unsigned char MBEDTLS_PRIVATE(next_merged); /**< Merge next item into the current one? */
}
mbedtls_asn1_named_data;

Expand Down
6 changes: 3 additions & 3 deletions include/mbedtls/bignum.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ extern "C" {
*/
typedef struct mbedtls_mpi
{
int s; /*!< Sign: -1 if the mpi is negative, 1 otherwise */
size_t n; /*!< total # of limbs */
mbedtls_mpi_uint *p; /*!< pointer to limbs */
int MBEDTLS_PRIVATE(s); /*!< Sign: -1 if the mpi iMBEDTLS_PRIVATE(s) negative, 1 otherwiMBEDTLS_PRIVATE(s)e */
size_t MBEDTLS_PRIVATE(n); /*!< total # of limbs */
mbedtls_mMBEDTLS_PRIVATE(p)i_uint *MBEDTLS_PRIVATE(p); /*!< MBEDTLS_PRIVATE(p)ointer to limbs */
}
mbedtls_mpi;

Expand Down
40 changes: 20 additions & 20 deletions include/mbedtls/cipher.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,37 +267,37 @@ typedef struct mbedtls_cipher_info_t
/** Full cipher identifier. For example,
* MBEDTLS_CIPHER_AES_256_CBC.
*/
mbedtls_cipher_type_t type;
mbedtls_cipher_MBEDTLS_PRIVATE(type)_t MBEDTLS_PRIVATE(type);

/** The cipher mode. For example, MBEDTLS_MODE_CBC. */
mbedtls_cipher_mode_t mode;
mbedtls_cipher_MBEDTLS_PRIVATE(mode)_t MBEDTLS_PRIVATE(mode);

/** The cipher key length, in bits. This is the
* default length for variable sized ciphers.
* Includes parity bits for ciphers like DES.
*/
unsigned int key_bitlen;
unsigned int MBEDTLS_PRIVATE(key_bitlen);

/** Name of the cipher. */
const char * name;
const char * MBEDTLS_PRIVATE(name);

/** IV or nonce size, in Bytes.
* For ciphers that accept variable IV sizes,
* this is the recommended size.
*/
unsigned int iv_size;
unsigned int MBEDTLS_PRIVATE(iv_size);

/** Bitflag comprised of MBEDTLS_CIPHER_VARIABLE_IV_LEN and
* MBEDTLS_CIPHER_VARIABLE_KEY_LEN indicating whether the
* cipher supports variable IV or variable key sizes, respectively.
*/
int flags;
int MBEDTLS_PRIVATE(flags);

/** The block size, in Bytes. */
unsigned int block_size;
unsigned int MBEDTLS_PRIVATE(block_size);

/** Struct for base cipher information and functions. */
const mbedtls_cipher_base_t *base;
const mbedtls_cipher_MBEDTLS_PRIVATE(base)_t *MBEDTLS_PRIVATE(base);

} mbedtls_cipher_info_t;

Expand All @@ -307,43 +307,43 @@ typedef struct mbedtls_cipher_info_t
typedef struct mbedtls_cipher_context_t
{
/** Information about the associated cipher. */
const mbedtls_cipher_info_t *cipher_info;
const mbedtls_MBEDTLS_PRIVATE(cipher_info)_t *MBEDTLS_PRIVATE(cipher_info);

/** Key length to use. */
int key_bitlen;
int MBEDTLS_PRIVATE(key_bitlen);

/** Operation that the key of the context has been
* initialized for.
*/
mbedtls_operation_t operation;
mbedtls_MBEDTLS_PRIVATE(operation)_t MBEDTLS_PRIVATE(operation);

#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING)
/** Padding functions to use, if relevant for
* the specific cipher mode.
*/
void (*add_padding)( unsigned char *output, size_t olen, size_t data_len );
int (*get_padding)( unsigned char *input, size_t ilen, size_t *data_len );
void (*MBEDTLS_PRIVATE(add_padding))( unsigned char *output, size_t olen, size_t data_len );
int (*MBEDTLS_PRIVATE(get_padding))( unsigned char *input, size_t ilen, size_t *data_len );
#endif

/** Buffer for input that has not been processed yet. */
unsigned char unprocessed_data[MBEDTLS_MAX_BLOCK_LENGTH];
unsigned char MBEDTLS_PRIVATE(unprocessed_data)[MBEDTLS_MAX_BLOCK_LENGTH];

/** Number of Bytes that have not been processed yet. */
size_t unprocessed_len;
size_t MBEDTLS_PRIVATE(unprocessed_len);

/** Current IV or NONCE_COUNTER for CTR-mode, data unit (or sector) number
* for XTS-mode. */
unsigned char iv[MBEDTLS_MAX_IV_LENGTH];
unsigned char MBEDTLS_PRIVATE(iv)[MBEDTLS_MAX_IV_LENGTH];

/** IV size in Bytes, for ciphers with variable-length IVs. */
size_t iv_size;
size_t MBEDTLS_PRIVATE(iv_size);

/** The cipher-specific context. */
void *cipher_ctx;
void *MBEDTLS_PRIVATE(cipher_ctx);

#if defined(MBEDTLS_CMAC_C)
/** CMAC-specific context. */
mbedtls_cmac_context_t *cmac_ctx;
mbedtls_cmac_context_t *MBEDTLS_PRIVATE(cmac_ctx);
#endif

#if defined(MBEDTLS_USE_PSA_CRYPTO)
Expand All @@ -354,7 +354,7 @@ typedef struct mbedtls_cipher_context_t
* mbedtls_cipher_setup(), and set if it was established through
* mbedtls_cipher_setup_psa().
*/
unsigned char psa_enabled;
unsigned char MBEDTLS_PRIVATE(psa_enabled);
#endif /* MBEDTLS_USE_PSA_CRYPTO */

} mbedtls_cipher_context_t;
Expand Down
18 changes: 9 additions & 9 deletions include/mbedtls/ctr_drbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ extern "C" {
*/
typedef struct mbedtls_ctr_drbg_context
{
unsigned char counter[16]; /*!< The counter (V). */
int reseed_counter; /*!< The reseed counter.
unsigned char MBEDTLS_PRIVATE(counter)[16]; /*!< The MBEDTLS_PRIVATE(counter) (V). */
int MBEDTLS_PRIVATE(reseed_counter); /*!< The reseed counter.
* This is the number of requests that have
* been made since the last (re)seeding,
* minus one.
Expand All @@ -179,25 +179,25 @@ typedef struct mbedtls_ctr_drbg_context
* or -1 if no nonce length has been explicitly
* set (see mbedtls_ctr_drbg_set_nonce_len()).
*/
int prediction_resistance; /*!< This determines whether prediction
int MBEDTLS_PRIVATE(prediction_resistance); /*!< This determines whether prediction
resistance is enabled, that is
whether to systematically reseed before
each random generation. */
size_t entropy_len; /*!< The amount of entropy grabbed on each
size_t MBEDTLS_PRIVATE(entropy_len); /*!< The amount of entropy grabbed on each
seed or reseed operation, in bytes. */
int reseed_interval; /*!< The reseed interval.
int MBEDTLS_PRIVATE(reseed_interval); /*!< The reseed interval.
* This is the maximum number of requests
* that can be made between reseedings. */

mbedtls_aes_context aes_ctx; /*!< The AES context. */
mbedtls_aes_context MBEDTLS_PRIVATE(aes_ctx); /*!< The AES context. */

/*
* Callbacks (Entropy)
*/
int (*f_entropy)(void *, unsigned char *, size_t);
int (*MBEDTLS_PRIVATE(f_entropy))(void *, unsigned char *, size_t);
/*!< The entropy callback function. */

void *p_entropy; /*!< The context for the entropy function. */
void *MBEDTLS_PRIVATE(p_entropy); /*!< The context for the entropy function. */

#if defined(MBEDTLS_THREADING_C)
/* Invariant: the mutex is initialized if and only if f_entropy != NULL.
Expand All @@ -207,7 +207,7 @@ typedef struct mbedtls_ctr_drbg_context
* Note that this invariant may change without notice. Do not rely on it
* and do not access the mutex directly in application code.
*/
mbedtls_threading_mutex_t mutex;
mbedtls_threading_MBEDTLS_PRIVATE(mutex)_t MBEDTLS_PRIVATE(mutex);
#endif
}
mbedtls_ctr_drbg_context;
Expand Down
22 changes: 11 additions & 11 deletions include/mbedtls/ecdh.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,18 @@ typedef struct mbedtls_ecdh_context_mbed
typedef struct mbedtls_ecdh_context
{
#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
mbedtls_ecp_group grp; /*!< The elliptic curve used. */
mbedtls_mpi d; /*!< The private key. */
mbedtls_ecp_point Q; /*!< The public key. */
mbedtls_ecp_point Qp; /*!< The value of the public key of the peer. */
mbedtls_mpi z; /*!< The shared secret. */
int point_format; /*!< The format of point export in TLS messages. */
mbedtls_ecp_point Vi; /*!< The blinding value. */
mbedtls_ecp_point Vf; /*!< The unblinding value. */
mbedtls_mpi _d; /*!< The previous \p d. */
mbedtls_ecp_group MBEDTLS_PRIVATE(grp); /*!< The elliptic curve used. */
mbeMBEDTLS_PRIVATE(d)tls_mpi MBEDTLS_PRIVATE(d); /*!< The private key. */
mbedtls_ecp_point MBEDTLS_PRIVATE(Q); /*!< The public key. */
mbedtls_ecp_point MBEDTLS_PRIVATE(Qp); /*!< The value of the public key of the peer. */
mbedtls_mpi MBEDTLS_PRIVATE(z); /*!< The shared secret. */
int MBEDTLS_PRIVATE(point_format); /*!< The format of point export in TLS messages. */
mbedtls_ecp_point MBEDTLS_PRIVATE(Vi); /*!< The blinding value. */
mbedtls_ecp_point MBEDTLS_PRIVATE(Vf); /*!< The unblinding value. */
mbedtls_mpi MBEDTLS_PRIVATE(_d); /*!< The previous \p d. */
#if defined(MBEDTLS_ECP_RESTARTABLE)
int restart_enabled; /*!< The flag for restartable mode. */
mbedtls_ecp_restart_ctx rs; /*!< The restart context for EC computations. */
int MBEDTLS_PRIVATE(restart_enabled); /*!< The flag for restartable mode. */
mbedtls_ecp_restart_ctx MBEDTLS_PRIVATE(rs); /*!< The restart context for EC computations. */
#endif /* MBEDTLS_ECP_RESTARTABLE */
#else
uint8_t point_format; /*!< The format of point export in TLS messages
Expand Down
8 changes: 4 additions & 4 deletions include/mbedtls/ecdsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ typedef struct mbedtls_ecdsa_restart_det mbedtls_ecdsa_restart_det_ctx;
*/
typedef struct
{
mbedtls_ecp_restart_ctx ecp; /*!< base context for ECP restart and
mbedtls_MBEDTLS_PRIVATE(ecp)_restart_ctx MBEDTLS_PRIVATE(ecp); /*!< base context for ECP restart and
shared administrative info */
mbedtls_ecdsa_restart_ver_ctx *ver; /*!< ecdsa_verify() sub-context */
mbedtls_ecdsa_restart_sig_ctx *sig; /*!< ecdsa_sign() sub-context */
mbedtls_ecdsa_restart_MBEDTLS_PRIVATE(ver)_ctx *MBEDTLS_PRIVATE(ver); /*!< ecdsa_MBEDTLS_PRIVATE(ver)ify() sub-context */
mbedtls_ecdsa_restart_MBEDTLS_PRIVATE(sig)_ctx *MBEDTLS_PRIVATE(sig); /*!< ecdsa_MBEDTLS_PRIVATE(sig)n() sub-context */
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
mbedtls_ecdsa_restart_det_ctx *det; /*!< ecdsa_sign_det() sub-context */
mbedtls_ecdsa_restart_MBEDTLS_PRIVATE(det)_ctx *MBEDTLS_PRIVATE(det); /*!< ecdsa_sign_MBEDTLS_PRIVATE(det)() sub-context */
#endif
} mbedtls_ecdsa_restart_ctx;

Expand Down
28 changes: 14 additions & 14 deletions include/mbedtls/ecp.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ typedef enum
*/
typedef struct mbedtls_ecp_curve_info
{
mbedtls_ecp_group_id grp_id; /*!< An internal identifier. */
uint16_t tls_id; /*!< The TLS NamedCurve identifier. */
uint16_t bit_size; /*!< The curve size in bits. */
const char *name; /*!< A human-friendly name. */
mbedtls_ecp_group_id MBEDTLS_PRIVATE(grp_id); /*!< An internal identifier. */
uint16_t MBEDTLS_PRIVATE(tls_id); /*!< The TLS NamedCurve identifier. */
uint16_t MBEDTLS_PRIVATE(bit_size); /*!< The curve size in bits. */
const char *MBEDTLS_PRIVATE(name); /*!< A human-friendly MBEDTLS_PRIVATE(name). */
} mbedtls_ecp_curve_info;

/**
Expand All @@ -161,9 +161,9 @@ typedef struct mbedtls_ecp_curve_info
*/
typedef struct mbedtls_ecp_point
{
mbedtls_mpi X; /*!< The X coordinate of the ECP point. */
mbedtls_mpi Y; /*!< The Y coordinate of the ECP point. */
mbedtls_mpi Z; /*!< The Z coordinate of the ECP point. */
mbedtls_mpi MBEDTLS_PRIVATE(X); /*!< The MBEDTLS_PRIVATE(X) coordinate of the ECP point. */
mbedtls_mpi MBEDTLS_PRIVATE(Y); /*!< The MBEDTLS_PRIVATE(Y) coordinate of the ECP point. */
mbedtls_mpi MBEDTLS_PRIVATE(Z); /*!< The MBEDTLS_PRIVATE(Z) coordinate of the ECP point. */
}
mbedtls_ecp_point;

Expand Down Expand Up @@ -316,10 +316,10 @@ typedef struct mbedtls_ecp_restart_muladd mbedtls_ecp_restart_muladd_ctx;
*/
typedef struct
{
unsigned ops_done; /*!< current ops count */
unsigned depth; /*!< call depth (0 = top-level) */
mbedtls_ecp_restart_mul_ctx *rsm; /*!< ecp_mul_comb() sub-context */
mbedtls_ecp_restart_muladd_ctx *ma; /*!< ecp_muladd() sub-context */
unsigned MBEDTLS_PRIVATE(ops_done); /*!< current ops count */
unsigned MBEDTLS_PRIVATE(depth); /*!< call MBEDTLS_PRIVATE(depth) (0 = top-level) */
mbedtls_ecp_restart_mul_ctx *MBEDTLS_PRIVATE(rsm); /*!< ecp_mul_comb() sub-context */
mbedtls_ecp_restart_muladd_ctx *MBEDTLS_PRIVATE(ma); /*!< ecp_muladd() sub-context */
} mbedtls_ecp_restart_ctx;

/*
Expand Down Expand Up @@ -369,9 +369,9 @@ typedef void mbedtls_ecp_restart_ctx;
*/
typedef struct mbedtls_ecp_keypair
{
mbedtls_ecp_group grp; /*!< Elliptic curve and base point */
mbedtls_mpi d; /*!< our secret value */
mbedtls_ecp_point Q; /*!< our public value */
mbedtls_ecp_group MBEDTLS_PRIVATE(grp); /*!< Elliptic curve and base point */
mbeMBEDTLS_PRIVATE(d)tls_mpi MBEDTLS_PRIVATE(d); /*!< our secret value */
mbedtls_ecp_point MBEDTLS_PRIVATE(Q); /*!< our public value */
}
mbedtls_ecp_keypair;

Expand Down
22 changes: 11 additions & 11 deletions include/mbedtls/entropy.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ typedef int (*mbedtls_entropy_f_source_ptr)(void *data, unsigned char *output, s
*/
typedef struct mbedtls_entropy_source_state
{
mbedtls_entropy_f_source_ptr f_source; /**< The entropy source callback */
void * p_source; /**< The callback data pointer */
size_t size; /**< Amount received in bytes */
size_t threshold; /**< Minimum bytes required before release */
int strong; /**< Is the source strong? */
mbedtls_entropy_MBEDTLS_PRIVATE(f_source)_ptr MBEDTLS_PRIVATE(f_source); /**< The entropy source callback */
void * MBEDTLS_PRIVATE(p_source); /**< The callback data pointer */
MBEDTLS_PRIVATE(size)_t MBEDTLS_PRIVATE(size); /**< Amount received in bytes */
size_t MBEDTLS_PRIVATE(threshold); /**< Minimum bytes required before release */
int MBEDTLS_PRIVATE(strong); /**< Is the source MBEDTLS_PRIVATE(strong)? */
}
mbedtls_entropy_source_state;

Expand All @@ -117,21 +117,21 @@ mbedtls_entropy_source_state;
*/
typedef struct mbedtls_entropy_context
{
int accumulator_started; /* 0 after init.
int MBEDTLS_PRIVATE(accumulator_started); /* 0 after init.
* 1 after the first update.
* -1 after free. */
#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR)
mbedtls_sha512_context accumulator;
#else
mbedtls_sha256_context accumulator;
mbedtls_sha256_context MBEDTLS_PRIVATE(accumulator);
#endif
int source_count; /* Number of entries used in source. */
mbedtls_entropy_source_state source[MBEDTLS_ENTROPY_MAX_SOURCES];
int MBEDTLS_PRIVATE(source_count); /* Number of entries used in source. */
mbedtls_entropy_MBEDTLS_PRIVATE(source)_state MBEDTLS_PRIVATE(source)[MBEDTLS_ENTROPY_MAX_SOURCES];
#if defined(MBEDTLS_THREADING_C)
mbedtls_threading_mutex_t mutex; /*!< mutex */
mbedtls_threading_MBEDTLS_PRIVATE(mutex)_t MBEDTLS_PRIVATE(mutex); /*!< MBEDTLS_PRIVATE(mutex) */
#endif
#if defined(MBEDTLS_ENTROPY_NV_SEED)
int initial_entropy_run;
int MBEDTLS_PRIVATE(initial_entropy_run);
#endif
}
mbedtls_entropy_context;
Expand Down
Loading

0 comments on commit 4c196b9

Please sign in to comment.