From e19d4a99b8f25456dfab7086af57f3f208cdfed6 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 5 Jan 2015 00:34:00 +0000 Subject: Further comment amendments to preserve formatting prior to source reformat (cherry picked from commit 4a7fa26ffd65bf36beb8d1cb8f29fc0ae203f5c5) Conflicts: crypto/x509v3/pcy_tree.c Reviewed-by: Tim Hudson --- crypto/bio/b_sock.c | 3 ++- crypto/bio/bf_null.c | 6 ++++-- crypto/bio/bss_rtcp.c | 3 ++- crypto/bn/bn_ctx.c | 3 ++- crypto/des/des_old.c | 3 ++- crypto/des/set_key.c | 6 ++++-- crypto/ec/ec2_mult.c | 6 ++++-- crypto/ec/ec2_oct.c | 3 ++- crypto/ec/ecp_nistp224.c | 9 ++++++--- crypto/ec/ecp_nistp256.c | 6 ++++-- crypto/ec/ecp_nistp521.c | 6 ++++-- crypto/ec/ecp_smpl.c | 5 +++-- crypto/ecdh/ech_ossl.c | 3 ++- crypto/engine/eng_openssl.c | 3 ++- crypto/md5/md5_locl.h | 2 +- crypto/objects/objects.h | 3 ++- crypto/ocsp/ocsp_ext.c | 3 ++- crypto/pem/pem.h | 9 ++++++--- crypto/rand/rand_win.c | 3 ++- crypto/rc2/rc2_ecb.c | 3 ++- crypto/stack/stack.c | 3 ++- crypto/threads/mttest.c | 7 ++++--- crypto/threads/th-lock.c | 3 ++- crypto/ui/ui_openssl.c | 3 ++- crypto/x509/x509_vfy.c | 3 ++- crypto/x509v3/pcy_tree.c | 5 +++-- crypto/x509v3/v3_lib.c | 3 ++- crypto/x509v3/v3_pku.c | 2 +- 28 files changed, 76 insertions(+), 41 deletions(-) (limited to 'crypto') diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index a026b3e0b0..445d900cbc 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -553,7 +553,8 @@ int BIO_socket_ioctl(int fd, long type, void *arg) i=ioctlsocket(fd,type,(char *)arg); #else # if defined(OPENSSL_SYS_VMS) - /* 2011-02-18 SMS. + /*- + * 2011-02-18 SMS. * VMS ioctl() can't tolerate a 64-bit "void *arg", but we * observe that all the consumers pass in an "unsigned long *", * so we arrange a local copy with a short pointer, and use diff --git a/crypto/bio/bf_null.c b/crypto/bio/bf_null.c index c1bf39a904..e179e6d0f5 100644 --- a/crypto/bio/bf_null.c +++ b/crypto/bio/bf_null.c @@ -102,9 +102,11 @@ static int nullf_new(BIO *bi) static int nullf_free(BIO *a) { if (a == NULL) return(0); -/* a->ptr=NULL; + /*- + a->ptr=NULL; a->init=0; - a->flags=0;*/ + a->flags=0; + */ return(1); } diff --git a/crypto/bio/bss_rtcp.c b/crypto/bio/bss_rtcp.c index 7dae485564..dd6038f3bd 100644 --- a/crypto/bio/bss_rtcp.c +++ b/crypto/bio/bss_rtcp.c @@ -56,7 +56,8 @@ * [including the GNU Public Licence.] */ -/* Written by David L. Jones +/*- + * Written by David L. Jones * Date: 22-JUL-1996 * Revised: 25-SEP-1997 Update for 0.8.1, BIO_CTRL_SET -> BIO_C_SET_FD */ diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c index 90aa3aeb9f..b8979037f4 100644 --- a/crypto/bn/bn_ctx.c +++ b/crypto/bn/bn_ctx.c @@ -66,7 +66,8 @@ #include "cryptlib.h" #include "bn_lcl.h" -/* TODO list +/*- + * TODO list * * 1. Check a bunch of "(words+1)" type hacks in various bignum functions and * check they can be safely removed. diff --git a/crypto/des/des_old.c b/crypto/des/des_old.c index 7c33ed7a93..3d42014b5b 100644 --- a/crypto/des/des_old.c +++ b/crypto/des/des_old.c @@ -1,6 +1,7 @@ /* crypto/des/des_old.c -*- mode:C; c-file-style: "eay" -*- */ -/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +/*- + * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * The function names in here are deprecated and are only present to * provide an interface compatible with libdes. OpenSSL now provides diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c index 9cbde2ace7..3321396be3 100644 --- a/crypto/des/set_key.c +++ b/crypto/des/set_key.c @@ -152,7 +152,8 @@ int DES_is_weak_key(const_DES_cblock *key) return(0); } -/* NOW DEFINED IN des_local.h +/*- + * NOW DEFINED IN des_local.h * See ecb_encrypt.c for a pseudo description of these macros. * #define PERM_OP(a,b,t,n,m) ((t)=((((a)>>(n))^(b))&(m)),\ * (b)^=(t),\ @@ -322,7 +323,8 @@ int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule) } } -/* return 0 if key parity is odd (correct), +/*- + * return 0 if key parity is odd (correct), * return -1 if key parity error, * return -2 if illegal weak key. */ diff --git a/crypto/ec/ec2_mult.c b/crypto/ec/ec2_mult.c index 333d11b952..9955948dfd 100644 --- a/crypto/ec/ec2_mult.c +++ b/crypto/ec/ec2_mult.c @@ -74,7 +74,8 @@ #ifndef OPENSSL_NO_EC2M -/* Compute the x-coordinate x/z for the point 2*(x/z) in Montgomery projective +/*- + * Compute the x-coordinate x/z for the point 2*(x/z) in Montgomery projective * coordinates. * Uses algorithm Mdouble in appendix of * Lopez, J. and Dahab, R. "Fast multiplication on elliptic curves over @@ -106,7 +107,8 @@ static int gf2m_Mdouble(const EC_GROUP *group, BIGNUM *x, BIGNUM *z, BN_CTX *ctx return ret; } -/* Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in Montgomery +/*- + * Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in Montgomery * projective coordinates. * Uses algorithm Madd in appendix of * Lopez, J. and Dahab, R. "Fast multiplication on elliptic curves over diff --git a/crypto/ec/ec2_oct.c b/crypto/ec/ec2_oct.c index f1d75e5ddf..c60df5c6f2 100644 --- a/crypto/ec/ec2_oct.c +++ b/crypto/ec/ec2_oct.c @@ -73,7 +73,8 @@ #ifndef OPENSSL_NO_EC2M -/* Calculates and sets the affine coordinates of an EC_POINT from the given +/*- + * Calculates and sets the affine coordinates of an EC_POINT from the given * compressed coordinates. Uses algorithm 2.3.4 of SEC 1. * Note that the simple implementation only uses affine coordinates. * diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c index e5d95cc4d0..65164c8a3c 100644 --- a/crypto/ec/ecp_nistp224.c +++ b/crypto/ec/ecp_nistp224.c @@ -346,7 +346,8 @@ static BIGNUM *felem_to_BN(BIGNUM *out, const felem in) } /******************************************************************************/ -/* FIELD OPERATIONS +/*- + * FIELD OPERATIONS * * Field operations, using the internal representation of field elements. * NB! These operations are specific to our point multiplication and cannot be @@ -521,7 +522,8 @@ static void felem_mul(widefelem out, const felem in1, const felem in2) out[6] = ((widelimb) in1[3]) * in2[3]; } -/* Reduce seven 128-bit coefficients to four 64-bit coefficients. +/*- + * Reduce seven 128-bit coefficients to four 64-bit coefficients. * Requires in[i] < 2^126, * ensures out[0] < 2^56, out[1] < 2^56, out[2] < 2^56, out[3] <= 2^56 + 2^16 */ static void felem_reduce(felem out, const widefelem in) @@ -753,7 +755,8 @@ copy_conditional(felem out, const felem in, limb icopy) } /******************************************************************************/ -/* ELLIPTIC CURVE POINT OPERATIONS +/*- + * ELLIPTIC CURVE POINT OPERATIONS * * Points are represented in Jacobian projective coordinates: * (X, Y, Z) corresponds to the affine point (X/Z^2, Y/Z^3), diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c index b5883d6a5a..c80a26186b 100644 --- a/crypto/ec/ecp_nistp256.c +++ b/crypto/ec/ecp_nistp256.c @@ -180,8 +180,10 @@ static BIGNUM *smallfelem_to_BN(BIGNUM *out, const smallfelem in) } -/* Field operations - * ---------------- */ +/*- + * Field operations + * ---------------- + */ static void smallfelem_one(smallfelem out) { diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index 7ff3a0b1be..613c5abc38 100644 --- a/crypto/ec/ecp_nistp521.c +++ b/crypto/ec/ecp_nistp521.c @@ -207,8 +207,10 @@ static BIGNUM *felem_to_BN(BIGNUM *out, const felem in) } -/* Field operations - * ---------------- */ +/*- + * Field operations + * ---------------- + */ static void felem_one(felem out) { diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c index 63e4ac8cf6..4741bf9af3 100644 --- a/crypto/ec/ecp_smpl.c +++ b/crypto/ec/ecp_smpl.c @@ -121,13 +121,14 @@ const EC_METHOD *EC_GFp_simple_method(void) } -/* Most method functions in this file are designed to work with +/* + * Most method functions in this file are designed to work with * non-trivial representations of field elements if necessary * (see ecp_mont.c): while standard modular addition and subtraction * are used, the field_mul and field_sqr methods will be used for * multiplication, and field_encode and field_decode (if defined) * will be used for converting between representations. - + * * Functions ec_GFp_simple_points_make_affine() and * ec_GFp_simple_point_get_affine_coordinates() specifically assume * that if a non-trivial representation is used, it is a Montgomery diff --git a/crypto/ecdh/ech_ossl.c b/crypto/ecdh/ech_ossl.c index fa98eb11ce..07d3ddbebc 100644 --- a/crypto/ecdh/ech_ossl.c +++ b/crypto/ecdh/ech_ossl.c @@ -100,7 +100,8 @@ const ECDH_METHOD *ECDH_OpenSSL(void) } -/* This implementation is based on the following primitives in the IEEE 1363 standard: +/*- + * This implementation is based on the following primitives in the IEEE 1363 standard: * - ECKAS-DH1 * - ECSVDP-DH * Finally an optional KDF is applied. diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 9abb95cc22..c3652abe81 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -207,7 +207,8 @@ IMPLEMENT_DYNAMIC_BIND_FN(bind_fn) #endif /* ENGINE_DYNAMIC_SUPPORT */ #ifdef TEST_ENG_OPENSSL_RC4 -/* This section of code compiles an "alternative implementation" of two modes of +/*- + * This section of code compiles an "alternative implementation" of two modes of * RC4 into this ENGINE. The result is that EVP_CIPHER operation for "rc4" * should under normal circumstances go via this support rather than the default * EVP support. There are other symbols to tweak the testing; diff --git a/crypto/md5/md5_locl.h b/crypto/md5/md5_locl.h index 432f523c7e..3313956fa1 100644 --- a/crypto/md5/md5_locl.h +++ b/crypto/md5/md5_locl.h @@ -97,7 +97,7 @@ void md5_block_data_order (MD5_CTX *c, const void *p,size_t num); #include "md32_common.h" -/* +/*- #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) #define G(x,y,z) (((x) & (z)) | ((y) & (~(z)))) */ diff --git a/crypto/objects/objects.h b/crypto/objects/objects.h index 42d2457295..3f14af9431 100644 --- a/crypto/objects/objects.h +++ b/crypto/objects/objects.h @@ -604,7 +604,8 @@ #define NID_pbeWithMD5AndCast5_CBC 112 #define OBJ_pbeWithMD5AndCast5_CBC 1L,2L,840L,113533L,7L,66L,12L -/* This is one sun will soon be using :-( +/*- + * This is one sun will soon be using :-( * id-dsa-with-sha1 ID ::= { * iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 } */ diff --git a/crypto/ocsp/ocsp_ext.c b/crypto/ocsp/ocsp_ext.c index ec884cb08f..fcacdf0b81 100644 --- a/crypto/ocsp/ocsp_ext.c +++ b/crypto/ocsp/ocsp_ext.c @@ -361,7 +361,8 @@ int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len) return ocsp_add1_nonce(&resp->tbsResponseData->responseExtensions, val, len); } -/* Check nonce validity in a request and response. +/*- + * Check nonce validity in a request and response. * Return value reflects result: * 1: nonces present and equal. * 2: nonces both absent. diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index 7a76e47571..1037b3f61f 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -176,7 +176,8 @@ typedef struct pem_ctx_st struct { int cipher; - /* unused, and wrong size + /*- + unused, and wrong size unsigned char iv[8]; */ } DEK_info; @@ -185,7 +186,8 @@ typedef struct pem_ctx_st int num_recipient; PEM_USER **recipient; - /* XXX(ben): don#t think this is used! + /*- + XXX(ben): don#t think this is used! STACK *x509_chain; / * certificate chain */ EVP_MD *md; /* signature type */ @@ -196,7 +198,8 @@ typedef struct pem_ctx_st EVP_CIPHER *dec; /* date encryption cipher */ int key_len; /* key length */ unsigned char *key; /* key */ - /* unused, and wrong size + /*- + unused, and wrong size unsigned char iv[8]; */ diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index cd68c2909d..9297ec7438 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -375,7 +375,8 @@ int RAND_poll(void) FreeLibrary(user); } - /* Toolhelp32 snapshot: enumerate processes, threads, modules and heap + /*- + * Toolhelp32 snapshot: enumerate processes, threads, modules and heap * http://msdn.microsoft.com/library/psdk/winbase/toolhelp_5pfd.htm * (Win 9x and 2000 only, not available on NT) * diff --git a/crypto/rc2/rc2_ecb.c b/crypto/rc2/rc2_ecb.c index fff86c7af8..4214233c65 100644 --- a/crypto/rc2/rc2_ecb.c +++ b/crypto/rc2/rc2_ecb.c @@ -62,7 +62,8 @@ const char RC2_version[]="RC2" OPENSSL_VERSION_PTEXT; -/* RC2 as implemented frm a posting from +/*- + * RC2 as implemented frm a posting from * Newsgroups: sci.crypt * Sender: pgut01@cs.auckland.ac.nz (Peter Gutmann) * Subject: Specification for Ron Rivests Cipher No.2 diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index 980bb68442..e88746c148 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -56,7 +56,8 @@ * [including the GNU Public Licence.] */ -/* Code for stacks +/*- + * Code for stacks * Author - Eric Young v 1.0 * 1.2 eay 12-Mar-97 - Modified sk_find so that it _DOES_ return the * lowest index for the searched item. diff --git a/crypto/threads/mttest.c b/crypto/threads/mttest.c index eba7aa8a6e..59cb3f34a4 100644 --- a/crypto/threads/mttest.c +++ b/crypto/threads/mttest.c @@ -865,7 +865,7 @@ void solaris_locking_callback(int mode, int type, char *file, int line) (type&CRYPTO_READ)?"r":"w",file,line); #endif - /* + /*- if (CRYPTO_LOCK_SSL_CERT == type) fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", CRYPTO_thread_id(), @@ -873,7 +873,8 @@ void solaris_locking_callback(int mode, int type, char *file, int line) */ if (mode & CRYPTO_LOCK) { - /* if (mode & CRYPTO_READ) + /*- + if (mode & CRYPTO_READ) rw_rdlock(&(lock_cs[type])); else rw_wrlock(&(lock_cs[type])); */ @@ -1069,7 +1070,7 @@ void pthreads_locking_callback(int mode, int type, char *file, (mode&CRYPTO_LOCK)?"l":"u", (type&CRYPTO_READ)?"r":"w",file,line); #endif -/* +/*- if (CRYPTO_LOCK_SSL_CERT == type) fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", CRYPTO_thread_id(), diff --git a/crypto/threads/th-lock.c b/crypto/threads/th-lock.c index 14aae5f912..8daa98c1e5 100644 --- a/crypto/threads/th-lock.c +++ b/crypto/threads/th-lock.c @@ -97,7 +97,8 @@ static unsigned long irix_thread_id(void ); static unsigned long solaris_thread_id(void ); static unsigned long pthreads_thread_id(void ); -/* usage: +/*- + * usage: * CRYPTO_thread_setup(); * application code * CRYPTO_thread_cleanup(); diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c index a38c7581e6..725dcd9215 100644 --- a/crypto/ui/ui_openssl.c +++ b/crypto/ui/ui_openssl.c @@ -56,7 +56,8 @@ * */ -/* The lowest level part of this file was previously in crypto/des/read_pwd.c, +/*- + * The lowest level part of this file was previously in crypto/des/read_pwd.c, * Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index acacb257c9..0d5c6b1c31 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -1310,7 +1310,8 @@ static int check_crl_chain(X509_STORE_CTX *ctx, return 0; } -/* Check for match between two dist point names: three separate cases. +/*- + * Check for match between two dist point names: three separate cases. * 1. Both are relative names and compare X509_NAME types. * 2. One full, one relative. Compare X509_NAME to GENERAL_NAMES. * 3. Both are full names and compare two GENERAL_NAMES. diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c index 2d8bb524a9..7cca2b7538 100644 --- a/crypto/x509v3/pcy_tree.c +++ b/crypto/x509v3/pcy_tree.c @@ -131,8 +131,9 @@ static void tree_print(char *str, X509_POLICY_TREE *tree, #endif -/* Initialize policy tree. Return values: - * 0 Some internal error occured. +/*- + * Initialize policy tree. Return values: + * 0 Some internal error occurred. * -1 Inconsistent or invalid extensions in certificates. * 1 Tree initialized OK. * 2 Policy tree is empty. diff --git a/crypto/x509v3/v3_lib.c b/crypto/x509v3/v3_lib.c index 8303837e7d..d5557de01f 100644 --- a/crypto/x509v3/v3_lib.c +++ b/crypto/x509v3/v3_lib.c @@ -197,7 +197,8 @@ void *X509V3_EXT_d2i(X509_EXTENSION *ext) return method->d2i(NULL, &p, ext->value->length); } -/* Get critical flag and decoded version of extension from a NID. +/*- + * Get critical flag and decoded version of extension from a NID. * The "idx" variable returns the last found extension and can * be used to retrieve multiple extensions of the same NID. * However multiple extensions with the same NID is usually diff --git a/crypto/x509v3/v3_pku.c b/crypto/x509v3/v3_pku.c index 076f3ff48e..f531df94f6 100644 --- a/crypto/x509v3/v3_pku.c +++ b/crypto/x509v3/v3_pku.c @@ -97,7 +97,7 @@ static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, return 1; } -/* +/*- static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(method, ctx, values) X509V3_EXT_METHOD *method; X509V3_CTX *ctx; -- cgit v1.2.3