summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoug <>2015-06-13 08:38:10 +0000
committerdoug <>2015-06-13 08:38:10 +0000
commita3f6270cf947329be3b9091ddfdbab704042addd (patch)
treed662b590881eb66fb307e6d2ac19b7a15cc092ba
parentda86a9658c227bfdb16fc46762295a922d8ffaff (diff)
downloadopenbsd-a3f6270cf947329be3b9091ddfdbab704042addd.tar.gz
openbsd-a3f6270cf947329be3b9091ddfdbab704042addd.tar.bz2
openbsd-a3f6270cf947329be3b9091ddfdbab704042addd.zip
Fix bad indenting in LibreSSL.
jsg@ noticed that some of the lines in libssl and libcrypto are not indented properly. At a quick glance, it looks like it has a different control flow than it really does. I checked the history in our tree and in OpenSSL to make sure these were simple mistakes. ok miod@ jsing@
-rw-r--r--src/lib/libcrypto/rsa/rsa_eay.c4
-rw-r--r--src/lib/libcrypto/x509/x509type.c8
-rw-r--r--src/lib/libssl/d1_clnt.c4
-rw-r--r--src/lib/libssl/d1_pkt.c4
-rw-r--r--src/lib/libssl/d1_srvr.c4
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_eay.c4
-rw-r--r--src/lib/libssl/src/crypto/x509/x509type.c8
-rw-r--r--src/lib/libssl/src/ssl/d1_clnt.c4
-rw-r--r--src/lib/libssl/src/ssl/d1_pkt.c4
-rw-r--r--src/lib/libssl/src/ssl/d1_srvr.c4
10 files changed, 24 insertions, 24 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c
index 74d40611ee..940964cac3 100644
--- a/src/lib/libcrypto/rsa/rsa_eay.c
+++ b/src/lib/libcrypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_eay.c,v 1.38 2015/02/14 15:10:39 miod Exp $ */ 1/* $OpenBSD: rsa_eay.c,v 1.39 2015/06/13 08:38:10 doug Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -393,7 +393,7 @@ RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
393 if (BN_bin2bn(buf, num, f) == NULL) 393 if (BN_bin2bn(buf, num, f) == NULL)
394 goto err; 394 goto err;
395 395
396 if (BN_ucmp(f, rsa->n) >= 0) { 396 if (BN_ucmp(f, rsa->n) >= 0) {
397 /* usually the padding functions would catch this */ 397 /* usually the padding functions would catch this */
398 RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, 398 RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,
399 RSA_R_DATA_TOO_LARGE_FOR_MODULUS); 399 RSA_R_DATA_TOO_LARGE_FOR_MODULUS);
diff --git a/src/lib/libcrypto/x509/x509type.c b/src/lib/libcrypto/x509/x509type.c
index 58335b4e64..d0dcffb290 100644
--- a/src/lib/libcrypto/x509/x509type.c
+++ b/src/lib/libcrypto/x509/x509type.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509type.c,v 1.11 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: x509type.c,v 1.12 2015/06/13 08:38:10 doug Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -121,9 +121,9 @@ X509_certificate_type(X509 *x, EVP_PKEY *pkey)
121 } 121 }
122 } 122 }
123 123
124 if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look 124 /* /8 because it's 1024 bits we look for, not bytes */
125 for, not bytes */ 125 if (EVP_PKEY_size(pk) <= 1024 / 8)
126 ret |= EVP_PKT_EXP; 126 ret |= EVP_PKT_EXP;
127 if (pkey == NULL) 127 if (pkey == NULL)
128 EVP_PKEY_free(pk); 128 EVP_PKEY_free(pk);
129 return (ret); 129 return (ret);
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c
index e44c8a0c94..adde3cd39e 100644
--- a/src/lib/libssl/d1_clnt.c
+++ b/src/lib/libssl/d1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_clnt.c,v 1.44 2015/03/27 12:29:54 jsing Exp $ */ 1/* $OpenBSD: d1_clnt.c,v 1.45 2015/06/13 08:38:10 doug Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -417,7 +417,7 @@ dtls1_connect(SSL *s)
417 ret = dtls1_send_client_verify(s); 417 ret = dtls1_send_client_verify(s);
418 if (ret <= 0) 418 if (ret <= 0)
419 goto end; 419 goto end;
420 s->state = SSL3_ST_CW_CHANGE_A; 420 s->state = SSL3_ST_CW_CHANGE_A;
421 s->init_num = 0; 421 s->init_num = 0;
422 s->s3->change_cipher_spec = 0; 422 s->s3->change_cipher_spec = 0;
423 break; 423 break;
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c
index c997b7f212..a3ba33548e 100644
--- a/src/lib/libssl/d1_pkt.c
+++ b/src/lib/libssl/d1_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_pkt.c,v 1.40 2015/02/09 10:53:28 jsing Exp $ */ 1/* $OpenBSD: d1_pkt.c,v 1.41 2015/06/13 08:38:10 doug Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -1437,7 +1437,7 @@ dtls1_dispatch_alert(SSL *s)
1437 || s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 1437 || s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE
1438#endif 1438#endif
1439 ) 1439 )
1440 (void)BIO_flush(s->wbio); 1440 (void)BIO_flush(s->wbio);
1441 1441
1442 if (s->msg_callback) 1442 if (s->msg_callback)
1443 s->msg_callback(1, s->version, SSL3_RT_ALERT, 1443 s->msg_callback(1, s->version, SSL3_RT_ALERT,
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c
index 27f350fcb6..bd3a8e1a42 100644
--- a/src/lib/libssl/d1_srvr.c
+++ b/src/lib/libssl/d1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_srvr.c,v 1.51 2015/05/15 11:00:14 jsg Exp $ */ 1/* $OpenBSD: d1_srvr.c,v 1.52 2015/06/13 08:38:10 doug Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -525,7 +525,7 @@ dtls1_accept(SSL *s)
525 ret = ssl3_get_cert_verify(s); 525 ret = ssl3_get_cert_verify(s);
526 if (ret <= 0) 526 if (ret <= 0)
527 goto end; 527 goto end;
528 s->state = SSL3_ST_SR_FINISHED_A; 528 s->state = SSL3_ST_SR_FINISHED_A;
529 s->init_num = 0; 529 s->init_num = 0;
530 break; 530 break;
531 531
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
index 74d40611ee..940964cac3 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_eay.c,v 1.38 2015/02/14 15:10:39 miod Exp $ */ 1/* $OpenBSD: rsa_eay.c,v 1.39 2015/06/13 08:38:10 doug Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -393,7 +393,7 @@ RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
393 if (BN_bin2bn(buf, num, f) == NULL) 393 if (BN_bin2bn(buf, num, f) == NULL)
394 goto err; 394 goto err;
395 395
396 if (BN_ucmp(f, rsa->n) >= 0) { 396 if (BN_ucmp(f, rsa->n) >= 0) {
397 /* usually the padding functions would catch this */ 397 /* usually the padding functions would catch this */
398 RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, 398 RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,
399 RSA_R_DATA_TOO_LARGE_FOR_MODULUS); 399 RSA_R_DATA_TOO_LARGE_FOR_MODULUS);
diff --git a/src/lib/libssl/src/crypto/x509/x509type.c b/src/lib/libssl/src/crypto/x509/x509type.c
index 58335b4e64..d0dcffb290 100644
--- a/src/lib/libssl/src/crypto/x509/x509type.c
+++ b/src/lib/libssl/src/crypto/x509/x509type.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509type.c,v 1.11 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: x509type.c,v 1.12 2015/06/13 08:38:10 doug Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -121,9 +121,9 @@ X509_certificate_type(X509 *x, EVP_PKEY *pkey)
121 } 121 }
122 } 122 }
123 123
124 if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look 124 /* /8 because it's 1024 bits we look for, not bytes */
125 for, not bytes */ 125 if (EVP_PKEY_size(pk) <= 1024 / 8)
126 ret |= EVP_PKT_EXP; 126 ret |= EVP_PKT_EXP;
127 if (pkey == NULL) 127 if (pkey == NULL)
128 EVP_PKEY_free(pk); 128 EVP_PKEY_free(pk);
129 return (ret); 129 return (ret);
diff --git a/src/lib/libssl/src/ssl/d1_clnt.c b/src/lib/libssl/src/ssl/d1_clnt.c
index e44c8a0c94..adde3cd39e 100644
--- a/src/lib/libssl/src/ssl/d1_clnt.c
+++ b/src/lib/libssl/src/ssl/d1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_clnt.c,v 1.44 2015/03/27 12:29:54 jsing Exp $ */ 1/* $OpenBSD: d1_clnt.c,v 1.45 2015/06/13 08:38:10 doug Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -417,7 +417,7 @@ dtls1_connect(SSL *s)
417 ret = dtls1_send_client_verify(s); 417 ret = dtls1_send_client_verify(s);
418 if (ret <= 0) 418 if (ret <= 0)
419 goto end; 419 goto end;
420 s->state = SSL3_ST_CW_CHANGE_A; 420 s->state = SSL3_ST_CW_CHANGE_A;
421 s->init_num = 0; 421 s->init_num = 0;
422 s->s3->change_cipher_spec = 0; 422 s->s3->change_cipher_spec = 0;
423 break; 423 break;
diff --git a/src/lib/libssl/src/ssl/d1_pkt.c b/src/lib/libssl/src/ssl/d1_pkt.c
index c997b7f212..a3ba33548e 100644
--- a/src/lib/libssl/src/ssl/d1_pkt.c
+++ b/src/lib/libssl/src/ssl/d1_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_pkt.c,v 1.40 2015/02/09 10:53:28 jsing Exp $ */ 1/* $OpenBSD: d1_pkt.c,v 1.41 2015/06/13 08:38:10 doug Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -1437,7 +1437,7 @@ dtls1_dispatch_alert(SSL *s)
1437 || s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 1437 || s->s3->send_alert[1] == DTLS1_AD_MISSING_HANDSHAKE_MESSAGE
1438#endif 1438#endif
1439 ) 1439 )
1440 (void)BIO_flush(s->wbio); 1440 (void)BIO_flush(s->wbio);
1441 1441
1442 if (s->msg_callback) 1442 if (s->msg_callback)
1443 s->msg_callback(1, s->version, SSL3_RT_ALERT, 1443 s->msg_callback(1, s->version, SSL3_RT_ALERT,
diff --git a/src/lib/libssl/src/ssl/d1_srvr.c b/src/lib/libssl/src/ssl/d1_srvr.c
index 27f350fcb6..bd3a8e1a42 100644
--- a/src/lib/libssl/src/ssl/d1_srvr.c
+++ b/src/lib/libssl/src/ssl/d1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_srvr.c,v 1.51 2015/05/15 11:00:14 jsg Exp $ */ 1/* $OpenBSD: d1_srvr.c,v 1.52 2015/06/13 08:38:10 doug Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -525,7 +525,7 @@ dtls1_accept(SSL *s)
525 ret = ssl3_get_cert_verify(s); 525 ret = ssl3_get_cert_verify(s);
526 if (ret <= 0) 526 if (ret <= 0)
527 goto end; 527 goto end;
528 s->state = SSL3_ST_SR_FINISHED_A; 528 s->state = SSL3_ST_SR_FINISHED_A;
529 s->init_num = 0; 529 s->init_num = 0;
530 break; 530 break;
531 531