Ejemplo n.º 1
0
 def set_dn(self, dn):
     if isinstance(dn, X509.X509_Name):
         self._certificate.set_subject_name(dn)
     elif isinstance(dn, str):
         self._certificate.set_subject_name(_build_name_from_string(dn))
     else:
         raise ValueError('WFT')
Ejemplo n.º 2
0
 def set_issuer_name(self, name):
     """set the certificate issuer name"""
     if isinstance(name, X509.X509_Name):
         self._certificate.set_issuer_name(name)
     elif isinstance(name, str):
         self._certificate.set_issuer_name(_build_name_from_string(name))
     else:
         raise ValueError('WFT')
Ejemplo n.º 3
0
    def set_dn(self, dn):
        """
        set the dn of the certificate request

        :param dn: either a string or an X509_Name object
        """

        if isinstance(dn, X509.X509_Name):
            self._request.set_subject_name(dn)
        elif isinstance(dn, str):
            self._request.set_subject_name(_build_name_from_string(dn))
        else:
            raise ValueError('WFT')
        self._signed = False