Index: third_party/tlslite/tlslite/messages.py |
diff --git a/third_party/tlslite/tlslite/messages.py b/third_party/tlslite/tlslite/messages.py |
index dc6ed324113d9daa54185c85d568f436c061a529..1058ad0eb5f99385934a957a9748ab12eaa512c6 100644 |
--- a/third_party/tlslite/tlslite/messages.py |
+++ b/third_party/tlslite/tlslite/messages.py |
@@ -170,7 +170,7 @@ class ClientHello(HandshakeMsg): |
while soFar != totalExtLength: |
extType = p.get(2) |
extLength = p.get(2) |
- if extType == 6: |
+ if extType == ClientHelloExtension.srp: |
self.srp_username = bytesToString(p.getVarBytes(1)) |
elif extType == 7: |
self.certificate_types = p.getVarList(1, 1) |
@@ -204,7 +204,7 @@ class ClientHello(HandshakeMsg): |
w.add(len(self.certificate_types)+1, 2) |
w.addVarSeq(self.certificate_types, 1, 1) |
if self.srp_username: |
- w.add(6, 2) |
+ w.add(ClientHelloExtension.srp, 2) |
w.add(len(self.srp_username)+1, 2) |
w.addVarSeq(stringToBytes(self.srp_username), 1, 1) |