OLD | NEW |
1 # Authors: | 1 # Authors: |
2 # Trevor Perrin | 2 # Trevor Perrin |
3 # Google - added reqCAs parameter | 3 # Google - added reqCAs parameter |
4 # Google (adapted by Sam Rushing and Marcelo Fernandez) - NPN support | 4 # Google (adapted by Sam Rushing and Marcelo Fernandez) - NPN support |
5 # Dimitris Moraitis - Anon ciphersuites | 5 # Dimitris Moraitis - Anon ciphersuites |
6 # Martin von Loewis - python 3 port | 6 # Martin von Loewis - python 3 port |
7 # Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2 | 7 # Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2 |
8 # | 8 # |
9 # See the LICENSE file for legal information regarding use of this file. | 9 # See the LICENSE file for legal information regarding use of this file. |
10 | 10 |
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 privateKey=privateKey, reqCert=reqCert, | 1214 privateKey=privateKey, reqCert=reqCert, |
1215 sessionCache=sessionCache, settings=settings, | 1215 sessionCache=sessionCache, settings=settings, |
1216 reqCAs=reqCAs, reqCertTypes=reqCertTypes, | 1216 reqCAs=reqCAs, reqCertTypes=reqCertTypes, |
1217 tacks=tacks, activationFlags=activationFlags, | 1217 tacks=tacks, activationFlags=activationFlags, |
1218 nextProtos=nextProtos, anon=anon, | 1218 nextProtos=nextProtos, anon=anon, |
1219 signedCertTimestamps=signedCertTimestamps, | 1219 signedCertTimestamps=signedCertTimestamps, |
1220 fallbackSCSV=fallbackSCSV, | 1220 fallbackSCSV=fallbackSCSV, |
1221 ocspResponse=ocspResponse) | 1221 ocspResponse=ocspResponse) |
1222 for result in self._handshakeWrapperAsync(handshaker, checker): | 1222 for result in self._handshakeWrapperAsync(handshaker, checker): |
1223 yield result | 1223 yield result |
| 1224 if settings and settings.alertAfterHandshake: |
| 1225 for result in self._sendError(AlertDescription.internal_error, |
| 1226 "Spurious alert"): |
| 1227 yield result |
1224 | 1228 |
1225 | 1229 |
1226 def _handshakeServerAsyncHelper(self, verifierDB, | 1230 def _handshakeServerAsyncHelper(self, verifierDB, |
1227 certChain, privateKey, reqCert, sessionCache, | 1231 certChain, privateKey, reqCert, sessionCache, |
1228 settings, reqCAs, reqCertTypes, | 1232 settings, reqCAs, reqCertTypes, |
1229 tacks, activationFlags, | 1233 tacks, activationFlags, |
1230 nextProtos, anon, | 1234 nextProtos, anon, |
1231 signedCertTimestamps, fallbackSCSV, | 1235 signedCertTimestamps, fallbackSCSV, |
1232 ocspResponse): | 1236 ocspResponse): |
1233 | 1237 |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 except TLSAlert as alert: | 1965 except TLSAlert as alert: |
1962 if not self.fault: | 1966 if not self.fault: |
1963 raise | 1967 raise |
1964 if alert.description not in Fault.faultAlerts[self.fault]: | 1968 if alert.description not in Fault.faultAlerts[self.fault]: |
1965 raise TLSFaultError(str(alert)) | 1969 raise TLSFaultError(str(alert)) |
1966 else: | 1970 else: |
1967 pass | 1971 pass |
1968 except: | 1972 except: |
1969 self._shutdown(False) | 1973 self._shutdown(False) |
1970 raise | 1974 raise |
OLD | NEW |