Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 /* | 2 /* |
3 * TLS 1.3 Protocol | 3 * TLS 1.3 Protocol |
4 * | 4 * |
5 * This Source Code Form is subject to the terms of the Mozilla Public | 5 * This Source Code Form is subject to the terms of the Mozilla Public |
6 * License, v. 2.0. If a copy of the MPL was not distributed with this | 6 * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
8 #include "stdarg.h" | 8 #include "stdarg.h" |
9 #include "cert.h" | 9 #include "cert.h" |
10 #include "ssl.h" | 10 #include "ssl.h" |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); | 328 PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); |
329 PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss)); | 329 PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss)); |
330 | 330 |
331 PORT_Assert(PR_CLIST_IS_EMPTY(&ss->ephemeralKeyPairs)); | 331 PORT_Assert(PR_CLIST_IS_EMPTY(&ss->ephemeralKeyPairs)); |
332 | 332 |
333 for (i = 0; i < ss->namedGroupPreferenceCount; ++i) { | 333 for (i = 0; i < ss->namedGroupPreferenceCount; ++i) { |
334 SECStatus rv; | 334 SECStatus rv; |
335 sslEphemeralKeyPair *keyPair = NULL; | 335 sslEphemeralKeyPair *keyPair = NULL; |
336 const namedGroupDef *groupDef = &ss->namedGroupPreferences[i]; | 336 const namedGroupDef *groupDef = &ss->namedGroupPreferences[i]; |
337 const ssl3DHParams *params; | 337 const ssl3DHParams *params; |
338 if (!groupDef || !ssl_NamedGroupEnabled(ss, groupDef)) { | 338 if (!ssl_NamedGroupEnabled(ss, groupDef)) { |
ekr-rietveld
2016/09/07 23:30:06
How can groupDef be null?
franziskus
2016/09/08 17:26:58
not anymore...
| |
339 continue; | 339 continue; |
340 } | 340 } |
341 switch (groupDef->type) { | 341 switch (groupDef->type) { |
342 case group_type_ec: | 342 case group_type_ec: |
343 if (!ecNeeded) { | 343 if (!ecNeeded) { |
344 continue; | 344 continue; |
345 } | 345 } |
346 rv = ssl_CreateECDHEphemeralKeyPair(groupDef, &keyPair); | 346 rv = ssl_CreateECDHEphemeralKeyPair(groupDef, &keyPair); |
347 if (rv != SECSuccess) { | 347 if (rv != SECSuccess) { |
348 return SECFailure; | 348 return SECFailure; |
(...skipping 3265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3614 if (SECITEM_CopyItem(NULL, &ed->data, &it) != SECSuccess) { | 3614 if (SECITEM_CopyItem(NULL, &ed->data, &it) != SECSuccess) { |
3615 FATAL_ERROR(ss, SEC_ERROR_NO_MEMORY, internal_error); | 3615 FATAL_ERROR(ss, SEC_ERROR_NO_MEMORY, internal_error); |
3616 return SECFailure; | 3616 return SECFailure; |
3617 } | 3617 } |
3618 PR_APPEND_LINK(&ed->link, &ss->ssl3.hs.bufferedEarlyData); | 3618 PR_APPEND_LINK(&ed->link, &ss->ssl3.hs.bufferedEarlyData); |
3619 | 3619 |
3620 origBuf->len = 0; /* So ssl3_GatherAppDataRecord will keep looping. */ | 3620 origBuf->len = 0; /* So ssl3_GatherAppDataRecord will keep looping. */ |
3621 | 3621 |
3622 return SECSuccess; | 3622 return SECSuccess; |
3623 } | 3623 } |
LEFT | RIGHT |