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

Unified Diff: third_party/tlslite/tlslite/X509.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/TLSConnection.py ('k') | third_party/tlslite/tlslite/messages.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tlslite/tlslite/X509.py
diff --git a/third_party/tlslite/tlslite/X509.py b/third_party/tlslite/tlslite/X509.py
index a47ddcfa2a29b46fb86d7505b73a78647ef4bf56..d8b8bccb1414c62093fbfb3e20259ea711bfe2a3 100644
--- a/third_party/tlslite/tlslite/X509.py
+++ b/third_party/tlslite/tlslite/X509.py
@@ -13,11 +13,15 @@ class X509:
@type publicKey: L{tlslite.utils.RSAKey.RSAKey}
@ivar publicKey: The subject public key from the certificate.
+
+ @type subject: L{array.array} of unsigned bytes
+ @ivar subject: The DER-encoded ASN.1 subject distinguished name.
"""
def __init__(self):
self.bytes = createByteArraySequence([])
self.publicKey = None
+ self.subject = None
def parse(self, s):
"""Parse a PEM-encoded X.509 certificate.
@@ -63,6 +67,10 @@ class X509:
else:
subjectPublicKeyInfoIndex = 5
+ #Get the subject
+ self.subject = tbsCertificateP.getChildBytes(\
+ subjectPublicKeyInfoIndex - 1)
+
#Get the subjectPublicKeyInfo
subjectPublicKeyInfoP = tbsCertificateP.getChild(\
subjectPublicKeyInfoIndex)
« no previous file with comments | « third_party/tlslite/tlslite/TLSConnection.py ('k') | third_party/tlslite/tlslite/messages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698