diff options
author | guenther <> | 2014-04-20 14:03:04 +0000 |
---|---|---|
committer | guenther <> | 2014-04-20 14:03:04 +0000 |
commit | bc2b2162a929a734784c6630be6528f8872aeea2 (patch) | |
tree | efea40e0c3da9c637180ab9c08a30e8d27dcad42 | |
parent | 92eeeab70459291ae70149ef5dbd1b98e1895ee2 (diff) | |
download | openbsd-bc2b2162a929a734784c6630be6528f8872aeea2.tar.gz openbsd-bc2b2162a929a734784c6630be6528f8872aeea2.tar.bz2 openbsd-bc2b2162a929a734784c6630be6528f8872aeea2.zip |
Fix indentation, adding braces and combining a nested if to reduce depth
-rw-r--r-- | src/lib/libssl/s3_both.c | 26 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_both.c | 26 |
2 files changed, 28 insertions, 24 deletions
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 12b38c4596..9dcdd7b998 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c | |||
@@ -436,18 +436,20 @@ ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) | |||
436 | } | 436 | } |
437 | 437 | ||
438 | skip_message = 0; | 438 | skip_message = 0; |
439 | if (!s->server) | 439 | if (!s->server && p[0] == SSL3_MT_HELLO_REQUEST) { |
440 | if (p[0] == SSL3_MT_HELLO_REQUEST) | 440 | /* |
441 | /* The server may always send 'Hello Request' messages -- | 441 | * The server may always send 'Hello Request' |
442 | * we are doing a handshake anyway now, so ignore them | 442 | * messages -- we are doing a handshake anyway |
443 | * if their format is correct. Does not count for | 443 | * now, so ignore them if their format is |
444 | * 'Finished' MAC. */ | 444 | * correct. Does not count for 'Finished' MAC. |
445 | if (p[1] == 0 && p[2] == 0 &&p[3] == 0) { | 445 | */ |
446 | s->init_num = 0; | 446 | if (p[1] == 0 && p[2] == 0 &&p[3] == 0) { |
447 | skip_message = 1; | 447 | s->init_num = 0; |
448 | 448 | skip_message = 1; | |
449 | if (s->msg_callback) | 449 | |
450 | s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, p, 4, s, s->msg_callback_arg); | 450 | if (s->msg_callback) |
451 | s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, p, 4, s, s->msg_callback_arg); | ||
452 | } | ||
451 | } | 453 | } |
452 | } | 454 | } |
453 | while (skip_message); | 455 | while (skip_message); |
diff --git a/src/lib/libssl/src/ssl/s3_both.c b/src/lib/libssl/src/ssl/s3_both.c index 12b38c4596..9dcdd7b998 100644 --- a/src/lib/libssl/src/ssl/s3_both.c +++ b/src/lib/libssl/src/ssl/s3_both.c | |||
@@ -436,18 +436,20 @@ ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) | |||
436 | } | 436 | } |
437 | 437 | ||
438 | skip_message = 0; | 438 | skip_message = 0; |
439 | if (!s->server) | 439 | if (!s->server && p[0] == SSL3_MT_HELLO_REQUEST) { |
440 | if (p[0] == SSL3_MT_HELLO_REQUEST) | 440 | /* |
441 | /* The server may always send 'Hello Request' messages -- | 441 | * The server may always send 'Hello Request' |
442 | * we are doing a handshake anyway now, so ignore them | 442 | * messages -- we are doing a handshake anyway |
443 | * if their format is correct. Does not count for | 443 | * now, so ignore them if their format is |
444 | * 'Finished' MAC. */ | 444 | * correct. Does not count for 'Finished' MAC. |
445 | if (p[1] == 0 && p[2] == 0 &&p[3] == 0) { | 445 | */ |
446 | s->init_num = 0; | 446 | if (p[1] == 0 && p[2] == 0 &&p[3] == 0) { |
447 | skip_message = 1; | 447 | s->init_num = 0; |
448 | 448 | skip_message = 1; | |
449 | if (s->msg_callback) | 449 | |
450 | s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, p, 4, s, s->msg_callback_arg); | 450 | if (s->msg_callback) |
451 | s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, p, 4, s, s->msg_callback_arg); | ||
452 | } | ||
451 | } | 453 | } |
452 | } | 454 | } |
453 | while (skip_message); | 455 | while (skip_message); |