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:45:45 +0000 (09:45 +0000)
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

Conflicts:
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/modes/gcm128.c
ssl/ssl_locl.h

Reviewed-by: Tim Hudson <tjh@openssl.org>
25 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/crypto.h
crypto/des/des_ver.h
crypto/dsa/dsa.h
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 8d7d2f9a9eb0956022ad22a3c44c6dcc4971f728..0543f18b1a09771c03244620341ac1c8a0b252ed 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 f82c20360c455915e5d844c2612dec62f0be394a..f0770b09dbfd32d005d1f457606f91dabe3a168d 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1474,7 +1474,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 820e5c58155b440c4cf1bd8972ae27027785a905..919023ddf57be4bcea4b02573793b8c1e88d5b55 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 876d76a72d08cf064ee223aec17711cfa11c1937..400760e1cdaf56644d850577e53a3e2bb5813d5f 100644 (file)
 #define APPS_WIN16
 #endif
 
-#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 66a2388382569a862e93c136af8bb9c3981b2e54..796921d9a2682f5c5fe9cc906dfdf237d458c043 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 dd6038f3bd2599eb073605b5fb629ef628c2fcb5..c8145f7d7904cc9edf30d54f6bd3819b954216d5 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 5be55b996b2a45332b1ed8117e95a90cd0f153c1..388b21f58fbd946a29a695371a6551943f935515 100644 (file)
@@ -369,6 +369,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];
@@ -376,11 +381,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
-                        */
                        }
                }
 
@@ -527,12 +527,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 254b972047e5ad4c4461333049083ffb824a4666..63191dd721f33503cb0bac2e7f916dd45cf31395 100644 (file)
@@ -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)
 
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 e79fcf32fd168c7f3cc6b4c6e8ffc8720c9daeeb..c6e5e39b032ee7f5fa524ceb626c5976a9cc7c85 100644 (file)
 #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
 
 #ifdef  __cplusplus
 extern "C" {
index b2f04ff13ec9a4a4c5ca17ff17b7fe016efd16f6..4489c82d8d39e5bce90ba1bf406d1e1d8943ac24 100644 (file)
@@ -145,7 +145,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
@@ -498,7 +499,8 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
 
                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 f8b97dfba8896742266ff835acc00af6c3d7ce9f..30a15ebdeca3494daac600d6833e3c187d36a521 100644 (file)
@@ -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;
         };
 
index fa690a2286942251d3480eb7f3a678f4daa919cf..8838b0015e13789ec205b6a8e50a08f5da913e84 100644 (file)
@@ -916,5 +916,5 @@ IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
 #endif /* ENGINE_DYNAMIC_SUPPORT */\r
 \r
 \r
-#endif /* !OPENSSL_NO_HW_IBMCA */\r
+#endif /* !OPENSSL_NO_HW_IBMCA */
 #endif /* !OPENSSL_NO_HW */
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 d4dac55d0eade9896b423f77ece33eb4f5c4a4d5..f9167c45ddb05661c2d871ec0ebd8b71bd3b6d98 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 96a3419355f85b48ffecd9ab07030f591f57eb02..bcbce03e9fdc5ba34a1e13970261d5a2fe0e0815 100644 (file)
@@ -695,7 +695,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 a8ab203627f6af5c2eedc503b9a90e51e832dddb..14a7140aed6b6f2f0b7224886748f694a28f78df 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 48f4a33d57fca3771be001a04395a9274d2fdddf..35ef9e66bad0d2365343f79d6cb388f49dc1b023 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -537,7 +537,8 @@ typedef 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. */
@@ -1344,27 +1345,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
@@ -1372,8 +1386,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
@@ -1576,7 +1592,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 7ff5d32c9a39eefd244c5fc07d78ebfccab49dcb..87aa785e1cfebc47b450e6f94921519f6b4593e4 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 */ /* no such ciphersuites supported! */
-#define SSL_kDHd               0x00000004L /* DH cert, DSA CA cert */ /* no such ciphersuite supported! */
-#define SSL_kEDH               0x00000008L /* tmp DH key no DH cert */
-#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_kEECDH             0x00000080L /* ephemeral ECDH */
-#define SSL_kPSK               0x00000100L /* PSK */
-#define SSL_kGOST       0x00000200L /* GOST key exchange */
+/* RSA key exchange */
+#define SSL_kRSA               0x00000001L
+/* DH cert, RSA CA cert */
+/* no such ciphersuites supported! */
+#define SSL_kDHr               0x00000002L
+/* DH cert, DSA CA cert */
+/* no such ciphersuite supported! */
+#define SSL_kDHd               0x00000004L
+/* tmp DH key no DH cert */
+#define SSL_kEDH               0x00000008L
+/* 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_kEECDH             0x00000080L
+/* PSK */
+#define SSL_kPSK               0x00000100L
+/* GOST key exchange */
+#define SSL_kGOST       0x00000200L
 
 /* 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) */ /* no such ciphersuites supported! */
-#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 */
+/* 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) */
+/* no such ciphersuites supported! */
+#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
 
 
 /* Bits for algorithm_enc (symmetric encryption) */
index 86a9a6013dc8be8a7d2f26ebc659ca60fd376d5b..4381647f2e99664482e98010327db277db60b48b 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 80f5a287998569b1d1d1b24a831b14085ab2cb99..a3cd27d226728b23086b44fe0bf99583c8009756 100644 (file)
@@ -869,8 +869,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 6d8bc44b66c822d491ba0443bf1d519a034a5fde..df287fdf04abc4c3c53c36b93a6185078af5d9fd 100644 (file)
@@ -1039,7 +1039,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