Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
mbedtls
Commits
9af723ce
Commit
9af723ce
authored
May 01, 2014
by
Paul Bakker
Browse files
Fix formatting: remove trailing spaces, #endif with comments (> 10 lines)
parent
525f8755
Changes
75
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
37 additions
and
37 deletions
+37
-37
include/polarssl/asn1.h
include/polarssl/asn1.h
+5
-5
include/polarssl/asn1write.h
include/polarssl/asn1write.h
+1
-1
include/polarssl/bignum.h
include/polarssl/bignum.h
+2
-2
include/polarssl/bn_mul.h
include/polarssl/bn_mul.h
+4
-4
include/polarssl/camellia.h
include/polarssl/camellia.h
+4
-4
include/polarssl/cipher.h
include/polarssl/cipher.h
+1
-1
include/polarssl/cipher_wrap.h
include/polarssl/cipher_wrap.h
+1
-1
include/polarssl/compat-1.2.h
include/polarssl/compat-1.2.h
+1
-1
include/polarssl/ctr_drbg.h
include/polarssl/ctr_drbg.h
+3
-3
include/polarssl/debug.h
include/polarssl/debug.h
+2
-2
include/polarssl/dhm.h
include/polarssl/dhm.h
+1
-1
include/polarssl/ecdh.h
include/polarssl/ecdh.h
+1
-1
include/polarssl/ecdsa.h
include/polarssl/ecdsa.h
+3
-3
include/polarssl/ecp.h
include/polarssl/ecp.h
+1
-1
include/polarssl/entropy.h
include/polarssl/entropy.h
+2
-2
include/polarssl/hmac_drbg.h
include/polarssl/hmac_drbg.h
+1
-1
include/polarssl/md.h
include/polarssl/md.h
+1
-1
include/polarssl/md_wrap.h
include/polarssl/md_wrap.h
+1
-1
include/polarssl/openssl.h
include/polarssl/openssl.h
+1
-1
include/polarssl/pkcs11.h
include/polarssl/pkcs11.h
+1
-1
No files found.
include/polarssl/asn1.h
View file @
9af723ce
...
...
@@ -39,15 +39,15 @@
#include <string.h>
/**
/**
* \addtogroup asn1_module
* \{
* \{
*/
/**
* \name ASN1 Error codes
* These error codes are OR'ed to X509 error codes for
* higher error granularity.
* higher error granularity.
* ASN1 is a standard to specify data structures.
* \{
*/
...
...
@@ -274,7 +274,7 @@ int asn1_get_sequence_of( unsigned char **p,
int
asn1_get_mpi
(
unsigned
char
**
p
,
const
unsigned
char
*
end
,
mpi
*
X
);
#endif
#endif
/* POLARSSL_BIGNUM_C */
/**
* \brief Retrieve an AlgorithmIdentifier ASN.1 sequence.
...
...
include/polarssl/asn1write.h
View file @
9af723ce
...
...
@@ -85,7 +85,7 @@ int asn1_write_raw_buffer( unsigned char **p, unsigned char *start,
* \return the length written or a negative error code
*/
int
asn1_write_mpi
(
unsigned
char
**
p
,
unsigned
char
*
start
,
mpi
*
X
);
#endif
#endif
/* POLARSSL_BIGNUM_C */
/**
* \brief Write a NULL tag (ASN1_NULL) with zero data in ASN.1 format
...
...
include/polarssl/bignum.h
View file @
9af723ce
...
...
@@ -51,7 +51,7 @@ typedef UINT32 uint32_t;
typedef
UINT64
uint64_t
;
#else
#include <inttypes.h>
#endif
#endif
/* _MSC_VER && !EFIX64 && !EFI32 */
#define POLARSSL_ERR_MPI_FILE_IO_ERROR -0x0002
/**< An error occurred while reading from or writing to a file. */
#define POLARSSL_ERR_MPI_BAD_INPUT_DATA -0x0004
/**< Bad input parameters to function. */
...
...
@@ -644,7 +644,7 @@ int mpi_mod_int( t_uint *r, const mpi *A, t_sint b );
/**
* \brief Sliding-window exponentiation: X = A^E mod N
*
* \param X Destination MPI
* \param X Destination MPI
* \param A Left-hand MPI
* \param E Exponent MPI
* \param N Modular MPI
...
...
include/polarssl/bn_mul.h
View file @
9af723ce
...
...
@@ -329,7 +329,7 @@
);
#else
#else
/* __MACH__ && __APPLE__ */
#define MULADDC_INIT \
asm( \
...
...
@@ -369,7 +369,7 @@
: "r3", "r4", "r5", "r6", "r7", "r8", "r9" \
);
#endif
#endif
/* __MACH__ && __APPLE__ */
#else
/* PPC32 */
...
...
@@ -413,7 +413,7 @@
: "r3", "r4", "r5", "r6", "r7", "r8", "r9" \
);
#else
#else
/* __MACH__ && __APPLE__ */
#define MULADDC_INIT \
asm( \
...
...
@@ -453,7 +453,7 @@
: "r3", "r4", "r5", "r6", "r7", "r8", "r9" \
);
#endif
#endif
/* __MACH__ && __APPLE__ */
#endif
/* PPC32 */
#endif
/* PPC64 */
...
...
include/polarssl/camellia.h
View file @
9af723ce
...
...
@@ -72,7 +72,7 @@ camellia_context;
* \param ctx CAMELLIA context to be initialized
* \param key encryption key
* \param keysize must be 128, 192 or 256
*
*
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH
*/
int
camellia_setkey_enc
(
camellia_context
*
ctx
,
const
unsigned
char
*
key
,
unsigned
int
keysize
);
...
...
@@ -83,7 +83,7 @@ int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key, unsign
* \param ctx CAMELLIA context to be initialized
* \param key decryption key
* \param keysize must be 128, 192 or 256
*
*
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH
*/
int
camellia_setkey_dec
(
camellia_context
*
ctx
,
const
unsigned
char
*
key
,
unsigned
int
keysize
);
...
...
@@ -95,7 +95,7 @@ int camellia_setkey_dec( camellia_context *ctx, const unsigned char *key, unsign
* \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT
* \param input 16-byte input block
* \param output 16-byte output block
*
*
* \return 0 if successful
*/
int
camellia_crypt_ecb
(
camellia_context
*
ctx
,
...
...
@@ -115,7 +115,7 @@ int camellia_crypt_ecb( camellia_context *ctx,
* \param iv initialization vector (updated after use)
* \param input buffer holding the input data
* \param output buffer holding the output data
*
*
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
*/
int
camellia_crypt_cbc
(
camellia_context
*
ctx
,
...
...
include/polarssl/cipher.h
View file @
9af723ce
/**
* \file cipher.h
*
*
* \brief Generic cipher wrapper.
*
* \author Adriaan de Jong <dejong@fox-it.com>
...
...
include/polarssl/cipher_wrap.h
View file @
9af723ce
/**
* \file cipher_wrap.h
*
*
* \brief Cipher wrappers.
*
* \author Adriaan de Jong <dejong@fox-it.com>
...
...
include/polarssl/compat-1.2.h
View file @
9af723ce
...
...
@@ -171,7 +171,7 @@ static inline int sha4_self_test( int verbose ) {
#warning "rsa_pkcs1_verify() prototype changed. Manual change required if used"
#warning "rsa_pkcs1_decrypt() prototype changed. Manual change required if used"
#endif
#endif
#endif
/* POLARSSL_RSA_C */
#if defined(POLARSSL_DHM_C)
#if defined(SHOW_PROTOTYPE_CHANGE_WARNINGS)
...
...
include/polarssl/ctr_drbg.h
View file @
9af723ce
...
...
@@ -108,7 +108,7 @@ ctr_drbg_context;
/**
* \brief CTR_DRBG initialization
*
*
* Note: Personalization data can be provided in addition to the more generic
* entropy source to make this instantiation as unique as possible.
*
...
...
@@ -163,7 +163,7 @@ void ctr_drbg_set_reseed_interval( ctr_drbg_context *ctx,
/**
* \brief CTR_DRBG reseeding (extracts data from entropy source)
*
*
* \param ctx CTR_DRBG context
* \param additional Additional data to add to state (Can be NULL)
* \param len Length of additional data
...
...
@@ -245,7 +245,7 @@ int ctr_drbg_write_seed_file( ctr_drbg_context *ctx, const char *path );
* POLARSSL_ERR_CTR_DRBG_INPUT_TOO_BIG
*/
int
ctr_drbg_update_seed_file
(
ctr_drbg_context
*
ctx
,
const
char
*
path
);
#endif
#endif
/* POLARSSL_FS_IO */
/**
* \brief Checkup routine
...
...
include/polarssl/debug.h
View file @
9af723ce
...
...
@@ -81,7 +81,7 @@
debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt );
#endif
#else
#else
/* POLARSSL_DEBUG_C */
#define SSL_DEBUG_MSG( level, args ) do { } while( 0 )
#define SSL_DEBUG_RET( level, text, ret ) do { } while( 0 )
...
...
@@ -90,7 +90,7 @@
#define SSL_DEBUG_ECP( level, text, X ) do { } while( 0 )
#define SSL_DEBUG_CRT( level, text, crt ) do { } while( 0 )
#endif
#endif
/* POLARSSL_DEBUG_C */
#ifdef __cplusplus
extern
"C"
{
...
...
include/polarssl/dhm.h
View file @
9af723ce
...
...
@@ -285,4 +285,4 @@ int dhm_self_test( int verbose );
}
#endif
#endif
#endif
/* dhm.h */
include/polarssl/ecdh.h
View file @
9af723ce
...
...
@@ -212,4 +212,4 @@ int ecdh_self_test( int verbose );
}
#endif
#endif
#endif
/* ecdh.h */
include/polarssl/ecdsa.h
View file @
9af723ce
...
...
@@ -90,7 +90,7 @@ int ecdsa_sign( ecp_group *grp, mpi *r, mpi *s,
int
ecdsa_sign_det
(
ecp_group
*
grp
,
mpi
*
r
,
mpi
*
s
,
const
mpi
*
d
,
const
unsigned
char
*
buf
,
size_t
blen
,
md_type_t
md_alg
);
#endif
#endif
/* POLARSSL_ECDSA_DETERMINISTIC */
/**
* \brief Verify ECDSA signature of a previously hashed message
...
...
@@ -163,7 +163,7 @@ int ecdsa_write_signature_det( ecdsa_context *ctx,
const
unsigned
char
*
hash
,
size_t
hlen
,
unsigned
char
*
sig
,
size_t
*
slen
,
md_type_t
md_alg
);
#endif
#endif
/* POLARSSL_ECDSA_DETERMINISTIC */
/**
* \brief Read and verify an ECDSA signature
...
...
@@ -233,4 +233,4 @@ int ecdsa_self_test( int verbose );
}
#endif
#endif
#endif
/* ecdsa.h */
include/polarssl/ecp.h
View file @
9af723ce
...
...
@@ -648,4 +648,4 @@ int ecp_self_test( int verbose );
}
#endif
#endif
#endif
/* ecp.h */
include/polarssl/entropy.h
View file @
9af723ce
...
...
@@ -191,7 +191,7 @@ int entropy_func( void *data, unsigned char *output, size_t len );
/**
* \brief Add data to the accumulator manually
* (Thread-safe if POLARSSL_THREADING_C is enabled)
*
*
* \param ctx Entropy context
* \param data Data to add
* \param len Length of data
...
...
@@ -227,7 +227,7 @@ int entropy_write_seed_file( entropy_context *ctx, const char *path );
* POLARSSL_ERR_ENTROPY_SOURCE_FAILED
*/
int
entropy_update_seed_file
(
entropy_context
*
ctx
,
const
char
*
path
);
#endif
#endif
/* POLARSSL_FS_IO */
#ifdef __cplusplus
}
...
...
include/polarssl/hmac_drbg.h
View file @
9af723ce
...
...
@@ -265,7 +265,7 @@ int hmac_drbg_write_seed_file( hmac_drbg_context *ctx, const char *path );
* POLARSSL_ERR_HMAC_DRBG_INPUT_TOO_BIG
*/
int
hmac_drbg_update_seed_file
(
hmac_drbg_context
*
ctx
,
const
char
*
path
);
#endif
#endif
/* POLARSSL_FS_IO */
#if defined(POLARSSL_SELF_TEST)
...
...
include/polarssl/md.h
View file @
9af723ce
/**
* \file md.h
*
*
* \brief Generic message digest wrapper
*
* \author Adriaan de Jong <dejong@fox-it.com>
...
...
include/polarssl/md_wrap.h
View file @
9af723ce
/**
* \file md_wrap.h
*
*
* \brief Message digest wrappers.
*
* \author Adriaan de Jong <dejong@fox-it.com>
...
...
include/polarssl/openssl.h
View file @
9af723ce
...
...
@@ -98,7 +98,7 @@ inline rsa_context* d2i_RSA_PUBKEY( void *ignore, unsigned char **bufptr,
memset
(
rsa
,
0
,
sizeof
(
rsa_context
)
);
if
(
(
len
==
94
&&
if
(
(
len
==
94
&&
mpi_read_binary
(
&
rsa
->
N
,
&
buffer
[
25
],
64
)
==
0
&&
mpi_read_binary
(
&
rsa
->
E
,
&
buffer
[
91
],
3
)
==
0
)
||
(
len
==
162
&&
...
...
include/polarssl/pkcs11.h
View file @
9af723ce
...
...
@@ -148,7 +148,7 @@ static inline int ssl_pkcs11_decrypt( void *ctx, int mode, size_t *olen,
output_max_len
);
}
static
inline
int
ssl_pkcs11_sign
(
void
*
ctx
,
static
inline
int
ssl_pkcs11_sign
(
void
*
ctx
,
int
(
*
f_rng
)(
void
*
,
unsigned
char
*
,
size_t
),
void
*
p_rng
,
int
mode
,
md_type_t
md_alg
,
unsigned
int
hashlen
,
const
unsigned
char
*
hash
,
unsigned
char
*
sig
)
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment