OLD | NEW |
1 /* | 1 /* |
2 * SSL3 Protocol | 2 * SSL3 Protocol |
3 * | 3 * |
4 * ***** BEGIN LICENSE BLOCK ***** | 4 * ***** BEGIN LICENSE BLOCK ***** |
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
6 * | 6 * |
7 * The contents of this file are subject to the Mozilla Public License Version | 7 * The contents of this file are subject to the Mozilla Public License Version |
8 * 1.1 (the "License"); you may not use this file except in compliance with | 8 * 1.1 (the "License"); you may not use this file except in compliance with |
9 * the License. You may obtain a copy of the License at | 9 * the License. You may obtain a copy of the License at |
10 * http://www.mozilla.org/MPL/ | 10 * http://www.mozilla.org/MPL/ |
(...skipping 5533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5544 PORT_Assert(ss->ssl3.clientCertChain == NULL); | 5544 PORT_Assert(ss->ssl3.clientCertChain == NULL); |
5545 PORT_Assert(ss->ssl3.clientCertificate == NULL); | 5545 PORT_Assert(ss->ssl3.clientCertificate == NULL); |
5546 PORT_Assert(ss->ssl3.clientPrivateKey == NULL); | 5546 PORT_Assert(ss->ssl3.clientPrivateKey == NULL); |
5547 PORT_Assert(ss->ssl3.platformClientKey == (PlatformKey)NULL); | 5547 PORT_Assert(ss->ssl3.platformClientKey == (PlatformKey)NULL); |
5548 | 5548 |
5549 isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); | 5549 isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); |
5550 rv = ssl3_ConsumeHandshakeVariable(ss, &cert_types, 1, &b, &length); | 5550 rv = ssl3_ConsumeHandshakeVariable(ss, &cert_types, 1, &b, &length); |
5551 if (rv != SECSuccess) | 5551 if (rv != SECSuccess) |
5552 goto loser; /* malformed, alert has been sent */ | 5552 goto loser; /* malformed, alert has been sent */ |
5553 | 5553 |
| 5554 PORT_Assert(!ss->requestedCertTypes); |
| 5555 ss->requestedCertTypes = &cert_types; |
| 5556 |
5554 arena = ca_list.arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); | 5557 arena = ca_list.arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); |
5555 if (arena == NULL) | 5558 if (arena == NULL) |
5556 goto no_mem; | 5559 goto no_mem; |
5557 | 5560 |
5558 remaining = ssl3_ConsumeHandshakeNumber(ss, 2, &b, &length); | 5561 remaining = ssl3_ConsumeHandshakeNumber(ss, 2, &b, &length); |
5559 if (remaining < 0) | 5562 if (remaining < 0) |
5560 goto loser; /* malformed, alert has been sent */ | 5563 goto loser; /* malformed, alert has been sent */ |
5561 | 5564 |
5562 if ((PRUint32)remaining > length) | 5565 if ((PRUint32)remaining > length) |
5563 goto alert_loser; | 5566 goto alert_loser; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5733 goto done; | 5736 goto done; |
5734 | 5737 |
5735 alert_loser: | 5738 alert_loser: |
5736 if (isTLS && desc == illegal_parameter) | 5739 if (isTLS && desc == illegal_parameter) |
5737 desc = decode_error; | 5740 desc = decode_error; |
5738 (void)SSL3_SendAlert(ss, alert_fatal, desc); | 5741 (void)SSL3_SendAlert(ss, alert_fatal, desc); |
5739 loser: | 5742 loser: |
5740 PORT_SetError(errCode); | 5743 PORT_SetError(errCode); |
5741 rv = SECFailure; | 5744 rv = SECFailure; |
5742 done: | 5745 done: |
| 5746 ss->requestedCertTypes = NULL; |
5743 if (arena != NULL) | 5747 if (arena != NULL) |
5744 PORT_FreeArena(arena, PR_FALSE); | 5748 PORT_FreeArena(arena, PR_FALSE); |
5745 #ifdef NSS_PLATFORM_CLIENT_AUTH | 5749 #ifdef NSS_PLATFORM_CLIENT_AUTH |
5746 if (platform_cert_list) | 5750 if (platform_cert_list) |
5747 CERT_DestroyCertList(platform_cert_list); | 5751 CERT_DestroyCertList(platform_cert_list); |
5748 #endif | 5752 #endif |
5749 return rv; | 5753 return rv; |
5750 } | 5754 } |
5751 | 5755 |
5752 /* | 5756 /* |
(...skipping 4273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10026 | 10030 |
10027 ss->ssl3.initialized = PR_FALSE; | 10031 ss->ssl3.initialized = PR_FALSE; |
10028 | 10032 |
10029 if (ss->ssl3.nextProto.data) { | 10033 if (ss->ssl3.nextProto.data) { |
10030 PORT_Free(ss->ssl3.nextProto.data); | 10034 PORT_Free(ss->ssl3.nextProto.data); |
10031 ss->ssl3.nextProto.data = NULL; | 10035 ss->ssl3.nextProto.data = NULL; |
10032 } | 10036 } |
10033 } | 10037 } |
10034 | 10038 |
10035 /* End of ssl3con.c */ | 10039 /* End of ssl3con.c */ |
OLD | NEW |