Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: third_party/tlslite/tlslite/tlsconnection.py

Issue 994373004: Properly handle alerts from the peer in SSL_read. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix CrOS tests Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/tlslite/tlslite/handshakesettings.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/tlslite/tlslite/handshakesettings.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698