Move more comments that confuse indent
authorMatt Caswell <matt@openssl.org>
Wed, 21 Jan 2015 19:18:47 +0000 (19:18 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 22 Jan 2015 09:20:09 +0000 (09:20 +0000)
Reviewed-by: Tim Hudson <tjh@openssl.org>
34 files changed:
apps/apps.c
apps/ca.c
apps/passwd.c
apps/s_apps.h
apps/s_server.c
crypto/bio/bss_bio.c
crypto/bio/bss_rtcp.c
crypto/bn/bn_lib.c
crypto/bn/rsaz_exp.c
crypto/crypto.h
crypto/des/des_ver.h
crypto/dsa/dsa.h
crypto/ec/ec2_oct.c
crypto/ec/ecp_nistp256.c
crypto/ec/ecp_nistp521.c
crypto/ec/ecp_nistputil.c
crypto/ec/ecp_oct.c
crypto/evp/e_aes_cbc_hmac_sha1.c
crypto/evp/e_aes_cbc_hmac_sha256.c
crypto/modes/gcm128.c
crypto/rand/md_rand.c
crypto/seed/seed.h
crypto/x509/x509.h
demos/engines/ibmca/hw_ibmca.c
engines/e_chil.c
engines/e_sureware.c
engines/e_ubsec.c
ssl/d1_pkt.c
ssl/kssl.c
ssl/ssl.h
ssl/ssl_locl.h
ssl/ssl_task.c
ssl/ssltest.c
ssl/t1_enc.c

index ac709a6a3d55bd6b68c48561a120af83e578f204..2731554a292081799567c9953250e93d009607ef 100644 (file)
  */
 
 #if !defined(_POSIX_C_SOURCE) && defined(OPENSSL_SYS_VMS)
-#define _POSIX_C_SOURCE 2      /* On VMS, you need to define this to get
-                                  the declaration of fileno().  The value
-                                  2 is to make sure no function defined
-                                  in POSIX-2 is left undefined. */
+/* On VMS, you need to define this to get
+ * the declaration of fileno().  The value
+ * 2 is to make sure no function defined
+ * in POSIX-2 is left undefined.
+ */
+#define _POSIX_C_SOURCE 2
 #endif
 #include <stdio.h>
 #include <stdlib.h>
index 1778f953d9ee55bd69c75f4ceeccfa18fb853482..cd7abeed7600c728ca3cf42c49f697dc0ab03f6c 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1497,7 +1497,8 @@ bad:
                        }
 
                
-               if (crlnumberfile != NULL)      /* we have a CRL number that need updating */
+               /* we have a CRL number that need updating */
+               if (crlnumberfile != NULL)
                        if (!save_serial(crlnumberfile,"new",crlnumber,NULL)) goto err;
 
                if (crlnumber)
index 8e65ed7cbb976a53f36dee28a6492aa4abf5f33d..e12b5ecea8e92a1b94021fe4d7e1351b0622849c 100644 (file)
@@ -310,7 +310,8 @@ err:
  */
 static char *md5crypt(const char *passwd, const char *magic, const char *salt)
        {
-       static char out_buf[6 + 9 + 24 + 2]; /* "$apr1$..salt..$.......md5hash..........\0" */
+       /* "$apr1$..salt..$.......md5hash..........\0" */
+       static char out_buf[6 + 9 + 24 + 2];
        unsigned char buf[MD5_DIGEST_LENGTH];
        char *salt_out;
        int n;
index 625e1eb266976d4758fb16a0a4ccd441a5898d1d..6baae1aa3d890f41bded37c42ae035df5c40aa2b 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
-#if !defined(OPENSSL_SYS_NETWARE)  /* conflicts with winsock2 stuff on netware */
+/* conflicts with winsock2 stuff on netware */
+#if !defined(OPENSSL_SYS_NETWARE)
 #include <sys/types.h>
 #endif
 #include <openssl/opensslconf.h>
index 412091dd11c11b233497c342ab6840cfab783abf..4d55a9a25955b3d3de443e0a1903121ff59d73f4 100644 (file)
 
 #include <openssl/e_os2.h>
 
-#if !defined(OPENSSL_SYS_NETWARE)  /* conflicts with winsock2 stuff on netware */
+/* conflicts with winsock2 stuff on netware */
+#if !defined(OPENSSL_SYS_NETWARE)
 #include <sys/types.h>
 #endif
 
index 6d86587ee3276a9c92d3b5d6528eca6662f1590e..b948631cd7cb454ea5e9d46acfe94b1ac2d9c65a 100644 (file)
@@ -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;
index c65cff442fa7e52946bc977a3570727b072b1b98..7a24871ab0f3351cfa660b668b81eadeec013f5b 100644 (file)
@@ -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)
 
index e664fa6df204ca0adaea53a0febba7810eeec9b6..d1f37f6af7eb6ace5a2314c5626b8b490c754109 100644 (file)
@@ -351,6 +351,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];
@@ -358,11 +363,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
-                        */
                        }
                }
 
@@ -452,12 +452,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);
index 54f57601200aaad52fd666d4f2d56250066f8f89..6a1ffe2d4fc3113466443632a8a70aa994514d30 100644 (file)
@@ -60,7 +60,8 @@ void rsaz_1024_red2norm_avx2(void *norm,const void *red);
 # define ALIGN64
 # pragma align 64(one,two80)
 #else
-# define ALIGN64       /* not fatal, might hurt performance a little */
+/* not fatal, might hurt performance a little */
+# define ALIGN64
 #endif
 
 ALIGN64 static const BN_ULONG one[40] = {
index 7ee56fa38c2d8840941af2da941996aa391d852d..f00305dd26a3a81af78d750616bd9b9844c366ee 100644 (file)
@@ -286,7 +286,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)
 
index d1ada258a65c288c1ff100eeab246ab787845c83..10e889a57249fc4eb3b3f08e2e46ec82cf1fd6b4 100644 (file)
@@ -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[];
index a8da6a6927f1bfd9524b17fe9cb51980b18d8c3e..ac5f9c9c6506d62f900947b3f6432f10c0aa894b 100644 (file)
 #define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024
 
 #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
index 4788a1ea9d30679383c2adbcd3de11b990142ea9..ab05e0e10e15723266fd798d1804de460492a529 100644 (file)
@@ -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;
index 10be17ebe63015a54e972cc51b7aa12460e452b5..0d20adc75903719f8b546b9f099d161250647986 100644 (file)
@@ -1563,9 +1563,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
                                {
@@ -1582,9 +1583,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 */
index 78c21f00895f3504a5cb6f9bf75d671d78cd34ad..f97dab67decc99befd150522c14ee6ffa20d3ee9 100644 (file)
@@ -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
                                {
index 4ab42d814c59b248bc57900f548c1864ae6f7326..c65bb2d911ab41108d5b4e7ef2500a33c83b93cc 100644 (file)
@@ -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) */
 
index ba891675bebe3dea4c1413d709110e3bdff6499f..cba7e4a6f76f52048ba8cf717775f483d67f6ca3 100644 (file)
@@ -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;
index ec76393576800637b0035dd056cf821fd8f5a412..3e41f5d4198bf071f231ed2331f50c5cc2d6a168 100644 (file)
@@ -212,7 +212,8 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA1 *key,
        u64             seqnum;
 #endif
 
-       if (RAND_bytes((IVs=blocks[0].c),16*x4)<=0)     /* ask for IVs in bulk */
+       /* ask for IVs in bulk */
+       if (RAND_bytes((IVs=blocks[0].c),16*x4)<=0)
                return 0;
 
        ctx = (SHA1_MB_CTX *)(storage+32-((size_t)storage%32)); /* align */
@@ -229,7 +230,8 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA1 *key,
        /* populate descriptors with pointers and IVs */
        hash_d[0].ptr = inp;
        ciph_d[0].inp = inp;
-       ciph_d[0].out = out+5+16;       /* 5+16 is place for header and explicit IV */
+       /* 5+16 is place for header and explicit IV */
+       ciph_d[0].out = out+5+16;
        memcpy(ciph_d[0].out-16,IVs,16);
        memcpy(ciph_d[0].iv,IVs,16);    IVs += 16;
 
index 6c8c958194121dcb98ef30d48adda08f98a671e7..affd2f609a34552100674a1921761f9bd85ff753 100644 (file)
@@ -227,7 +227,8 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA256 *key,
        /* populate descriptors with pointers and IVs */
        hash_d[0].ptr = inp;
        ciph_d[0].inp = inp;
-       ciph_d[0].out = out+5+16;       /* 5+16 is place for header and explicit IV */
+       /* 5+16 is place for header and explicit IV */
+       ciph_d[0].out = out+5+16;
        memcpy(ciph_d[0].out-16,IVs,16);
        memcpy(ciph_d[0].iv,IVs,16);    IVs += 16;
 
index 7e856b54894a36561d2256251aade30269e36583..33351684e6dc848715d19bb07e964dcab225ec63 100644 (file)
@@ -2089,7 +2089,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,
index 143501e61196662e3a651523660625ef4fc6117b..2a3a2f4d690a3a9917a8099bfd75c6c155ca8202 100644 (file)
@@ -158,7 +158,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
@@ -571,7 +572,8 @@ static int ssleay_rand_bytes(unsigned char *buf, int num, int pseudo)
 
                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)
index 6ffa5f024e833fdd62f26993dcd8e3a9f3cab49b..877c28a841bcb0708edf3abc4b5ff138f5059f32 100644 (file)
@@ -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
index d615171697e339583f68cc5d725b6ba00df84a56..017bea9d52b9f790c35df03653744edcecc568de 100644 (file)
@@ -571,7 +571,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;
@@ -582,7 +583,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
@@ -590,7 +592,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;
         };
 
index 743f6d60ad99124f06147b2877df144302b4922a..4a997c85a966a700f5219abd488b608405da62d2 100644 (file)
@@ -764,10 +764,12 @@ they could cause potential side affects on either the card or the result */
         BN_bn2bin(dmq1, pkey);  /* Copy over dmq1 */
 
         pkey += qSize;     /* move pointer */
-       pkey += pSize - BN_num_bytes(p);  /* set up for zero padding of next field */
+       /* set up for zero padding of next field */
+       pkey += pSize - BN_num_bytes(p);
 
         BN_bn2bin(p, pkey);
-        pkey += BN_num_bytes(p);  /* increment pointer by number of bytes moved  */
+       /* increment pointer by number of bytes moved  */
+        pkey += BN_num_bytes(p);
 
         BN_bn2bin(q, pkey);
         pkey += qSize ;  /* move the pointer */
index 9999fcc77525287e99692a7718707734fcd6db2d..d1ee0c8fefb91f594260dd81c9d2daca5db29f53 100644 (file)
@@ -419,7 +419,8 @@ void ENGINE_load_chil(void)
 static DSO *hwcrhk_dso = NULL;
 static HWCryptoHook_ContextHandle hwcrhk_context = 0;
 #ifndef OPENSSL_NO_RSA
-static int hndidx_rsa = -1;    /* Index for KM handle.  Not really used yet. */
+/* Index for KM handle.  Not really used yet. */
+static int hndidx_rsa = -1;
 #endif
 
 /* These are the function pointers that are (un)set when the library has
index be7b52f10b72f91c4d599c6007b88e8aad380369..f7fb3b98e5c22110ea126065a97f137ed1e72097 100644 (file)
@@ -337,10 +337,12 @@ void ENGINE_load_sureware(void)
  * implicitly. */
 static DSO *surewarehk_dso = NULL;
 #ifndef OPENSSL_NO_RSA
-static int rsaHndidx = -1;     /* Index for KM handle.  Not really used yet. */
+/* Index for KM handle.  Not really used yet. */
+static int rsaHndidx = -1;
 #endif
 #ifndef OPENSSL_NO_DSA
-static int dsaHndidx = -1;     /* Index for KM handle.  Not really used yet. */
+/* Index for KM handle.  Not really used yet. */
+static int dsaHndidx = -1;
 #endif
 
 /* These are the function pointers that are (un)set when the library has
index 458f37e996ec53a43ba5640882d44a8828d3107b..bf20d527d02a7e276c05441ba6c17954dd5a6394 100644 (file)
@@ -782,9 +782,13 @@ static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
                goto err;
        }
 
-       if (p_UBSEC_dsa_sign_ioctl(fd, 0, /* compute hash before signing */
+       if (p_UBSEC_dsa_sign_ioctl(fd,
+               /* compute hash before signing */
+               0,
                (unsigned char *)dgst, d_len,
-               NULL, 0,  /* compute random value */
+               NULL,
+               /* compute random value */
+               0,
                (unsigned char *)dsa->p->d, BN_num_bits(dsa->p), 
                (unsigned char *)dsa->q->d, BN_num_bits(dsa->q),
                (unsigned char *)dsa->g->d, BN_num_bits(dsa->g),
index 44a83496d44fa19bea1af6064335e217fa2c6515..d39f547ed50a58d3553e4cf4aafe276b78435fba 100644 (file)
@@ -712,7 +712,8 @@ again:
                        {
                        if(dtls1_buffer_record(s, &(s->d1->unprocessed_rcds), rr->seq_num)<0)
                                return -1;
-                       dtls1_record_bitmap_update(s, bitmap);/* Mark receipt of record. */
+                       /* Mark receipt of record. */
+                       dtls1_record_bitmap_update(s, bitmap);
                        }
                rr->length = 0;
                s->packet_length = 0;
index 21172f31d5aedd7d05c5d45a3d47582a19e62d70..86dce9a1792b985e03b65e8e930a65784353528c 100644 (file)
@@ -1813,8 +1813,10 @@ kssl_ctx_show(KSSL_CTX *kssl_ctx)
 
     krb5rc = krb5_kt_get_entry(krb5context, krb5keytab, 
                                 princ,
-                                0 /* IGNORE_VNO */,
-                                0 /* IGNORE_ENCTYPE */,
+                                /* IGNORE_VNO */
+                                0,
+                                /* IGNORE_ENCTYPE */
+                                0,
                                 &entry);
     if ( krb5rc == KRB5_KT_NOTFOUND ) {
         rc = 1;
@@ -1898,7 +1900,8 @@ void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data)
        krb5_free_data_contents(NULL, data);
 #endif
        }
-#endif /* !OPENSSL_SYS_WINDOWS && !OPENSSL_SYS_WIN32 */
+#endif
+/* !OPENSSL_SYS_WINDOWS && !OPENSSL_SYS_WIN32 */
 
 
 /*  Given pointers to KerberosTime and struct tm structs, convert the
index d7dc2fabd3e9037c013e3d53ee2c89bf11159b79..f0a7f5a8c6840a9679cac73e6981c214a4392e61 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -582,7 +582,8 @@ struct ssl_session_st
  * the workaround is not needed.  Unfortunately some broken SSL/TLS
  * implementations cannot handle it at all, which is why we include
  * it in SSL_OP_ALL. */
-#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS              0x00000800L /* added in 0.9.6e */
+/* added in 0.9.6e */
+#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS              0x00000800L
 
 /* SSL_OP_ALL: various bug workarounds that should be rather harmless.
  *             This used to be 0x000FFFFFL before 0.9.7. */
@@ -1699,27 +1700,40 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
 
 /* These alert types are for SSLv3 and TLSv1 */
 #define SSL_AD_CLOSE_NOTIFY            SSL3_AD_CLOSE_NOTIFY
-#define SSL_AD_UNEXPECTED_MESSAGE      SSL3_AD_UNEXPECTED_MESSAGE /* fatal */
-#define SSL_AD_BAD_RECORD_MAC          SSL3_AD_BAD_RECORD_MAC     /* fatal */
+/* fatal */
+#define SSL_AD_UNEXPECTED_MESSAGE      SSL3_AD_UNEXPECTED_MESSAGE
+/* fatal */
+#define SSL_AD_BAD_RECORD_MAC          SSL3_AD_BAD_RECORD_MAC
 #define SSL_AD_DECRYPTION_FAILED       TLS1_AD_DECRYPTION_FAILED
 #define SSL_AD_RECORD_OVERFLOW         TLS1_AD_RECORD_OVERFLOW
-#define SSL_AD_DECOMPRESSION_FAILURE   SSL3_AD_DECOMPRESSION_FAILURE/* fatal */
-#define SSL_AD_HANDSHAKE_FAILURE       SSL3_AD_HANDSHAKE_FAILURE/* fatal */
-#define SSL_AD_NO_CERTIFICATE          SSL3_AD_NO_CERTIFICATE /* Not for TLS */
+/* fatal */
+#define SSL_AD_DECOMPRESSION_FAILURE   SSL3_AD_DECOMPRESSION_FAILURE
+/* fatal */
+#define SSL_AD_HANDSHAKE_FAILURE       SSL3_AD_HANDSHAKE_FAILURE
+/* Not for TLS */
+#define SSL_AD_NO_CERTIFICATE          SSL3_AD_NO_CERTIFICATE
 #define SSL_AD_BAD_CERTIFICATE         SSL3_AD_BAD_CERTIFICATE
 #define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
 #define SSL_AD_CERTIFICATE_REVOKED     SSL3_AD_CERTIFICATE_REVOKED
 #define SSL_AD_CERTIFICATE_EXPIRED     SSL3_AD_CERTIFICATE_EXPIRED
 #define SSL_AD_CERTIFICATE_UNKNOWN     SSL3_AD_CERTIFICATE_UNKNOWN
-#define SSL_AD_ILLEGAL_PARAMETER       SSL3_AD_ILLEGAL_PARAMETER   /* fatal */
-#define SSL_AD_UNKNOWN_CA              TLS1_AD_UNKNOWN_CA      /* fatal */
-#define SSL_AD_ACCESS_DENIED           TLS1_AD_ACCESS_DENIED   /* fatal */
-#define SSL_AD_DECODE_ERROR            TLS1_AD_DECODE_ERROR    /* fatal */
+/* fatal */
+#define SSL_AD_ILLEGAL_PARAMETER       SSL3_AD_ILLEGAL_PARAMETER
+/* fatal */
+#define SSL_AD_UNKNOWN_CA              TLS1_AD_UNKNOWN_CA
+/* fatal */
+#define SSL_AD_ACCESS_DENIED           TLS1_AD_ACCESS_DENIED
+/* fatal */
+#define SSL_AD_DECODE_ERROR            TLS1_AD_DECODE_ERROR
 #define SSL_AD_DECRYPT_ERROR           TLS1_AD_DECRYPT_ERROR
-#define SSL_AD_EXPORT_RESTRICTION      TLS1_AD_EXPORT_RESTRICTION/* fatal */
-#define SSL_AD_PROTOCOL_VERSION                TLS1_AD_PROTOCOL_VERSION /* fatal */
-#define SSL_AD_INSUFFICIENT_SECURITY   TLS1_AD_INSUFFICIENT_SECURITY/* fatal */
-#define SSL_AD_INTERNAL_ERROR          TLS1_AD_INTERNAL_ERROR  /* fatal */
+/* fatal */
+#define SSL_AD_EXPORT_RESTRICTION      TLS1_AD_EXPORT_RESTRICTION
+/* fatal */
+#define SSL_AD_PROTOCOL_VERSION                TLS1_AD_PROTOCOL_VERSION
+/* fatal */
+#define SSL_AD_INSUFFICIENT_SECURITY   TLS1_AD_INSUFFICIENT_SECURITY
+/* fatal */
+#define SSL_AD_INTERNAL_ERROR          TLS1_AD_INTERNAL_ERROR
 #define SSL_AD_USER_CANCELLED          TLS1_AD_USER_CANCELLED
 #define SSL_AD_NO_RENEGOTIATION                TLS1_AD_NO_RENEGOTIATION
 #define SSL_AD_UNSUPPORTED_EXTENSION   TLS1_AD_UNSUPPORTED_EXTENSION
@@ -1727,8 +1741,10 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
 #define SSL_AD_UNRECOGNIZED_NAME       TLS1_AD_UNRECOGNIZED_NAME
 #define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE
 #define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE
-#define SSL_AD_UNKNOWN_PSK_IDENTITY     TLS1_AD_UNKNOWN_PSK_IDENTITY /* fatal */
-#define SSL_AD_INAPPROPRIATE_FALLBACK  TLS1_AD_INAPPROPRIATE_FALLBACK /* fatal */
+/* fatal */
+#define SSL_AD_UNKNOWN_PSK_IDENTITY     TLS1_AD_UNKNOWN_PSK_IDENTITY
+/* fatal */
+#define SSL_AD_INAPPROPRIATE_FALLBACK  TLS1_AD_INAPPROPRIATE_FALLBACK
 
 #define SSL_ERROR_NONE                 0
 #define SSL_ERROR_SSL                  1
@@ -2119,7 +2135,8 @@ int       SSL_use_certificate_file(SSL *ssl, const char *file, int type);
 int    SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
 int    SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
 int    SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
-int    SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */
+/* PEM type */
+int    SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file);
 STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
 int    SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
                                            const char *file);
index 6f49421bd280fd43365d1940af2061bbbfbf4143..23fa47d280372baf8b8351d209c3fe1be08f2519 100644 (file)
  */
 
 /* Bits for algorithm_mkey (key exchange algorithm) */
-#define SSL_kRSA               0x00000001L /* RSA key exchange */
-#define SSL_kDHr               0x00000002L /* DH cert, RSA CA cert */
-#define SSL_kDHd               0x00000004L /* DH cert, DSA CA cert */
-#define SSL_kDHE               0x00000008L /* tmp DH key no DH cert */
-#define SSL_kEDH               SSL_kDHE    /* synonym */
-#define SSL_kKRB5              0x00000010L /* Kerberos5 key exchange */
-#define SSL_kECDHr             0x00000020L /* ECDH cert, RSA CA cert */
-#define SSL_kECDHe             0x00000040L /* ECDH cert, ECDSA CA cert */
-#define SSL_kECDHE             0x00000080L /* ephemeral ECDH */
-#define SSL_kEECDH             SSL_kECDHE  /* synonym */
-#define SSL_kPSK               0x00000100L /* PSK */
-#define SSL_kGOST       0x00000200L /* GOST key exchange */
-#define SSL_kSRP        0x00000400L /* SRP */
+/* RSA key exchange */
+#define SSL_kRSA               0x00000001L
+/* DH cert, RSA CA cert */
+#define SSL_kDHr               0x00000002L
+/* DH cert, DSA CA cert */
+#define SSL_kDHd               0x00000004L
+/* tmp DH key no DH cert */
+#define SSL_kDHE               0x00000008L
+/* synonym */
+#define SSL_kEDH               SSL_kDHE
+/* Kerberos5 key exchange */
+#define SSL_kKRB5              0x00000010L
+/* ECDH cert, RSA CA cert */
+#define SSL_kECDHr             0x00000020L
+/* ECDH cert, ECDSA CA cert */
+#define SSL_kECDHe             0x00000040L
+/* ephemeral ECDH */
+#define SSL_kECDHE             0x00000080L
+/* synonym */
+#define SSL_kEECDH             SSL_kECDHE
+/* PSK */
+#define SSL_kPSK               0x00000100L
+/* GOST key exchange */
+#define SSL_kGOST       0x00000200L
+/* SRP */
+#define SSL_kSRP        0x00000400L
 
 /* Bits for algorithm_auth (server authentication) */
-#define SSL_aRSA               0x00000001L /* RSA auth */
-#define SSL_aDSS               0x00000002L /* DSS auth */
-#define SSL_aNULL              0x00000004L /* no auth (i.e. use ADH or AECDH) */
-#define SSL_aDH                0x00000008L /* Fixed DH auth (kDHd or kDHr) */
-#define SSL_aECDH              0x00000010L /* Fixed ECDH auth (kECDHe or kECDHr) */
-#define SSL_aKRB5               0x00000020L /* KRB5 auth */
-#define SSL_aECDSA              0x00000040L /* ECDSA auth*/
-#define SSL_aPSK                0x00000080L /* PSK auth */
-#define SSL_aGOST94                            0x00000100L /* GOST R 34.10-94 signature auth */
-#define SSL_aGOST01                    0x00000200L /* GOST R 34.10-2001 signature auth */
-#define SSL_aSRP               0x00000400L /* SRP auth */
+/* RSA auth */
+#define SSL_aRSA               0x00000001L
+/* DSS auth */
+#define SSL_aDSS               0x00000002L
+/* no auth (i.e. use ADH or AECDH) */
+#define SSL_aNULL              0x00000004L
+/* Fixed DH auth (kDHd or kDHr) */
+#define SSL_aDH                0x00000008L
+/* Fixed ECDH auth (kECDHe or kECDHr) */
+#define SSL_aECDH              0x00000010L
+/* KRB5 auth */
+#define SSL_aKRB5               0x00000020L
+/* ECDSA auth*/
+#define SSL_aECDSA              0x00000040L
+/* PSK auth */
+#define SSL_aPSK                0x00000080L
+/* GOST R 34.10-94 signature auth */
+#define SSL_aGOST94                            0x00000100L
+/* GOST R 34.10-2001 signature auth */
+#define SSL_aGOST01                    0x00000200L
+/* SRP auth */
+#define SSL_aSRP               0x00000400L
 
 
 /* Bits for algorithm_enc (symmetric encryption) */
index 592e8580dcd1053784627380ce68fe97d913f8bf..d06055d96378220a25315703079dffb6035bef42 100644 (file)
@@ -144,11 +144,16 @@ static int s_nbio=0;
 #endif
 #define TEST_SERVER_CERT "SSL_SERVER_CERTIFICATE"
 /*************************************************************************/
-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)
 
index 746bfba539cc02b16bc99f06e00cc2fc3245a64c..c9a92903cb220ebdfe8f9da6a664b5fba5afe036 100644 (file)
@@ -1616,8 +1616,10 @@ bad:
 #ifdef TLSEXT_TYPE_opaque_prf_input
        SSL_CTX_set_tlsext_opaque_prf_input_callback(c_ctx, opaque_prf_input_cb);
        SSL_CTX_set_tlsext_opaque_prf_input_callback(s_ctx, opaque_prf_input_cb);
-       SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(c_ctx, &co1); /* or &co2 or NULL */
-       SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(s_ctx, &so1); /* or &so2 or NULL */
+       /* or &co2 or NULL */
+       SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(c_ctx, &co1);
+       /* or &so2 or NULL */
+       SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(s_ctx, &so1);
 #endif
 
        if (!SSL_CTX_use_certificate_file(s_ctx,server_cert,SSL_FILETYPE_PEM))
index ac6c85ea32d8a639827a07261734f86eefca8fca..255fb5ab79b9d0667dde87de6437d03e24ef66b7 100644 (file)
@@ -1279,7 +1279,8 @@ int tls1_alert_code(int code)
        case SSL_AD_BAD_CERTIFICATE_HASH_VALUE: return(TLS1_AD_BAD_CERTIFICATE_HASH_VALUE);
        case SSL_AD_UNKNOWN_PSK_IDENTITY:return(TLS1_AD_UNKNOWN_PSK_IDENTITY);
        case SSL_AD_INAPPROPRIATE_FALLBACK:return(TLS1_AD_INAPPROPRIATE_FALLBACK);
-#if 0 /* not appropriate for TLS, not used for DTLS */
+#if 0
+       /* not appropriate for TLS, not used for DTLS */
        case DTLS1_AD_MISSING_HANDSHAKE_MESSAGE: return 
                                          (DTLS1_AD_MISSING_HANDSHAKE_MESSAGE);
 #endif