diff options
Diffstat (limited to 'src/lib/libssl/d1_srvr.c')
-rw-r--r-- | src/lib/libssl/d1_srvr.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c index 71aa5e75d2..dee182f541 100644 --- a/src/lib/libssl/d1_srvr.c +++ b/src/lib/libssl/d1_srvr.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* $OpenBSD: d1_srvr.c,v 1.44 2014/12/14 13:45:47 jsing Exp $ */ | 1 | /* $OpenBSD: d1_srvr.c,v 1.45 2014/12/14 15:30:50 jsing 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. |
5 | */ | 5 | */ |
6 | /* ==================================================================== | 6 | /* ==================================================================== |
7 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. | 7 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. |
@@ -11,7 +11,7 @@ | |||
11 | * are met: | 11 | * are met: |
12 | * | 12 | * |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. |
15 | * | 15 | * |
16 | * 2. Redistributions in binary form must reproduce the above copyright | 16 | * 2. Redistributions in binary form must reproduce the above copyright |
17 | * notice, this list of conditions and the following disclaimer in | 17 | * notice, this list of conditions and the following disclaimer in |
@@ -62,21 +62,21 @@ | |||
62 | * This package is an SSL implementation written | 62 | * This package is an SSL implementation written |
63 | * by Eric Young (eay@cryptsoft.com). | 63 | * by Eric Young (eay@cryptsoft.com). |
64 | * The implementation was written so as to conform with Netscapes SSL. | 64 | * The implementation was written so as to conform with Netscapes SSL. |
65 | * | 65 | * |
66 | * This library is free for commercial and non-commercial use as long as | 66 | * This library is free for commercial and non-commercial use as long as |
67 | * the following conditions are aheared to. The following conditions | 67 | * the following conditions are aheared to. The following conditions |
68 | * apply to all code found in this distribution, be it the RC4, RSA, | 68 | * apply to all code found in this distribution, be it the RC4, RSA, |
69 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | 69 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation |
70 | * included with this distribution is covered by the same copyright terms | 70 | * included with this distribution is covered by the same copyright terms |
71 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | 71 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). |
72 | * | 72 | * |
73 | * Copyright remains Eric Young's, and as such any Copyright notices in | 73 | * Copyright remains Eric Young's, and as such any Copyright notices in |
74 | * the code are not to be removed. | 74 | * the code are not to be removed. |
75 | * If this package is used in a product, Eric Young should be given attribution | 75 | * If this package is used in a product, Eric Young should be given attribution |
76 | * as the author of the parts of the library used. | 76 | * as the author of the parts of the library used. |
77 | * This can be in the form of a textual message at program startup or | 77 | * This can be in the form of a textual message at program startup or |
78 | * in documentation (online or textual) provided with the package. | 78 | * in documentation (online or textual) provided with the package. |
79 | * | 79 | * |
80 | * Redistribution and use in source and binary forms, with or without | 80 | * Redistribution and use in source and binary forms, with or without |
81 | * modification, are permitted provided that the following conditions | 81 | * modification, are permitted provided that the following conditions |
82 | * are met: | 82 | * are met: |
@@ -91,10 +91,10 @@ | |||
91 | * Eric Young (eay@cryptsoft.com)" | 91 | * Eric Young (eay@cryptsoft.com)" |
92 | * The word 'cryptographic' can be left out if the rouines from the library | 92 | * The word 'cryptographic' can be left out if the rouines from the library |
93 | * being used are not cryptographic related :-). | 93 | * being used are not cryptographic related :-). |
94 | * 4. If you include any Windows specific code (or a derivative thereof) from | 94 | * 4. If you include any Windows specific code (or a derivative thereof) from |
95 | * the apps directory (application code) you must include an acknowledgement: | 95 | * the apps directory (application code) you must include an acknowledgement: |
96 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | 96 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" |
97 | * | 97 | * |
98 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | 98 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND |
99 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 99 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
100 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 100 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
@@ -106,7 +106,7 @@ | |||
106 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 106 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
107 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 107 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
108 | * SUCH DAMAGE. | 108 | * SUCH DAMAGE. |
109 | * | 109 | * |
110 | * The licence and distribution terms for any publically available version or | 110 | * The licence and distribution terms for any publically available version or |
111 | * derivative of this code cannot be changed. i.e. this code cannot simply be | 111 | * derivative of this code cannot be changed. i.e. this code cannot simply be |
112 | * copied and put under another distribution licence | 112 | * copied and put under another distribution licence |
@@ -609,7 +609,7 @@ dtls1_accept(SSL *s) | |||
609 | s->init_num = 0; | 609 | s->init_num = 0; |
610 | 610 | ||
611 | /* We need to get hashes here so if there is | 611 | /* We need to get hashes here so if there is |
612 | * a client cert, it can be verified */ | 612 | * a client cert, it can be verified */ |
613 | s->method->ssl3_enc->cert_verify_mac(s, | 613 | s->method->ssl3_enc->cert_verify_mac(s, |
614 | NID_md5, &(s->s3->tmp.cert_verify_md[0])); | 614 | NID_md5, &(s->s3->tmp.cert_verify_md[0])); |
615 | s->method->ssl3_enc->cert_verify_mac(s, | 615 | s->method->ssl3_enc->cert_verify_mac(s, |
@@ -631,7 +631,7 @@ dtls1_accept(SSL *s) | |||
631 | state == SSL_ST_RENEGOTIATE) | 631 | state == SSL_ST_RENEGOTIATE) |
632 | s->state = DTLS1_SCTP_ST_SR_READ_SOCK; | 632 | s->state = DTLS1_SCTP_ST_SR_READ_SOCK; |
633 | else | 633 | else |
634 | #endif | 634 | #endif |
635 | s->state = SSL3_ST_SR_FINISHED_A; | 635 | s->state = SSL3_ST_SR_FINISHED_A; |
636 | s->init_num = 0; | 636 | s->init_num = 0; |
637 | break; | 637 | break; |
@@ -828,7 +828,7 @@ dtls1_send_hello_request(SSL *s) | |||
828 | s->init_num = DTLS1_HM_HEADER_LENGTH; | 828 | s->init_num = DTLS1_HM_HEADER_LENGTH; |
829 | s->init_off = 0; | 829 | s->init_off = 0; |
830 | 830 | ||
831 | /* no need to buffer this message, since there are no retransmit | 831 | /* no need to buffer this message, since there are no retransmit |
832 | * requests for it */ | 832 | * requests for it */ |
833 | } | 833 | } |
834 | 834 | ||
@@ -1090,7 +1090,7 @@ dtls1_send_server_key_exchange(SSL *s) | |||
1090 | } | 1090 | } |
1091 | 1091 | ||
1092 | /* XXX: For now, we only support ephemeral ECDH | 1092 | /* XXX: For now, we only support ephemeral ECDH |
1093 | * keys over named (not generic) curves. For | 1093 | * keys over named (not generic) curves. For |
1094 | * supported named curves, curve_id is non-zero. | 1094 | * supported named curves, curve_id is non-zero. |
1095 | */ | 1095 | */ |
1096 | if ((curve_id = tls1_ec_nid2curve_id( | 1096 | if ((curve_id = tls1_ec_nid2curve_id( |
@@ -1130,11 +1130,11 @@ dtls1_send_server_key_exchange(SSL *s) | |||
1130 | BN_CTX_free(bn_ctx); | 1130 | BN_CTX_free(bn_ctx); |
1131 | bn_ctx = NULL; | 1131 | bn_ctx = NULL; |
1132 | 1132 | ||
1133 | /* XXX: For now, we only support named (not | 1133 | /* XXX: For now, we only support named (not |
1134 | * generic) curves in ECDH ephemeral key exchanges. | 1134 | * generic) curves in ECDH ephemeral key exchanges. |
1135 | * In this situation, we need four additional bytes | 1135 | * In this situation, we need four additional bytes |
1136 | * to encode the entire ServerECDHParams | 1136 | * to encode the entire ServerECDHParams |
1137 | * structure. | 1137 | * structure. |
1138 | */ | 1138 | */ |
1139 | n = 4 + encodedlen; | 1139 | n = 4 + encodedlen; |
1140 | 1140 | ||