diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-21 19:18:47 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-22 09:38:04 +0000 |
commit | 0f6c9658231a41492680c55c8a9d55dc83485a89 (patch) | |
tree | 575b9efe606c26fc8cfa8465b5666394fc5ff870 /crypto | |
parent | 465171841020cdc71f18c451493b7d72bb0ba6ec (diff) | |
download | openssl-new-0f6c9658231a41492680c55c8a9d55dc83485a89.tar.gz |
Move more comments that confuse indent
Conflicts:
crypto/dsa/dsa.h
demos/engines/ibmca/hw_ibmca.c
ssl/ssl_locl.h
Conflicts:
crypto/bn/rsaz_exp.c
crypto/evp/e_aes_cbc_hmac_sha1.c
crypto/evp/e_aes_cbc_hmac_sha256.c
ssl/ssl_locl.h
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/bio/bss_bio.c | 3 | ||||
-rw-r--r-- | crypto/bio/bss_rtcp.c | 15 | ||||
-rw-r--r-- | crypto/bn/bn_lib.c | 13 | ||||
-rw-r--r-- | crypto/crypto.h | 3 | ||||
-rw-r--r-- | crypto/des/des_ver.h | 6 | ||||
-rw-r--r-- | crypto/dsa/dsa.h | 21 | ||||
-rw-r--r-- | crypto/ec/ec2_oct.c | 5 | ||||
-rw-r--r-- | crypto/ec/ecp_nistp256.c | 6 | ||||
-rw-r--r-- | crypto/ec/ecp_nistp521.c | 3 | ||||
-rw-r--r-- | crypto/ec/ecp_nistputil.c | 3 | ||||
-rw-r--r-- | crypto/ec/ecp_oct.c | 5 | ||||
-rw-r--r-- | crypto/modes/gcm128.c | 3 | ||||
-rw-r--r-- | crypto/rand/md_rand.c | 6 | ||||
-rw-r--r-- | crypto/seed/seed.h | 3 | ||||
-rw-r--r-- | crypto/x509/x509.h | 9 |
15 files changed, 67 insertions, 37 deletions
diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index 6d86587ee3..b948631cd7 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -151,7 +151,8 @@ static int bio_new(BIO *bio) return 0; b->peer = NULL; - b->size = 17*1024; /* enough for one TLS record (just a default) */ + /* enough for one TLS record (just a default) */ + b->size = 17*1024; b->buf = NULL; bio->ptr = b; diff --git a/crypto/bio/bss_rtcp.c b/crypto/bio/bss_rtcp.c index dd6038f3bd..c8145f7d79 100644 --- a/crypto/bio/bss_rtcp.c +++ b/crypto/bio/bss_rtcp.c @@ -76,11 +76,16 @@ typedef unsigned short io_channel; /*************************************************************************/ struct io_status { short status, count; long flags; }; -struct rpc_msg { /* Should have member alignment inhibited */ - char channel; /* 'A'-app data. 'R'-remote client 'G'-global */ - char function; /* 'G'-get, 'P'-put, 'C'-confirm, 'X'-close */ - unsigned short int length; /* Amount of data returned or max to return */ - char data[4092]; /* variable data */ +/* Should have member alignment inhibited */ +struct rpc_msg { + /* 'A'-app data. 'R'-remote client 'G'-global */ + char channel; + /* 'G'-get, 'P'-put, 'C'-confirm, 'X'-close */ + char function; + /* Amount of data returned or max to return */ + unsigned short int length; + /* variable data */ + char data[4092]; }; #define RPC_HDR_SIZE (sizeof(struct rpc_msg) - 4092) diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 7a8f8c1450..c711b2d6ce 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -350,6 +350,11 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) a0=B[0]; a1=B[1]; a2=B[2]; a3=B[3]; A[0]=a0; A[1]=a1; A[2]=a2; A[3]=a3; } + /* + * workaround for ultrix cc: without 'case 0', the optimizer does + * the switch table by doing a=top&3; a--; goto jump_table[a]; + * which fails for top== 0 + */ switch (b->top&3) { case 3: A[2]=B[2]; @@ -357,11 +362,6 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) case 1: A[0]=B[0]; case 0: ; - /* - * workaround for ultrix cc: without 'case 0', the optimizer does - * the switch table by doing a=top&3; a--; goto jump_table[a]; - * which fails for top== 0 - */ } } @@ -508,12 +508,13 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) a0=B[0]; a1=B[1]; a2=B[2]; a3=B[3]; A[0]=a0; A[1]=a1; A[2]=a2; A[3]=a3; } + /* ultrix cc workaround, see comments in bn_expand_internal */ switch (b->top&3) { case 3: A[2]=B[2]; case 2: A[1]=B[1]; case 1: A[0]=B[0]; - case 0: ; /* ultrix cc workaround, see comments in bn_expand_internal */ + case 0: ; } #else memcpy(a->d,b->d,sizeof(b->d[0])*b->top); diff --git a/crypto/crypto.h b/crypto/crypto.h index d0e168949a..1b1ed5ad89 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -285,7 +285,8 @@ typedef struct bio_st BIO_dummy; struct crypto_ex_data_st { STACK_OF(void) *sk; - int dummy; /* gcc is screwing up this data structure :-( */ + /* gcc is screwing up this data structure :-( */ + int dummy; }; DECLARE_STACK_OF(void) diff --git a/crypto/des/des_ver.h b/crypto/des/des_ver.h index d1ada258a6..10e889a572 100644 --- a/crypto/des/des_ver.h +++ b/crypto/des/des_ver.h @@ -67,5 +67,7 @@ #define DES_version OSSL_DES_version #define libdes_version OSSL_libdes_version -OPENSSL_EXTERN const char OSSL_DES_version[]; /* SSLeay version string */ -OPENSSL_EXTERN const char OSSL_libdes_version[]; /* old libdes version string */ +/* SSLeay version string */ +OPENSSL_EXTERN const char OSSL_DES_version[]; +/* old libdes version string */ +OPENSSL_EXTERN const char OSSL_libdes_version[]; diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h index 19422dfefb..bedb99198f 100644 --- a/crypto/dsa/dsa.h +++ b/crypto/dsa/dsa.h @@ -89,13 +89,20 @@ #endif #define DSA_FLAG_CACHE_MONT_P 0x01 -#define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA - * implementation now uses constant time - * modular exponentiation for secret exponents - * by default. This flag causes the - * faster variable sliding window method to - * be used for all exponents. - */ +/* new with 0.9.7h; the + * built-in DSA + * implementation now + * uses constant time + * modular exponentiation + * for secret exponents + * by default. This flag + * causes the faster + * variable sliding + * window method to be + * used for all + * exponents. + */ +#define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* If this flag is set the DSA method is FIPS compliant and can be used * in FIPS mode. This is set in the validated module method. If an diff --git a/crypto/ec/ec2_oct.c b/crypto/ec/ec2_oct.c index c60df5c6f2..943b75baf5 100644 --- a/crypto/ec/ec2_oct.c +++ b/crypto/ec/ec2_oct.c @@ -390,8 +390,9 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, if (!EC_POINT_set_affine_coordinates_GF2m(group, point, x, y, ctx)) goto err; } - - if (!EC_POINT_is_on_curve(group, point, ctx)) /* test required by X9.62 */ + + /* test required by X9.62 */ + if (!EC_POINT_is_on_curve(group, point, ctx)) { ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); goto err; diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c index f2f8266b11..33fba29155 100644 --- a/crypto/ec/ecp_nistp256.c +++ b/crypto/ec/ecp_nistp256.c @@ -1568,9 +1568,10 @@ static void batch_mul(felem x_out, felem y_out, felem z_out, if (!skip) { + /* Arg 1 below is for "mixed" */ point_add(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2], - 1 /* mixed */, tmp[0], tmp[1], tmp[2]); + 1, tmp[0], tmp[1], tmp[2]); } else { @@ -1587,9 +1588,10 @@ static void batch_mul(felem x_out, felem y_out, felem z_out, bits |= get_bit(g_scalar, i); /* select the point to add, in constant time */ select_point(bits, 16, g_pre_comp[0], tmp); + /* Arg 1 below is for "mixed" */ point_add(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2], - 1 /* mixed */, tmp[0], tmp[1], tmp[2]); + 1, tmp[0], tmp[1], tmp[2]); } /* do other additions every 5 doublings */ diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index 78c21f0089..f97dab67de 100644 --- a/crypto/ec/ecp_nistp521.c +++ b/crypto/ec/ecp_nistp521.c @@ -1460,9 +1460,10 @@ static void batch_mul(felem x_out, felem y_out, felem z_out, select_point(bits, 16, g_pre_comp, tmp); if (!skip) { + /* The 1 argument below is for "mixed" */ point_add(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2], - 1 /* mixed */, tmp[0], tmp[1], tmp[2]); + 1, tmp[0], tmp[1], tmp[2]); } else { diff --git a/crypto/ec/ecp_nistputil.c b/crypto/ec/ecp_nistputil.c index 4ab42d814c..c65bb2d911 100644 --- a/crypto/ec/ecp_nistputil.c +++ b/crypto/ec/ecp_nistputil.c @@ -79,7 +79,8 @@ void ec_GFp_nistp_points_make_affine_internal(size_t num, void *point_array, /* tmp_felem(i-1) is the product of Z(0) .. Z(i-1), * tmp_felem(i) is the inverse of the product of Z(0) .. Z(i) */ - felem_mul(tmp_felem(num), tmp_felem(i-1), tmp_felem(i)); /* 1/Z(i) */ + /* 1/Z(i) */ + felem_mul(tmp_felem(num), tmp_felem(i-1), tmp_felem(i)); else felem_assign(tmp_felem(num), tmp_felem(0)); /* 1/Z(0) */ diff --git a/crypto/ec/ecp_oct.c b/crypto/ec/ecp_oct.c index c23983d7f7..0fdd8ad31f 100644 --- a/crypto/ec/ecp_oct.c +++ b/crypto/ec/ecp_oct.c @@ -416,8 +416,9 @@ int ec_GFp_simple_oct2point(const EC_GROUP *group, EC_POINT *point, if (!EC_POINT_set_affine_coordinates_GFp(group, point, x, y, ctx)) goto err; } - - if (!EC_POINT_is_on_curve(group, point, ctx)) /* test required by X9.62 */ + + /* test required by X9.62 */ + if (!EC_POINT_is_on_curve(group, point, ctx)) { ECerr(EC_F_EC_GFP_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); goto err; diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c index 7152824ed8..4b5269240e 100644 --- a/crypto/modes/gcm128.c +++ b/crypto/modes/gcm128.c @@ -2019,7 +2019,8 @@ static const u8 T19[]= { /* Test Case 20 */ #define K20 K1 #define A20 A1 -static const u8 IV20[64]={0xff,0xff,0xff,0xff}; /* this results in 0xff in counter LSB */ +/* this results in 0xff in counter LSB */ +static const u8 IV20[64]={0xff,0xff,0xff,0xff}; static const u8 P20[288]; static const u8 C20[]= { 0x56,0xb3,0x37,0x3c,0xa9,0xef,0x6e,0x4a, diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 888b4eb8dd..ba62046ba5 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -147,7 +147,8 @@ static unsigned int crypto_lock_rand = 0; /* may be set only when a thread * holds CRYPTO_LOCK_RAND * (to prevent double locking) */ /* access to lockin_thread is synchronized by CRYPTO_LOCK_RAND2 */ -static CRYPTO_THREADID locking_threadid; /* valid iff crypto_lock_rand is set */ +/* valid iff crypto_lock_rand is set */ +static CRYPTO_THREADID locking_threadid; #ifdef PREDICT @@ -504,7 +505,8 @@ int ssleay_rand_bytes(unsigned char *buf, int num, int pseudo, int lock) for (i=0; i<MD_DIGEST_LENGTH/2; i++) { - state[st_idx++]^=local_md[i]; /* may compete with other threads */ + /* may compete with other threads */ + state[st_idx++]^=local_md[i]; if (st_idx >= st_num) st_idx=0; if (i < j) diff --git a/crypto/seed/seed.h b/crypto/seed/seed.h index c50fdd3607..ec639456e7 100644 --- a/crypto/seed/seed.h +++ b/crypto/seed/seed.h @@ -89,7 +89,8 @@ #error SEED is disabled. #endif -#ifdef AES_LONG /* look whether we need 'long' to get 32 bits */ +/* look whether we need 'long' to get 32 bits */ +#ifdef AES_LONG # ifndef SEED_LONG # define SEED_LONG 1 # endif diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index b2ab84bd1d..88857bd81f 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -570,7 +570,8 @@ X509_ALGOR *encryption; } PBE2PARAM; typedef struct PBKDF2PARAM_st { -ASN1_TYPE *salt; /* Usually OCTET STRING but could be anything */ +/* Usually OCTET STRING but could be anything */ +ASN1_TYPE *salt; ASN1_INTEGER *iter; ASN1_INTEGER *keylength; X509_ALGOR *prf; @@ -581,7 +582,8 @@ X509_ALGOR *prf; struct pkcs8_priv_key_info_st { - int broken; /* Flag for various broken formats */ + /* Flag for various broken formats */ + int broken; #define PKCS8_OK 0 #define PKCS8_NO_OCTET 1 #define PKCS8_EMBEDDED_PARAM 2 @@ -589,7 +591,8 @@ struct pkcs8_priv_key_info_st #define PKCS8_NEG_PRIVKEY 4 ASN1_INTEGER *version; X509_ALGOR *pkeyalg; - ASN1_TYPE *pkey; /* Should be OCTET STRING but some are broken */ + /* Should be OCTET STRING but some are broken */ + ASN1_TYPE *pkey; STACK_OF(X509_ATTRIBUTE) *attributes; }; |