| 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 5881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5892 rv = ssl3_SendCertificateVerify(ss); | 5892 rv = ssl3_SendCertificateVerify(ss); |
| 5893 if (rv != SECSuccess) { | 5893 if (rv != SECSuccess) { |
| 5894 goto loser; /* err is set. */ | 5894 goto loser; /* err is set. */ |
| 5895 } | 5895 } |
| 5896 } | 5896 } |
| 5897 rv = ssl3_SendChangeCipherSpecs(ss); | 5897 rv = ssl3_SendChangeCipherSpecs(ss); |
| 5898 if (rv != SECSuccess) { | 5898 if (rv != SECSuccess) { |
| 5899 goto loser; /* err code was set. */ | 5899 goto loser; /* err code was set. */ |
| 5900 } | 5900 } |
| 5901 | 5901 |
| 5902 rv = ssl3_SendNextProto(ss); | 5902 /* We don't send NPN in a renegotiation as it's explicitly disallowed by |
| 5903 if (rv != SECSuccess) { | 5903 * the spec. */ |
| 5904 » goto loser;» /* err code was set. */ | 5904 if (!ss->firstHsDone) { |
| 5905 » rv = ssl3_SendNextProto(ss); |
| 5906 » if (rv != SECSuccess) { |
| 5907 » goto loser;»/* err code was set. */ |
| 5908 » } |
| 5905 } | 5909 } |
| 5906 | 5910 |
| 5907 rv = ssl3_SendFinished(ss, 0); | 5911 rv = ssl3_SendFinished(ss, 0); |
| 5908 if (rv != SECSuccess) { | 5912 if (rv != SECSuccess) { |
| 5909 goto loser; /* err code was set. */ | 5913 goto loser; /* err code was set. */ |
| 5910 } | 5914 } |
| 5911 | 5915 |
| 5912 ssl_ReleaseXmitBufLock(ss); /*******************************/ | 5916 ssl_ReleaseXmitBufLock(ss); /*******************************/ |
| 5913 | 5917 |
| 5914 if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn)) | 5918 if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn)) |
| (...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8829 /* If this thread is in SSL_SecureSend (trying to write some data) | 8833 /* If this thread is in SSL_SecureSend (trying to write some data) |
| 8830 ** or if it is going to step up, | 8834 ** or if it is going to step up, |
| 8831 ** then set the ssl_SEND_FLAG_FORCE_INTO_BUFFER flag, so that the | 8835 ** then set the ssl_SEND_FLAG_FORCE_INTO_BUFFER flag, so that the |
| 8832 ** last two handshake messages (change cipher spec and finished) | 8836 ** last two handshake messages (change cipher spec and finished) |
| 8833 ** will be sent in the same send/write call as the application data. | 8837 ** will be sent in the same send/write call as the application data. |
| 8834 */ | 8838 */ |
| 8835 if (doStepUp || ss->writerThread == PR_GetCurrentThread()) { | 8839 if (doStepUp || ss->writerThread == PR_GetCurrentThread()) { |
| 8836 flags = ssl_SEND_FLAG_FORCE_INTO_BUFFER; | 8840 flags = ssl_SEND_FLAG_FORCE_INTO_BUFFER; |
| 8837 } | 8841 } |
| 8838 | 8842 |
| 8839 » if (!isServer) { | 8843 » if (!isServer && !ss->firstHsDone) { |
| 8840 rv = ssl3_SendNextProto(ss); | 8844 rv = ssl3_SendNextProto(ss); |
| 8841 if (rv != SECSuccess) { | 8845 if (rv != SECSuccess) { |
| 8842 goto xmit_loser; /* err code was set. */ | 8846 goto xmit_loser; /* err code was set. */ |
| 8843 } | 8847 } |
| 8844 } | 8848 } |
| 8845 | 8849 |
| 8846 rv = ssl3_SendFinished(ss, flags); | 8850 rv = ssl3_SendFinished(ss, flags); |
| 8847 if (rv != SECSuccess) { | 8851 if (rv != SECSuccess) { |
| 8848 goto xmit_loser; /* err is set. */ | 8852 goto xmit_loser; /* err is set. */ |
| 8849 } | 8853 } |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9993 | 9997 |
| 9994 ss->ssl3.initialized = PR_FALSE; | 9998 ss->ssl3.initialized = PR_FALSE; |
| 9995 | 9999 |
| 9996 if (ss->ssl3.nextProto.data) { | 10000 if (ss->ssl3.nextProto.data) { |
| 9997 PORT_Free(ss->ssl3.nextProto.data); | 10001 PORT_Free(ss->ssl3.nextProto.data); |
| 9998 ss->ssl3.nextProto.data = NULL; | 10002 ss->ssl3.nextProto.data = NULL; |
| 9999 } | 10003 } |
| 10000 } | 10004 } |
| 10001 | 10005 |
| 10002 /* End of ssl3con.c */ | 10006 /* End of ssl3con.c */ |
| OLD | NEW |