Example #1
0
 def load(self):
     cert = crypto.load_certificate(crypto.FILETYPE_PEM, read(self.pem))
     key = crypto.load_privatekey(crypto.FILETYPE_PEM, read(self.key),
                                  b(self.parent.password))
     subject = cert.get_subject()
     self.dn = DistinguishedName(subject.commonName,
                                 subject.organizationalUnitName,
                                 subject.organizationName,
                                 subject.localityName,
                                 subject.stateOrProvinceName,
                                 subject.countryName, subject.emailAddress)
     return self.init(key, cert)
 def load(self):
     subject = self.toText()
     self.dn = DistinguishedName.parse(subject[subject.find(":") + 1:subject.find("\n")].strip())
     return self
 def load(self):
     subject = d(self.openSSL("x509", "-noout", "-subject"))
     if subject:
         self.dn = DistinguishedName.parse(subject[subject.find("=") +
                                                   1:].replace("/", ","))
     return self
 def load(self):
     subject = self.toText()
     self.dn = DistinguishedName.parse(subject[subject.find(":") + 1:subject.find("\n")].strip())
     return self
 def load(self):
     subject = d(self.openSSL("x509", "-noout", "-subject"))
     if subject:
         self.dn = DistinguishedName.parse(subject[subject.find("=") + 1:].replace("/", ","))
     return self