From 712548231e101f11c06e729e2330a7f3155b2d7e Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 16 Jan 2015 14:43:29 +0000 Subject: [PATCH] Additional comment changes for reformat of 1.0.1 Reviewed-by: Tim Hudson --- bugs/alpha.c | 3 ++- bugs/dggccbug.c | 3 ++- crypto/bio/bss_file.c | 2 +- crypto/crypto.h | 3 ++- crypto/des/ofb64ede.c | 2 +- crypto/dso/dso_dlfcn.c | 2 +- crypto/ec/ec2_smpl.c | 3 ++- crypto/ec/ecp_smpl.c | 9 ++++++--- crypto/jpake/jpake.c | 2 +- demos/bio/saccept.c | 3 ++- demos/bio/sconnect.c | 3 ++- demos/easy_tls/easy-tls.c | 4 ++-- demos/easy_tls/easy-tls.h | 2 +- demos/engines/zencod/hw_zencod.h | 3 ++- demos/spkigen.c | 3 ++- demos/tunala/cb.c | 3 ++- engines/e_cswift.c | 6 ++++-- ssl/d1_clnt.c | 18 ++++++++++-------- ssl/d1_pkt.c | 6 ++++-- ssl/kssl.c | 3 ++- ssl/s2_pkt.c | 15 ++++++++++----- ssl/s3_enc.c | 6 ++++-- ssl/ssl_locl.h | 2 +- 23 files changed, 66 insertions(+), 40 deletions(-) diff --git a/bugs/alpha.c b/bugs/alpha.c index 701d6a7c74..2c90a6d3ef 100644 --- a/bugs/alpha.c +++ b/bugs/alpha.c @@ -60,7 +60,8 @@ * something to watch out for. This was fine on linux/NT/Solaris but not * Alpha */ -/* it is basically an example of +/*- + * it is basically an example of * func(*(a++),*(a++)) * which parameter is evaluated first? It is not defined in ASN1 C. */ diff --git a/bugs/dggccbug.c b/bugs/dggccbug.c index 30e07a60ea..b0eb41deb4 100644 --- a/bugs/dggccbug.c +++ b/bugs/dggccbug.c @@ -14,7 +14,8 @@ * copies of the valiable, one in a register and one being an address * that is passed. */ -/* compare the out put from +/*- + * compare the out put from * gcc dggccbug.c; ./a.out * and * gcc -O dggccbug.c; ./a.out diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index b954fe7ebc..d84c992f6e 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ -/* +/*- * 03-Dec-1997 rdenny@dc3.com Fix bug preventing use of stdin/stdout * with binary data (e.g. asn1parse -inform DER < xxx) under * Windows diff --git a/crypto/crypto.h b/crypto/crypto.h index 655993e8d7..d0e168949a 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -511,7 +511,8 @@ int CRYPTO_remove_all_info(void); /* Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro; * used as default in CRYPTO_MDEBUG compilations): */ -/* The last argument has the following significance: +/*- + * The last argument has the following significance: * * 0: called before the actual memory allocation has taken place * 1: called after the actual memory allocation has taken place diff --git a/crypto/des/ofb64ede.c b/crypto/des/ofb64ede.c index 26bbf9a6a7..a9cdfd63f3 100644 --- a/crypto/des/ofb64ede.c +++ b/crypto/des/ofb64ede.c @@ -105,7 +105,7 @@ void DES_ede3_ofb64_encrypt(register const unsigned char *in, } if (save) { -/* v0=ti[0]; +/*- v0=ti[0]; v1=ti[1];*/ iv = &(*ivec)[0]; l2c(v0,iv); diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index faa9d76b42..fb6f90a78c 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -401,7 +401,7 @@ static char *dlfcn_name_converter(DSO *dso, const char *filename) } #ifdef __sgi -/* +/*- This is a quote from IRIX manual for dladdr(3c): does not contain a prototype for dladdr or definition of diff --git a/crypto/ec/ec2_smpl.c b/crypto/ec/ec2_smpl.c index 350b59be91..0de9e73bae 100644 --- a/crypto/ec/ec2_smpl.c +++ b/crypto/ec/ec2_smpl.c @@ -544,7 +544,8 @@ int ec_GF2m_simple_is_at_infinity(const EC_GROUP *group, const EC_POINT *point) } -/* Determines whether the given EC_POINT is an actual point on the curve defined +/*- + * Determines whether the given EC_POINT is an actual point on the curve defined * in the EC_GROUP. A point is valid if it satisfies the Weierstrass equation: * y^2 + x*y = x^3 + a*x^2 + b. */ diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c index 4741bf9af3..c9fe1cf1db 100644 --- a/crypto/ec/ecp_smpl.c +++ b/crypto/ec/ecp_smpl.c @@ -864,8 +864,10 @@ int ec_GFp_simple_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_ if (!field_mul(group, n1, n0, n2, ctx)) goto err; if (!BN_mod_lshift1_quick(n0, n1, p)) goto err; if (!BN_mod_add_quick(n1, n0, n1, p)) goto err; - /* n1 = 3 * (X_a + Z_a^2) * (X_a - Z_a^2) - * = 3 * X_a^2 - 3 * Z_a^4 */ + /*- + * n1 = 3 * (X_a + Z_a^2) * (X_a - Z_a^2) + * = 3 * X_a^2 - 3 * Z_a^4 + */ } else { @@ -1035,7 +1037,8 @@ int ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_C int ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx) { - /* return values: + /*- + * return values: * -1 error * 0 equal (in affine coordinates) * 1 not equal diff --git a/crypto/jpake/jpake.c b/crypto/jpake/jpake.c index 046638882c..3b1ee2742b 100644 --- a/crypto/jpake/jpake.c +++ b/crypto/jpake/jpake.c @@ -190,7 +190,7 @@ static void generate_zkp(JPAKE_STEP_PART *p, const BIGNUM *x, BIGNUM *h = BN_new(); BIGNUM *t = BN_new(); - /* + /*- * r in [0,q) * XXX: Java chooses r in [0, 2^160) - i.e. distribution not uniform */ diff --git a/demos/bio/saccept.c b/demos/bio/saccept.c index 40cd4daad2..21b09a56bc 100644 --- a/demos/bio/saccept.c +++ b/demos/bio/saccept.c @@ -1,7 +1,8 @@ /* NOCW */ /* demos/bio/saccept.c */ -/* A minimal program to server an SSL connection. +/*- + * A minimal program to server an SSL connection. * It uses blocking. * saccept host:port * host is the interface IP to use. If any interface, use *:port diff --git a/demos/bio/sconnect.c b/demos/bio/sconnect.c index 880344eb78..d15c4132e5 100644 --- a/demos/bio/sconnect.c +++ b/demos/bio/sconnect.c @@ -1,7 +1,8 @@ /* NOCW */ /* demos/bio/sconnect.c */ -/* A minimal program to do SSL to a passed host and port. +/*- + * A minimal program to do SSL to a passed host and port. * It is actually using non-blocking IO but in a very simple manner * sconnect host:port - it does a 'GET / HTTP/1.0' * diff --git a/demos/easy_tls/easy-tls.c b/demos/easy_tls/easy-tls.c index 6122ce0a60..64090c41ca 100644 --- a/demos/easy_tls/easy-tls.c +++ b/demos/easy_tls/easy-tls.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-file-style: "bsd" -*- */ -/* +/*- * easy-tls.c -- generic TLS proxy. * $Id: easy-tls.c,v 1.4 2002/03/05 09:07:16 bodo Exp $ */ @@ -62,7 +62,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Attribution for OpenSSL library: * * This product includes cryptographic software written by Eric Young diff --git a/demos/easy_tls/easy-tls.h b/demos/easy_tls/easy-tls.h index 52b298e654..71ed87aeac 100644 --- a/demos/easy_tls/easy-tls.h +++ b/demos/easy_tls/easy-tls.h @@ -1,5 +1,5 @@ /* -*- Mode: C; c-file-style: "bsd" -*- */ -/* +/*- * easy-tls.h -- generic TLS proxy. * $Id: easy-tls.h,v 1.1 2001/09/17 19:06:59 bodo Exp $ */ diff --git a/demos/engines/zencod/hw_zencod.h b/demos/engines/zencod/hw_zencod.h index 415c9a6be8..eef8ee6fe8 100644 --- a/demos/engines/zencod/hw_zencod.h +++ b/demos/engines/zencod/hw_zencod.h @@ -114,7 +114,8 @@ typedef struct ZEN_data_st /* output : output data buffer */ /* input : input data buffer */ /* algo : hash algorithm, MD5 or SHA1 */ -/* typedef int t_zencod_hash ( KEY *output, const KEY *input, int algo ) ; +/*- + * typedef int t_zencod_hash ( KEY *output, const KEY *input, int algo ) ; * typedef int t_zencod_sha_hash ( KEY *output, const KEY *input, int algo ) ; */ /* For now separate this stuff that mad it easier to test */ diff --git a/demos/spkigen.c b/demos/spkigen.c index 2cd5dfea97..a22b3ef340 100644 --- a/demos/spkigen.c +++ b/demos/spkigen.c @@ -1,5 +1,6 @@ /* NOCW */ -/* demos/spkigen.c +/*- + * demos/spkigen.c * 18-Mar-1997 - eay - A quick hack :-) * version 1.1, it would probably help to save or load the * private key :-) diff --git a/demos/tunala/cb.c b/demos/tunala/cb.c index f6e452ae93..ba9a5681ff 100644 --- a/demos/tunala/cb.c +++ b/demos/tunala/cb.c @@ -5,7 +5,8 @@ /* For callbacks generating output, here are their file-descriptors. */ static FILE *fp_cb_ssl_info = NULL; static FILE *fp_cb_ssl_verify = NULL; -/* Output level: +/*- + * Output level: * 0 = nothing, * 1 = minimal, just errors, * 2 = minimal, all steps, diff --git a/engines/e_cswift.c b/engines/e_cswift.c index 2e64ff3277..18c583d689 100644 --- a/engines/e_cswift.c +++ b/engines/e_cswift.c @@ -1065,9 +1065,11 @@ static int cswift_rand_bytes(unsigned char *buf, int num) { largenum.value = buf; largenum.nbytes = sizeof(buf32); - /* tell CryptoSwift how many bytes we want and where we want it. + /*- + * tell CryptoSwift how many bytes we want and where we want it. * Note: - CryptoSwift cannot do more than 4096 bytes at a time. - * - CryptoSwift can only do multiple of 32-bits. */ + * - CryptoSwift can only do multiple of 32-bits. + */ swrc = p_CSwift_SimpleRequest(hac, SW_CMD_RAND, NULL, 0, &largenum, 1); if (swrc != SW_OK) { diff --git a/ssl/d1_clnt.c b/ssl/d1_clnt.c index 9045fb9902..ce7a204eaf 100644 --- a/ssl/d1_clnt.c +++ b/ssl/d1_clnt.c @@ -1093,7 +1093,8 @@ int dtls1_send_client_key_exchange(SSL *s) goto err; } - /* 20010406 VRS - Earlier versions used KRB5 AP_REQ + /*- + * 20010406 VRS - Earlier versions used KRB5 AP_REQ ** in place of RFC 2712 KerberosWrapper, as in: ** ** Send ticket (copy to *p, set n = length) @@ -1139,12 +1140,13 @@ int dtls1_send_client_key_exchange(SSL *s) if (RAND_bytes(tmp_buf,sizeof tmp_buf) <= 0) goto err; - /* 20010420 VRS. Tried it this way; failed. - ** EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,NULL); - ** EVP_CIPHER_CTX_set_key_length(&ciph_ctx, - ** kssl_ctx->length); - ** EVP_EncryptInit_ex(&ciph_ctx,NULL, key,iv); - */ + /*- + * 20010420 VRS. Tried it this way; failed. + * EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,NULL); + * EVP_CIPHER_CTX_set_key_length(&ciph_ctx, + * kssl_ctx->length); + * EVP_EncryptInit_ex(&ciph_ctx,NULL, key,iv); + */ memset(iv, 0, sizeof iv); /* per RFC 1510 */ EVP_EncryptInit_ex(&ciph_ctx,enc, NULL, @@ -1522,7 +1524,7 @@ int dtls1_send_client_key_exchange(SSL *s) d = dtls1_set_message_header(s, d, SSL3_MT_CLIENT_KEY_EXCHANGE, n, 0, n); - /* + /*- *(d++)=SSL3_MT_CLIENT_KEY_EXCHANGE; l2n3(n,d); l2n(s->d1->handshake_write_seq,d); diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 450a27be65..b297f0deec 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -1045,9 +1045,11 @@ start: } } - /* s->d1->handshake_fragment_len == 12 iff rr->type == SSL3_RT_HANDSHAKE; + /*- + * s->d1->handshake_fragment_len == 12 iff rr->type == SSL3_RT_HANDSHAKE; * s->d1->alert_fragment_len == 7 iff rr->type == SSL3_RT_ALERT. - * (Possibly rr is 'empty' now, i.e. rr->length may be 0.) */ + * (Possibly rr is 'empty' now, i.e. rr->length may be 0.) + */ /* If we are a client, check for an incoming 'Hello Request': */ if ((!s->server) && diff --git a/ssl/kssl.c b/ssl/kssl.c index 7ce8111708..f2b34bc876 100644 --- a/ssl/kssl.c +++ b/ssl/kssl.c @@ -1301,7 +1301,8 @@ kssl_TKT2tkt( /* IN */ krb5_context krb5context, } -/* Given krb5 service name in KSSL_CTX *kssl_ctx (typically "kssl"), +/*- + * Given krb5 service name in KSSL_CTX *kssl_ctx (typically "kssl"), * and krb5 AP_REQ message & message length, * Return Kerberos session key and client principle * to SSL Server in KSSL_CTX *kssl_ctx. diff --git a/ssl/s2_pkt.c b/ssl/s2_pkt.c index acd61dc546..d05b908f6c 100644 --- a/ssl/s2_pkt.c +++ b/ssl/s2_pkt.c @@ -572,16 +572,20 @@ static int n_do_ssl_write(SSL *s, const unsigned char *buf, unsigned int len) } else if ((bs <= 1) && (!s->s2->escape)) { - /* j <= SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER, thus - * j < SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER */ + /*- + * j <= SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER, thus + * j < SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER + */ s->s2->three_byte_header=0; p=0; } else /* we may have to use a 3 byte header */ { - /* If s->s2->escape is not set, then + /*- + * If s->s2->escape is not set, then * j <= SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER, and thus - * j < SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER. */ + * j < SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER. + */ p=(j%bs); p=(p == 0)?0:(bs-p); if (s->s2->escape) @@ -595,7 +599,8 @@ static int n_do_ssl_write(SSL *s, const unsigned char *buf, unsigned int len) } } - /* Now + /*- + * Now * j <= SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER * holds, and if s->s2->three_byte_header is set, then even * j <= SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER. diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 89c133e681..8384e9e5a0 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -466,7 +466,8 @@ void ssl3_cleanup_key_block(SSL *s) s->s3->tmp.key_block_length=0; } -/* ssl3_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively. +/*- + * ssl3_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively. * * Returns: * 0: (in non-constant time) if the record is publically invalid (i.e. too @@ -756,7 +757,8 @@ int n_ssl3_mac(SSL *ssl, unsigned char *md, int send) * data we are hashing because that gives an attacker a * timing-oracle. */ - /* npad is, at most, 48 bytes and that's with MD5: + /*- + * npad is, at most, 48 bytes and that's with MD5: * 16 + 48 + 8 (sequence bytes) + 1 + 2 = 75. * * With SHA-1 (the largest hash speced for SSLv3) the hash size diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index 3a5aa2b043..c4c74d9f33 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -464,7 +464,7 @@ * SSL_aDSS <- DSA_SIGN */ -/* +/*- #define CERT_INVALID 0 #define CERT_PUBLIC_KEY 1 #define CERT_PRIVATE_KEY 2 -- 2.25.1