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

Unified Diff: third_party/tlslite/tlslite/utils/ASN1Parser.py

Issue 3177015: Improve support for requesting client certs in tlslite (Closed)
Patch Set: Cert requests got turned on across the board Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tlslite/tlslite/messages.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tlslite/tlslite/utils/ASN1Parser.py
diff --git a/third_party/tlslite/tlslite/utils/ASN1Parser.py b/third_party/tlslite/tlslite/utils/ASN1Parser.py
index 16b50f29cde9696035e558a21ccc9a41e070cf5a..c85c13810650ee2ca51fa3edc4a383a84d7d265c 100644
--- a/third_party/tlslite/tlslite/utils/ASN1Parser.py
+++ b/third_party/tlslite/tlslite/utils/ASN1Parser.py
@@ -16,13 +16,16 @@ class ASN1Parser:
#Assuming this is a sequence...
def getChild(self, which):
+ return ASN1Parser(self.getChildBytes(which))
+
+ def getChildBytes(self, which):
p = Parser(self.value)
for x in range(which+1):
markIndex = p.index
p.get(1) #skip Type
length = self._getASN1Length(p)
p.getFixBytes(length)
- return ASN1Parser(p.bytes[markIndex : p.index])
+ return p.bytes[markIndex : p.index]
#Decode the ASN.1 DER length field
def _getASN1Length(self, p):
« no previous file with comments | « third_party/tlslite/tlslite/messages.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698