Commit 9af723ce authored by Paul Bakker's avatar Paul Bakker

Fix formatting: remove trailing spaces, #endif with comments (> 10 lines)

parent 525f8755
......@@ -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.
......
......@@ -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
......
......@@ -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
......
......@@ -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 */
......
......@@ -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,
......
/**
* \file cipher.h
*
*
* \brief Generic cipher wrapper.
*
* \author Adriaan de Jong <dejong@fox-it.com>
......
/**
* \file cipher_wrap.h
*
*
* \brief Cipher wrappers.
*
* \author Adriaan de Jong <dejong@fox-it.com>
......
......@@ -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)
......
......@@ -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
......
......@@ -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" {
......
......@@ -285,4 +285,4 @@ int dhm_self_test( int verbose );
}
#endif
#endif
#endif /* dhm.h */
......@@ -212,4 +212,4 @@ int ecdh_self_test( int verbose );
}
#endif
#endif
#endif /* ecdh.h */
......@@ -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 */
......@@ -648,4 +648,4 @@ int ecp_self_test( int verbose );
}
#endif
#endif
#endif /* ecp.h */
......@@ -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
}
......
......@@ -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)
......
/**
* \file md.h
*
*
* \brief Generic message digest wrapper
*
* \author Adriaan de Jong <dejong@fox-it.com>
......
/**
* \file md_wrap.h
*
*
* \brief Message digest wrappers.
*
* \author Adriaan de Jong <dejong@fox-it.com>
......
......@@ -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 &&
......
......@@ -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 )
......
......@@ -86,10 +86,10 @@ extern void (*polarssl_free)( void *ptr );
*/
int platform_set_malloc_free( void * (*malloc_func)( size_t ),
void (*free_func)( void * ) );
#else
#else /* POLARSSL_PLATFORM_ENTROPY */
#define polarssl_malloc malloc
#define polarssl_free free
#endif
#endif /* POLARSSL_PLATFORM_ENTROPY */
/*
* The function pointers for printf
......@@ -105,9 +105,9 @@ extern int (*polarssl_printf)( const char *format, ... );
* \return 0
*/
int platform_set_printf( int (*printf_func)( const char *, ... ) );
#else
#else /* POLARSSL_PLATFORM_PRINTF_ALT */
#define polarssl_printf printf
#endif
#endif /* POLARSSL_PLATFORM_PRINTF_ALT */
/*
* The function pointers for fprintf
......
......@@ -168,10 +168,10 @@
#else
#if defined(POLARSSL_SSL_PROTO_TLS1_2)
#define SSL_MIN_MINOR_VERSION SSL_MINOR_VERSION_3
#endif
#endif
#endif
#endif
#endif /* POLARSSL_SSL_PROTO_TLS1_2 */
#endif /* POLARSSL_SSL_PROTO_TLS1_1 */
#endif /* POLARSSL_SSL_PROTO_TLS1 */
#endif /* POLARSSL_SSL_PROTO_SSL3 */
/* Determine maximum supported version */
#define SSL_MAX_MAJOR_VERSION SSL_MAJOR_VERSION_3
......@@ -187,10 +187,10 @@
#else
#if defined(POLARSSL_SSL_PROTO_SSL3)
#define SSL_MAX_MINOR_VERSION SSL_MINOR_VERSION_0
#endif
#endif
#endif
#endif
#endif /* POLARSSL_SSL_PROTO_SSL3 */
#endif /* POLARSSL_SSL_PROTO_TLS1 */
#endif /* POLARSSL_SSL_PROTO_TLS1_1 */
#endif /* POLARSSL_SSL_PROTO_TLS1_2 */
/* RFC 6066 section 4, see also mfl_code_to_length in ssl_tls.c
* NONE must be zero so that memset()ing structure to zero works */
......@@ -395,7 +395,7 @@ extern "C" {
*/
typedef int (*rsa_decrypt_func)( void *ctx, int mode, size_t *olen,
const unsigned char *input, unsigned char *output,
size_t output_max_len );
size_t output_max_len );
typedef int (*rsa_sign_func)( void *ctx,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
int mode, md_type_t md_alg, unsigned int hashlen,
......@@ -545,7 +545,7 @@ struct _ssl_handshake_params
#if defined(POLARSSL_SSL_SERVER_NAME_INDICATION)
ssl_key_cert *sni_key_cert; /*!< key/cert list from SNI */
#endif
#endif
#endif /* POLARSSL_X509_CRT_PARSE_C */
/*
* Checksum contexts
......@@ -814,7 +814,7 @@ extern int (*ssl_hw_record_reset)(ssl_context *ssl);
extern int (*ssl_hw_record_write)(ssl_context *ssl);
extern int (*ssl_hw_record_read)(ssl_context *ssl);
extern int (*ssl_hw_record_finish)(ssl_context *ssl);
#endif
#endif /* POLARSSL_SSL_HW_RECORD_ACCEL */
/**
* \brief Returns the list of ciphersuites supported by the SSL/TLS module.
......@@ -1195,7 +1195,7 @@ int ssl_set_dh_param( ssl_context *ssl, const char *dhm_P, const char *dhm_G );
* \return 0 if successful
*/
int ssl_set_dh_param_ctx( ssl_context *ssl, dhm_context *dhm_ctx );
#endif
#endif /* POLARSSL_DHM_C */
#if defined(POLARSSL_SSL_SET_CURVES)
/**
......@@ -1217,7 +1217,7 @@ int ssl_set_dh_param_ctx( ssl_context *ssl, dhm_context *dhm_ctx );
* terminated by POLARSSL_ECP_DP_NONE.
*/
void ssl_set_curves( ssl_context *ssl, const ecp_group_id *curves );
#endif
#endif /* POLARSSL_SSL_SET_CURVES */
#if defined(POLARSSL_SSL_SERVER_NAME_INDICATION)
/**
......@@ -1395,7 +1395,7 @@ void ssl_set_renegotiation( ssl_context *ssl, int renegotiation );
/**
* \brief Prevent or allow legacy renegotiation.
* (Default: SSL_LEGACY_NO_RENEGOTIATION)
*
*
* SSL_LEGACY_NO_RENEGOTIATION allows connections to
* be established even if the peer does not support
* secure renegotiation, but does not allow renegotiation
......
......@@ -346,16 +346,16 @@ static const uint32_t RCON[10] =
0x0000001B, 0x00000036
};
#else
#else /* POLARSSL_AES_ROM_TABLES */
/*
* Forward S-box & tables
*/
static unsigned char FSb[256];
static uint32_t FT0[256];
static uint32_t FT1[256];
static uint32_t FT2[256];
static uint32_t FT3[256];
static uint32_t FT0[256];
static uint32_t FT1[256];
static uint32_t FT2[256];
static uint32_t FT3[256];
/*
* Reverse S-box & tables
......@@ -456,7 +456,7 @@ static void aes_gen_tables( void )
}
}
#endif
#endif /* POLARSSL_AES_ROM_TABLES */
/*
* AES key schedule (encryption)
......@@ -826,7 +826,7 @@ int aes_crypt_cbc( aes_context *ctx,
{
if( padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 )
return( 0 );
// If padlock data misaligned, we just fall back to
// unaccelerated mode
//
......@@ -1424,6 +1424,6 @@ int aes_self_test( int verbose )
return( 0 );
}
#endif
#endif /* POLARSSL_SELF_TEST */
#endif
#endif /* POLARSSL_AES_C */
......@@ -178,6 +178,6 @@ int arc4_self_test( int verbose )
return( 0 );
}
#endif
#endif /* POLARSSL_SELF_TEST */
#endif
#endif /* POLARSSL_ARC4_C */
......@@ -387,4 +387,4 @@ asn1_named_data *asn1_find_named_data( asn1_named_data *list,
return( list );
}
#endif
#endif /* POLARSSL_ASN1_PARSE_C */
......@@ -363,4 +363,4 @@ asn1_named_data *asn1_store_named_data( asn1_named_data **head,
return( cur );
}
#endif
#endif /* POLARSSL_ASN1_WRITE_C */
......@@ -267,6 +267,6 @@ int base64_self_test( int verbose )
return( 0 );
}
#endif
#endif /* POLARSSL_SELF_TEST */
#endif
#endif /* POLARSSL_BASE64_C */
......@@ -313,7 +313,7 @@ int mpi_set_bit( mpi *X, size_t pos, unsigned char val )
if( val != 0 && val != 1 )
return POLARSSL_ERR_MPI_BAD_INPUT_DATA;
if( X->n * biL <= pos )
{
if( val == 0 )
......@@ -326,7 +326,7 @@ int mpi_set_bit( mpi *X, size_t pos, unsigned char val )
X->p[off] |= (t_uint) val << idx;
cleanup:
return( ret );
}
......@@ -860,7 +860,7 @@ int mpi_add_abs( mpi *X, const mpi *A, const mpi *B )
if( X != A )
MPI_CHK( mpi_copy( X, A ) );
/*
* X should always be positive as a result of unsigned additions.
*/
......@@ -1083,7 +1083,7 @@ void mpi_mul_hlp( size_t i, t_uint *s, t_uint *d, t_uint b )
MULADDC_CORE
MULADDC_STOP
}
#else
#else /* MULADDC_HUIT */
for( ; i >= 16; i -= 16 )
{
MULADDC_INIT
......@@ -1116,7 +1116,7 @@ void mpi_mul_hlp( size_t i, t_uint *s, t_uint *d, t_uint b )
MULADDC_CORE
MULADDC_STOP
}
#endif
#endif /* MULADDC_HUIT */
t++;
......@@ -2333,6 +2333,6 @@ cleanup:
return( ret );
}
#endif
#endif /* POLARSSL_SELF_TEST */
#endif
#endif /* POLARSSL_BIGNUM_C */
/*
* Blowfish implementation
*
* Copyright (C) 2012-2013, Brainspark B.V.
* Copyright (C) 2012-2014, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
......@@ -75,7 +75,7 @@ static const uint32_t P[BLOWFISH_ROUNDS + 2] = {
/* declarations of data at the end of this file */
static const uint32_t S[4][256];
static uint32_t F(blowfish_context *ctx, uint32_t x)
static uint32_t F(blowfish_context *ctx, uint32_t x)
{
unsigned short a, b, c, d;
uint32_t y;
......@@ -94,7 +94,7 @@ static uint32_t F(blowfish_context *ctx, uint32_t x)
return y;
}
static void blowfish_enc(blowfish_context *ctx, uint32_t *xl, uint32_t *xr)
static void blowfish_enc(blowfish_context *ctx, uint32_t *xl, uint32_t *xr)
{
uint32_t Xl, Xr, temp;
short i;
......@@ -102,7 +102,7 @@ static void blowfish_enc(blowfish_context *ctx, uint32_t *xl, uint32_t *xr)
Xl = *xl;
Xr = *xr;
for (i = 0; i < BLOWFISH_ROUNDS; ++i)
for (i = 0; i < BLOWFISH_ROUNDS; ++i)
{
Xl = Xl ^ ctx->P[i];
Xr = F(ctx, Xl) ^ Xr;
......@@ -123,7 +123,7 @@ static void blowfish_enc(blowfish_context *ctx, uint32_t *xl, uint32_t *xr)
*xr = Xr;
}
static void blowfish_dec(blowfish_context *ctx, uint32_t *xl, uint32_t *xr)
static void blowfish_dec(blowfish_context *ctx, uint32_t *xl, uint32_t *xr)
{
uint32_t Xl, Xr, temp;
short i;
......@@ -131,7 +131,7 @@ static void blowfish_dec(blowfish_context *ctx, uint32_t *xl, uint32_t *xr)
Xl = *xl;
Xr = *xr;
for (i = BLOWFISH_ROUNDS + 1; i > 1; --i)
for (i = BLOWFISH_ROUNDS + 1; i > 1; --i)
{
Xl = Xl ^ ctx->P[i];
Xr = F(ctx, Xl) ^ Xr;
......@@ -161,14 +161,14 @@ int blowfish_setkey( blowfish_context *ctx, const unsigned char *key, unsigned i
uint32_t data, datal, datar;
if( keysize < BLOWFISH_MIN_KEY || keysize > BLOWFISH_MAX_KEY ||
( keysize % 8 ) )
( keysize % 8 ) )
{
return POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH;
}
keysize >>= 3;
for( i = 0; i < 4; i++ )
for( i = 0; i < 4; i++ )
{
for( j = 0; j < 256; j++ )
ctx->S[i][j] = S[i][j];
......@@ -219,8 +219,8 @@ int blowfish_crypt_ecb( blowfish_context *ctx,
{
uint32_t X0, X1;
GET_UINT32_BE( X0, input, 0 );
GET_UINT32_BE( X1, input, 4 );
GET_UINT32_BE( X0, input, 0 );
GET_UINT32_BE( X1, input, 4 );
if( mode == BLOWFISH_DECRYPT )
{
......
......@@ -107,7 +107,7 @@ static const unsigned char FSb[256] =
#define SBOX3(n) (unsigned char)((FSb[(n)] >> 1 ^ FSb[(n)] << 7) & 0xff)
#define SBOX4(n) FSb[((n) << 1 ^ (n) >> 7) &0xff]
#else
#else /* POLARSSL_CAMELLIA_SMALL_MEMORY */
static const unsigned char FSb[256] =
{
......@@ -194,7 +194,7 @@ static const unsigned char FSb4[256] =
#define SBOX3(n) FSb3[(n)]
#define SBOX4(n) FSb4[(n)]
#endif
#endif /* POLARSSL_CAMELLIA_SMALL_MEMORY */
static const unsigned char shifts[2][4][4] =
{
......@@ -268,13 +268,13 @@ static const signed char transposes[2][20] =
(XR) = ((((XL) & (KL)) << 1) | (((XL) & (KL)) >> 31)) ^ (XR); \
(XL) = ((XR) | (KR)) ^ (XL); \
}
#define FLInv(YL, YR, KL, KR) \
{ \
(YL) = ((YR) | (KR)) ^ (YL); \
(YR) = ((((YL) & (KL)) << 1) | (((YL) & (KL)) >> 31)) ^ (YR); \
}
#define SHIFT_AND_PLACE(INDEX, OFFSET) \
{ \
TK[0] = KC[(OFFSET) * 4 + 0]; \
......@@ -392,7 +392,7 @@ int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key, unsign
/*
* Generating subkeys
*/
*/
/* Manipulating KL */
SHIFT_AND_PLACE(idx, 0);
......@@ -691,14 +691,14 @@ static const unsigned char camellia_test_ecb_key[3][CAMELLIA_TESTS_ECB][32] =
{
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
},
{
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
},
......@@ -707,7 +707,7 @@ static const unsigned char camellia_test_ecb_key[3][CAMELLIA_TESTS_ECB][32] =
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
......@@ -718,7 +718,7 @@ static const unsigned char camellia_test_ecb_plain[CAMELLIA_TESTS_ECB][16] =
{
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
{ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
{ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
};
......@@ -1048,6 +1048,6 @@ int camellia_self_test( int verbose )
return ( 0 );
}
#endif
#endif /* POLARSSL_SELF_TEST */
#endif
#endif /* POLARSSL_CAMELLIA_C */
/*
* X.509 test certificates
*
* Copyright (C) 2006-2010, Brainspark B.V.
* Copyright (C) 2006-2014, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
......@@ -305,6 +305,6 @@ const char *test_srv_crt = test_srv_crt_ec;
const char *test_srv_key = test_srv_key_ec;
const char *test_cli_crt = test_cli_crt_ec;
const char *test_cli_key = test_cli_key_ec;
#endif
#endif /* POLARSSL_RSA_C */
#endif /* POLARSSL_CERTS_C */
......@@ -376,7 +376,7 @@ int cipher_update( cipher_context_t *ctx, const unsigned char *input, size_t ile
return 0;
}
#endif
#endif /* POLARSSL_CIPHER_MODE_CFB */
#if defined(POLARSSL_CIPHER_MODE_CTR)
if( ctx->cipher_info->mode == POLARSSL_MODE_CTR )
......@@ -392,7 +392,7 @@ int cipher_update( cipher_context_t *ctx, const unsigned char *input, size_t ile
return 0;