summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-01-05 11:30:03 +0000
committerMatt Caswell <matt@openssl.org>2015-01-22 09:39:01 +0000
commitcda8845ded7c0739c9142283ed4c449130b1b546 (patch)
tree0df96afebb471333d619466a9559a2bae9bc7eae
parent47050853f13b07f91b5b4a058dcb188621296f21 (diff)
Re-align some comments after running the reformat script.OpenSSL_1_0_1-post-reformat
This should be a one off operation (subsequent invokation of the script should not move them) This commit is for the 1.0.1 changes Reviewed-by: Tim Hudson <tjh@openssl.org>
-rw-r--r--apps/ca.c8
-rw-r--r--apps/gendh.c4
-rw-r--r--apps/openssl.c42
-rw-r--r--apps/req.c8
-rw-r--r--apps/s_cb.c36
-rw-r--r--apps/s_client.c4
-rw-r--r--apps/s_socket.c14
-rw-r--r--apps/ts.c26
-rw-r--r--crypto/asn1/a_sign.c14
-rw-r--r--crypto/bio/b_sock.c14
-rw-r--r--crypto/bio/bf_null.c10
-rw-r--r--crypto/bio/bio.h18
-rw-r--r--crypto/bio/bss_acpt.c12
-rw-r--r--crypto/bn/bn_add.c24
-rw-r--r--crypto/bn/bn_exp.c60
-rw-r--r--crypto/bn/bn_gcd.c212
-rw-r--r--crypto/bn/bn_kron.c14
-rw-r--r--crypto/bn/bn_mul.c90
-rw-r--r--crypto/bn/bn_print.c12
-rw-r--r--crypto/bn/bn_sqr.c22
-rw-r--r--crypto/bn/bn_sqrt.c122
-rw-r--r--crypto/cast/casttest.c6
-rw-r--r--crypto/conf/conf_def.c20
-rw-r--r--crypto/des/des.c16
-rw-r--r--crypto/des/destest.c14
-rw-r--r--crypto/des/enc_read.c12
-rw-r--r--crypto/des/ofb64ede.c4
-rw-r--r--crypto/dsa/dsa_ameth.c10
-rw-r--r--crypto/dso/dso_vms.c34
-rw-r--r--crypto/ec/ec.h16
-rw-r--r--crypto/ec/ec2_smpl.c12
-rw-r--r--crypto/ec/ec_lcl.h16
-rw-r--r--crypto/ec/ec_mult.c14
-rw-r--r--crypto/ec/ecp_nistp224.c26
-rw-r--r--crypto/ec/ecp_nistp256.c77
-rw-r--r--crypto/ec/ecp_nistp521.c111
-rw-r--r--crypto/ec/ecp_oct.c10
-rw-r--r--crypto/ec/ecp_smpl.c60
-rw-r--r--crypto/idea/ideatest.c6
-rw-r--r--crypto/lhash/lhash.c6
-rw-r--r--crypto/o_time.c48
-rw-r--r--crypto/pem/pem.h16
-rw-r--r--crypto/rand/randfile.c8
-rw-r--r--crypto/rc2/rc2test.c6
-rw-r--r--crypto/rc4/rc4_enc.c116
-rw-r--r--crypto/rsa/rsa_pss.c24
-rw-r--r--crypto/threads/mttest.c44
-rw-r--r--crypto/whrlpool/wp_dgst.c24
-rw-r--r--crypto/x509/by_dir.c4
-rw-r--r--crypto/x509/x509_lu.c4
-rw-r--r--crypto/x509/x509_r2x.c4
-rw-r--r--crypto/x509/x509_vfy.c18
-rw-r--r--crypto/x509/x509name.c20
-rw-r--r--demos/engines/zencod/hw_zencod.h16
-rw-r--r--engines/ccgost/gost_ctl.c26
-rw-r--r--engines/e_cswift.c10
-rw-r--r--engines/vendor_defns/hwcryptohook.h188
-rw-r--r--ssl/d1_both.c40
-rw-r--r--ssl/d1_clnt.c64
-rw-r--r--ssl/d1_pkt.c50
-rw-r--r--ssl/kssl.c26
-rw-r--r--ssl/s23_srvr.c26
-rw-r--r--ssl/s2_pkt.c30
-rw-r--r--ssl/s3_cbc.c38
-rw-r--r--ssl/s3_clnt.c152
-rw-r--r--ssl/s3_enc.c15
-rw-r--r--ssl/s3_pkt.c50
-rw-r--r--ssl/s3_srvr.c106
-rw-r--r--ssl/ssl_ciph.c18
-rw-r--r--ssl/ssl_lib.c10
-rw-r--r--ssl/ssl_sess.c30
-rw-r--r--ssl/ssl_task.c4
-rw-r--r--ssl/ssltest.c84
-rw-r--r--ssl/t1_lib.c102
-rw-r--r--test/methtest.c12
75 files changed, 1337 insertions, 1332 deletions
diff --git a/apps/ca.c b/apps/ca.c
index ec8ca63a58..174ad9abb5 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -610,10 +610,10 @@ int MAIN(int argc, char **argv)
oid_bio = BIO_new_file(p, "r");
if (oid_bio == NULL) {
- /*-
- BIO_printf(bio_err,"problems opening %s for extra oid's\n",p);
- ERR_print_errors(bio_err);
- */
+ /*-
+ BIO_printf(bio_err,"problems opening %s for extra oid's\n",p);
+ ERR_print_errors(bio_err);
+ */
ERR_clear_error();
} else {
OBJ_create_objects(oid_bio);
diff --git a/apps/gendh.c b/apps/gendh.c
index 2d919495f4..adaa101783 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -122,8 +122,8 @@ int MAIN(int argc, char **argv)
outfile = *(++argv);
} else if (strcmp(*argv, "-2") == 0)
g = 2;
- /*- else if (strcmp(*argv,"-3") == 0)
- g=3; */
+/*- else if (strcmp(*argv,"-3") == 0)
+ g=3; */
else if (strcmp(*argv, "-5") == 0)
g = 5;
# ifndef OPENSSL_NO_ENGINE
diff --git a/apps/openssl.c b/apps/openssl.c
index e6109a0dd1..112ed7e602 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -231,27 +231,27 @@ int main(int Argc, char *ARGV[])
long errline;
#if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
- /*-
- * 2011-03-22 SMS.
- * If we have 32-bit pointers everywhere, then we're safe, and
- * we bypass this mess, as on non-VMS systems. (See ARGV,
- * above.)
- * Problem 1: Compaq/HP C before V7.3 always used 32-bit
- * pointers for argv[].
- * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
- * everywhere else, we always allocate and use a 64-bit
- * duplicate of argv[].
- * Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
- * to NULL-terminate a 64-bit argv[]. (As this was written, the
- * compiler ECO was available only on IA64.)
- * Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
- * 64-bit argv[argc] for NULL, and, if necessary, use a
- * (properly) NULL-terminated (64-bit) duplicate of argv[].
- * The same code is used in either case to duplicate argv[].
- * Some of these decisions could be handled in preprocessing,
- * but the code tends to get even uglier, and the penalty for
- * deciding at compile- or run-time is tiny.
- */
+ /*-
+ * 2011-03-22 SMS.
+ * If we have 32-bit pointers everywhere, then we're safe, and
+ * we bypass this mess, as on non-VMS systems. (See ARGV,
+ * above.)
+ * Problem 1: Compaq/HP C before V7.3 always used 32-bit
+ * pointers for argv[].
+ * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
+ * everywhere else, we always allocate and use a 64-bit
+ * duplicate of argv[].
+ * Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
+ * to NULL-terminate a 64-bit argv[]. (As this was written, the
+ * compiler ECO was available only on IA64.)
+ * Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
+ * 64-bit argv[argc] for NULL, and, if necessary, use a
+ * (properly) NULL-terminated (64-bit) duplicate of argv[].
+ * The same code is used in either case to duplicate argv[].
+ * Some of these decisions could be handled in preprocessing,
+ * but the code tends to get even uglier, and the penalty for
+ * deciding at compile- or run-time is tiny.
+ */
char **Argv = NULL;
int free_Argv = 0;
diff --git a/apps/req.c b/apps/req.c
index c72efd5ae8..57781c93c4 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -502,10 +502,10 @@ int MAIN(int argc, char **argv)
oid_bio = BIO_new_file(p, "r");
if (oid_bio == NULL) {
- /*-
- BIO_printf(bio_err,"problems opening %s for extra oid's\n",p);
- ERR_print_errors(bio_err);
- */
+ /*-
+ BIO_printf(bio_err,"problems opening %s for extra oid's\n",p);
+ ERR_print_errors(bio_err);
+ */
} else {
OBJ_create_objects(oid_bio);
BIO_free(oid_bio);
diff --git a/apps/s_cb.c b/apps/s_cb.c
index c47cf7b09e..7918500a6c 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -191,10 +191,10 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file)
{
if (cert_file != NULL) {
- /*-
- SSL *ssl;
- X509 *x509;
- */
+ /*-
+ SSL *ssl;
+ X509 *x509;
+ */
if (SSL_CTX_use_certificate_file(ctx, cert_file,
SSL_FILETYPE_PEM) <= 0) {
@@ -212,20 +212,20 @@ int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file)
return (0);
}
- /*-
- In theory this is no longer needed
- ssl=SSL_new(ctx);
- x509=SSL_get_certificate(ssl);
-
- if (x509 != NULL) {
- EVP_PKEY *pktmp;
- pktmp = X509_get_pubkey(x509);
- EVP_PKEY_copy_parameters(pktmp,
- SSL_get_privatekey(ssl));
- EVP_PKEY_free(pktmp);
- }
- SSL_free(ssl);
- */
+ /*-
+ In theory this is no longer needed
+ ssl=SSL_new(ctx);
+ x509=SSL_get_certificate(ssl);
+
+ if (x509 != NULL) {
+ EVP_PKEY *pktmp;
+ pktmp = X509_get_pubkey(x509);
+ EVP_PKEY_copy_parameters(pktmp,
+ SSL_get_privatekey(ssl));
+ EVP_PKEY_free(pktmp);
+ }
+ SSL_free(ssl);
+ */
/*
* If we are using DSA, we can copy the parameters from the private
diff --git a/apps/s_client.c b/apps/s_client.c
index cc968defb0..0bbc065248 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -1559,8 +1559,8 @@ int MAIN(int argc, char **argv)
openssl_fdset(SSL_get_fd(con), &writefds);
}
#endif
-/*- printf("mode tty(%d %d%d) ssl(%d%d)\n",
- tty_on,read_tty,write_tty,read_ssl,write_ssl);*/
+/*- printf("mode tty(%d %d%d) ssl(%d%d)\n",
+ tty_on,read_tty,write_tty,read_ssl,write_ssl);*/
/*
* Note: under VMS with SOCKETSHR the second parameter is
diff --git a/apps/s_socket.c b/apps/s_socket.c
index 802896a6aa..9e5565d16a 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -426,13 +426,13 @@ static int do_accept(int acc_sock, int *sock, char **host)
}
/*-
- ling.l_onoff=1;
- ling.l_linger=0;
- i=setsockopt(ret,SOL_SOCKET,SO_LINGER,(char *)&ling,sizeof(ling));
- if (i < 0) { perror("linger"); return(0); }
- i=0;
- i=setsockopt(ret,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
- if (i < 0) { perror("keepalive"); return(0); }
+ ling.l_onoff=1;
+ ling.l_linger=0;
+ i=setsockopt(ret,SOL_SOCKET,SO_LINGER,(char *)&ling,sizeof(ling));
+ if (i < 0) { perror("linger"); return(0); }
+ i=0;
+ i=setsockopt(ret,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
+ if (i < 0) { perror("keepalive"); return(0); }
*/
if (host == NULL)
diff --git a/apps/ts.c b/apps/ts.c
index 6a24dcbf9e..341a42bb12 100644
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -1101,19 +1101,19 @@ static X509_STORE *create_cert_store(char *ca_path, char *ca_file)
static int MS_CALLBACK verify_cb(int ok, X509_STORE_CTX *ctx)
{
- /*-
- char buf[256];
-
- if (!ok)
- {
- X509_NAME_oneline(X509_get_subject_name(ctx->current_cert),
- buf, sizeof(buf));
- printf("%s\n", buf);
- printf("error %d at %d depth lookup: %s\n",
- ctx->error, ctx->error_depth,
- X509_verify_cert_error_string(ctx->error));
- }
- */
+ /*-
+ char buf[256];
+
+ if (!ok)
+ {
+ X509_NAME_oneline(X509_get_subject_name(ctx->current_cert),
+ buf, sizeof(buf));
+ printf("%s\n", buf);
+ printf("error %d at %d depth lookup: %s\n",
+ ctx->error, ctx->error_depth,
+ X509_verify_cert_error_string(ctx->error));
+ }
+ */
return ok;
}
diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c
index 2a8c3a336c..51c6a0c34d 100644
--- a/crypto/asn1/a_sign.c
+++ b/crypto/asn1/a_sign.c
@@ -252,13 +252,13 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
rv = pkey->ameth->item_sign(ctx, it, asn, algor1, algor2, signature);
if (rv == 1)
outl = signature->length;
- /*-
- * Return value meanings:
- * <=0: error.
- * 1: method does everything.
- * 2: carry on as normal.
- * 3: ASN1 method sets algorithm identifiers: just sign.
- */
+ /*-
+ * Return value meanings:
+ * <=0: error.
+ * 1: method does everything.
+ * 2: carry on as normal.
+ * 3: ASN1 method sets algorithm identifiers: just sign.
+ */
if (rv <= 0)
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ERR_R_EVP_LIB);
if (rv <= 1)
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 7469f07f25..bda882c40b 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -530,13 +530,13 @@ 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.
- * 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
- * that, instead.
- */
+ /*-
+ * 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
+ * that, instead.
+ */
# if __INITIAL_POINTER_SIZE == 64
# define ARG arg_32p
# pragma pointer_size save
diff --git a/crypto/bio/bf_null.c b/crypto/bio/bf_null.c
index d9d0dc6bf4..e0c79e8291 100644
--- a/crypto/bio/bf_null.c
+++ b/crypto/bio/bf_null.c
@@ -103,11 +103,11 @@ static int nullf_free(BIO *a)
{
if (a == NULL)
return (0);
- /*-
- a->ptr=NULL;
- a->init=0;
- a->flags=0;
- */
+ /*-
+ a->ptr=NULL;
+ a->init=0;
+ a->flags=0;
+ */
return (1);
}
diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h
index 2298f301a6..81f13c725c 100644
--- a/crypto/bio/bio.h
+++ b/crypto/bio/bio.h
@@ -343,15 +343,15 @@ struct bio_st {
DECLARE_STACK_OF(BIO)
typedef struct bio_f_buffer_ctx_struct {
- /*-
- * Buffers are setup like this:
- *
- * <---------------------- size ----------------------->
- * +---------------------------------------------------+
- * | consumed | remaining | free space |
- * +---------------------------------------------------+
- * <-- off --><------- len ------->
- */
+ /*-
+ * Buffers are setup like this:
+ *
+ * <---------------------- size ----------------------->
+ * +---------------------------------------------------+
+ * | consumed | remaining | free space |
+ * +---------------------------------------------------+
+ * <-- off --><------- len ------->
+ */
/*- BIO *bio; *//*
* this is now in the BIO struct
*/
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index 1a1e4d99ac..d08292c3e9 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -421,12 +421,12 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr)
ret = (long)data->bind_mode;
break;
case BIO_CTRL_DUP:
-/*- dbio=(BIO *)ptr;
- if (data->param_port) EAY EAY
- BIO_set_port(dbio,data->param_port);
- if (data->param_hostname)
- BIO_set_hostname(dbio,data->param_hostname);
- BIO_set_nbio(dbio,data->nbio); */
+/*- dbio=(BIO *)ptr;
+ if (data->param_port) EAY EAY
+ BIO_set_port(dbio,data->param_port);
+ if (data->param_hostname)
+ BIO_set_hostname(dbio,data->param_hostname);
+ BIO_set_nbio(dbio,data->nbio); */
break;
default:
diff --git a/crypto/bn/bn_add.c b/crypto/bn/bn_add.c
index c48665a038..2f3d110449 100644
--- a/crypto/bn/bn_add.c
+++ b/crypto/bn/bn_add.c
@@ -69,12 +69,12 @@ int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
bn_check_top(a);
bn_check_top(b);
- /*-
- * a + b a+b
- * a + -b a-b
- * -a + b b-a
- * -a + -b -(a+b)
- */
+ /*-
+ * a + b a+b
+ * a + -b a-b
+ * -a + b b-a
+ * -a + -b -(a+b)
+ */
if (a_neg ^ b->neg) {
/* only one is negative */
if (a_neg) {
@@ -265,12 +265,12 @@ int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
bn_check_top(a);
bn_check_top(b);
- /*-
- * a - b a-b
- * a - -b a+b
- * -a - b -(a+b)
- * -a - -b b-a
- */
+ /*-
+ * a - b a-b
+ * a - -b a+b
+ * -a - b -(a+b)
+ * -a - -b b-a
+ */
if (a->neg) {
if (b->neg) {
tmp = a;
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index 1ded193738..fca401450a 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -186,36 +186,36 @@ int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
bn_check_top(p);
bn_check_top(m);
- /*-
- * For even modulus m = 2^k*m_odd, it might make sense to compute
- * a^p mod m_odd and a^p mod 2^k separately (with Montgomery
- * exponentiation for the odd part), using appropriate exponent
- * reductions, and combine the results using the CRT.
- *
- * For now, we use Montgomery only if the modulus is odd; otherwise,
- * exponentiation using the reciprocal-based quick remaindering
- * algorithm is used.
- *
- * (Timing obtained with expspeed.c [computations a^p mod m
- * where a, p, m are of the same length: 256, 512, 1024, 2048,
- * 4096, 8192 bits], compared to the running time of the
- * standard algorithm:
- *
- * BN_mod_exp_mont 33 .. 40 % [AMD K6-2, Linux, debug configuration]
- * 55 .. 77 % [UltraSparc processor, but
- * debug-solaris-sparcv8-gcc conf.]
- *
- * BN_mod_exp_recp 50 .. 70 % [AMD K6-2, Linux, debug configuration]
- * 62 .. 118 % [UltraSparc, debug-solaris-sparcv8-gcc]
- *
- * On the Sparc, BN_mod_exp_recp was faster than BN_mod_exp_mont
- * at 2048 and more bits, but at 512 and 1024 bits, it was
- * slower even than the standard algorithm!
- *
- * "Real" timings [linux-elf, solaris-sparcv9-gcc configurations]
- * should be obtained when the new Montgomery reduction code
- * has been integrated into OpenSSL.)
- */
+ /*-
+ * For even modulus m = 2^k*m_odd, it might make sense to compute
+ * a^p mod m_odd and a^p mod 2^k separately (with Montgomery
+ * exponentiation for the odd part), using appropriate exponent
+ * reductions, and combine the results using the CRT.
+ *
+ * For now, we use Montgomery only if the modulus is odd;