OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 /* | 5 /* |
6 * DTLS Protocol | 6 * DTLS Protocol |
7 */ | 7 */ |
8 | 8 |
9 #include "ssl.h" | 9 #include "ssl.h" |
10 #include "sslimpl.h" | 10 #include "sslimpl.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 1500 - 28, /* Ethernet MTU */ | 23 1500 - 28, /* Ethernet MTU */ |
24 1280 - 28, /* IPv6 minimum MTU */ | 24 1280 - 28, /* IPv6 minimum MTU */ |
25 576 - 28, /* Common assumption */ | 25 576 - 28, /* Common assumption */ |
26 256 - 28 /* We're in serious trouble now */ | 26 256 - 28 /* We're in serious trouble now */ |
27 }; | 27 }; |
28 | 28 |
29 #define DTLS_COOKIE_BYTES 32 | 29 #define DTLS_COOKIE_BYTES 32 |
30 | 30 |
31 /* List copied from ssl3con.c:cipherSuites */ | 31 /* List copied from ssl3con.c:cipherSuites */ |
32 static const ssl3CipherSuite nonDTLSSuites[] = { | 32 static const ssl3CipherSuite nonDTLSSuites[] = { |
33 /* XXX Make AES-GCM work with DTLS. */ | |
34 #ifdef NSS_ENABLE_ECC | |
35 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, | |
36 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, | |
37 #endif /* NSS_ENABLE_ECC */ | |
38 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, | |
39 TLS_RSA_WITH_AES_128_GCM_SHA256, | |
40 #ifdef NSS_ENABLE_ECC | 33 #ifdef NSS_ENABLE_ECC |
41 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, | 34 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, |
42 TLS_ECDHE_RSA_WITH_RC4_128_SHA, | 35 TLS_ECDHE_RSA_WITH_RC4_128_SHA, |
43 #endif /* NSS_ENABLE_ECC */ | 36 #endif /* NSS_ENABLE_ECC */ |
44 TLS_DHE_DSS_WITH_RC4_128_SHA, | 37 TLS_DHE_DSS_WITH_RC4_128_SHA, |
45 #ifdef NSS_ENABLE_ECC | 38 #ifdef NSS_ENABLE_ECC |
46 TLS_ECDH_RSA_WITH_RC4_128_SHA, | 39 TLS_ECDH_RSA_WITH_RC4_128_SHA, |
47 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, | 40 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, |
48 #endif /* NSS_ENABLE_ECC */ | 41 #endif /* NSS_ENABLE_ECC */ |
49 SSL_RSA_WITH_RC4_128_MD5, | 42 SSL_RSA_WITH_RC4_128_MD5, |
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 desired = PR_MillisecondsToInterval(ss->ssl3.hs.rtTimeoutMs); | 1123 desired = PR_MillisecondsToInterval(ss->ssl3.hs.rtTimeoutMs); |
1131 if (elapsed > desired) { | 1124 if (elapsed > desired) { |
1132 /* Timer expired */ | 1125 /* Timer expired */ |
1133 *timeout = PR_INTERVAL_NO_WAIT; | 1126 *timeout = PR_INTERVAL_NO_WAIT; |
1134 } else { | 1127 } else { |
1135 *timeout = desired - elapsed; | 1128 *timeout = desired - elapsed; |
1136 } | 1129 } |
1137 | 1130 |
1138 return SECSuccess; | 1131 return SECSuccess; |
1139 } | 1132 } |
OLD | NEW |