| 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, |
| 33 #ifdef NSS_ENABLE_ECC | 40 #ifdef NSS_ENABLE_ECC |
| 34 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, | 41 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, |
| 35 TLS_ECDHE_RSA_WITH_RC4_128_SHA, | 42 TLS_ECDHE_RSA_WITH_RC4_128_SHA, |
| 36 #endif /* NSS_ENABLE_ECC */ | 43 #endif /* NSS_ENABLE_ECC */ |
| 37 TLS_DHE_DSS_WITH_RC4_128_SHA, | 44 TLS_DHE_DSS_WITH_RC4_128_SHA, |
| 38 #ifdef NSS_ENABLE_ECC | 45 #ifdef NSS_ENABLE_ECC |
| 39 TLS_ECDH_RSA_WITH_RC4_128_SHA, | 46 TLS_ECDH_RSA_WITH_RC4_128_SHA, |
| 40 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, | 47 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, |
| 41 #endif /* NSS_ENABLE_ECC */ | 48 #endif /* NSS_ENABLE_ECC */ |
| 42 SSL_RSA_WITH_RC4_128_MD5, | 49 SSL_RSA_WITH_RC4_128_MD5, |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 desired = PR_MillisecondsToInterval(ss->ssl3.hs.rtTimeoutMs); | 1130 desired = PR_MillisecondsToInterval(ss->ssl3.hs.rtTimeoutMs); |
| 1124 if (elapsed > desired) { | 1131 if (elapsed > desired) { |
| 1125 /* Timer expired */ | 1132 /* Timer expired */ |
| 1126 *timeout = PR_INTERVAL_NO_WAIT; | 1133 *timeout = PR_INTERVAL_NO_WAIT; |
| 1127 } else { | 1134 } else { |
| 1128 *timeout = desired - elapsed; | 1135 *timeout = desired - elapsed; |
| 1129 } | 1136 } |
| 1130 | 1137 |
| 1131 return SECSuccess; | 1138 return SECSuccess; |
| 1132 } | 1139 } |
| OLD | NEW |