diff options
| author | beck <> | 2017-01-26 12:16:13 +0000 |
|---|---|---|
| committer | beck <> | 2017-01-26 12:16:13 +0000 |
| commit | a141ed2bc17672028f4c648479f1cc3c598be1e9 (patch) | |
| tree | b95866f4795db86411300333c648e4ce8e941899 /src/lib/libssl/d1_both.c | |
| parent | 1a96ea530f5a98c5ea5a032e03e2afd29bf0a1dd (diff) | |
| download | openbsd-a141ed2bc17672028f4c648479f1cc3c598be1e9.tar.gz openbsd-a141ed2bc17672028f4c648479f1cc3c598be1e9.tar.bz2 openbsd-a141ed2bc17672028f4c648479f1cc3c598be1e9.zip | |
Finish the fallout of the SSLerr->SSLerror cleanup to get rid of the ugly
line wraps that resulted
Diffstat (limited to 'src/lib/libssl/d1_both.c')
| -rw-r--r-- | src/lib/libssl/d1_both.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index fb7e289d96..0e4317653d 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_both.c,v 1.47 2017/01/26 10:40:21 beck Exp $ */ | 1 | /* $OpenBSD: d1_both.c,v 1.48 2017/01/26 12:16:13 beck 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. |
| @@ -410,8 +410,7 @@ dtls1_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) | |||
| 410 | S3I(s)->tmp.reuse_message = 0; | 410 | S3I(s)->tmp.reuse_message = 0; |
| 411 | if ((mt >= 0) && (S3I(s)->tmp.message_type != mt)) { | 411 | if ((mt >= 0) && (S3I(s)->tmp.message_type != mt)) { |
| 412 | al = SSL_AD_UNEXPECTED_MESSAGE; | 412 | al = SSL_AD_UNEXPECTED_MESSAGE; |
| 413 | SSLerror( | 413 | SSLerror(SSL_R_UNEXPECTED_MESSAGE); |
| 414 | SSL_R_UNEXPECTED_MESSAGE); | ||
| 415 | goto f_err; | 414 | goto f_err; |
| 416 | } | 415 | } |
| 417 | *ok = 1; | 416 | *ok = 1; |
| @@ -476,14 +475,12 @@ dtls1_preprocess_fragment(SSL *s, struct hm_header_st *msg_hdr, int max) | |||
| 476 | 475 | ||
| 477 | /* sanity checking */ | 476 | /* sanity checking */ |
| 478 | if ((frag_off + frag_len) > msg_len) { | 477 | if ((frag_off + frag_len) > msg_len) { |
| 479 | SSLerror( | 478 | SSLerror(SSL_R_EXCESSIVE_MESSAGE_SIZE); |
| 480 | SSL_R_EXCESSIVE_MESSAGE_SIZE); | ||
| 481 | return SSL_AD_ILLEGAL_PARAMETER; | 479 | return SSL_AD_ILLEGAL_PARAMETER; |
| 482 | } | 480 | } |
| 483 | 481 | ||
| 484 | if ((frag_off + frag_len) > (unsigned long)max) { | 482 | if ((frag_off + frag_len) > (unsigned long)max) { |
| 485 | SSLerror( | 483 | SSLerror(SSL_R_EXCESSIVE_MESSAGE_SIZE); |
| 486 | SSL_R_EXCESSIVE_MESSAGE_SIZE); | ||
| 487 | return SSL_AD_ILLEGAL_PARAMETER; | 484 | return SSL_AD_ILLEGAL_PARAMETER; |
| 488 | } | 485 | } |
| 489 | 486 | ||
| @@ -509,8 +506,7 @@ dtls1_preprocess_fragment(SSL *s, struct hm_header_st *msg_hdr, int max) | |||
| 509 | * They must be playing with us! BTW, failure to enforce | 506 | * They must be playing with us! BTW, failure to enforce |
| 510 | * upper limit would open possibility for buffer overrun. | 507 | * upper limit would open possibility for buffer overrun. |
| 511 | */ | 508 | */ |
| 512 | SSLerror( | 509 | SSLerror(SSL_R_EXCESSIVE_MESSAGE_SIZE); |
| 513 | SSL_R_EXCESSIVE_MESSAGE_SIZE); | ||
| 514 | return SSL_AD_ILLEGAL_PARAMETER; | 510 | return SSL_AD_ILLEGAL_PARAMETER; |
| 515 | } | 511 | } |
| 516 | 512 | ||
| @@ -803,8 +799,7 @@ again: | |||
| 803 | /* parse the message fragment header */ | 799 | /* parse the message fragment header */ |
| 804 | dtls1_get_message_header(wire, &msg_hdr) == 0) { | 800 | dtls1_get_message_header(wire, &msg_hdr) == 0) { |
| 805 | al = SSL_AD_UNEXPECTED_MESSAGE; | 801 | al = SSL_AD_UNEXPECTED_MESSAGE; |
| 806 | SSLerror( | 802 | SSLerror(SSL_R_UNEXPECTED_MESSAGE); |
| 807 | SSL_R_UNEXPECTED_MESSAGE); | ||
| 808 | goto f_err; | 803 | goto f_err; |
| 809 | } | 804 | } |
| 810 | 805 | ||
| @@ -846,8 +841,7 @@ again: | |||
| 846 | else /* Incorrectly formated Hello request */ | 841 | else /* Incorrectly formated Hello request */ |
| 847 | { | 842 | { |
| 848 | al = SSL_AD_UNEXPECTED_MESSAGE; | 843 | al = SSL_AD_UNEXPECTED_MESSAGE; |
| 849 | SSLerror( | 844 | SSLerror(SSL_R_UNEXPECTED_MESSAGE); |
| 850 | SSL_R_UNEXPECTED_MESSAGE); | ||
| 851 | goto f_err; | 845 | goto f_err; |
| 852 | } | 846 | } |
| 853 | } | 847 | } |
| @@ -878,8 +872,7 @@ again: | |||
| 878 | */ | 872 | */ |
| 879 | if (i != (int)frag_len) { | 873 | if (i != (int)frag_len) { |
| 880 | al = SSL3_AD_ILLEGAL_PARAMETER; | 874 | al = SSL3_AD_ILLEGAL_PARAMETER; |
| 881 | SSLerror( | 875 | SSLerror(SSL3_AD_ILLEGAL_PARAMETER); |
| 882 | SSL3_AD_ILLEGAL_PARAMETER); | ||
| 883 | goto f_err; | 876 | goto f_err; |
| 884 | } | 877 | } |
| 885 | 878 | ||
