Example #1
0
 def getCertificate(self):
     """
     @summary: generate proprietary certificate from rsa public key
     """
     certificate = gcc.ProprietaryServerCertificate()
     certificate.PublicKeyBlob.modulus.value = rsa.int2bytes(self._rsaPublicKey.n)[::-1]
     certificate.PublicKeyBlob.pubExp.value = self._rsaPublicKey.e
     certificate.sign()
     return gcc.ServerCertificate(certificate)
Example #2
0
 def getCertificate(self):
     """
     @summary: generate proprietary certificate from rsa public key
     """
     certificate = gcc.ProprietaryServerCertificate()
     certificate.PublicKeyBlob.modulus.value = rsa.int2bytes(self._rsaPublicKey.n)[::-1]
     certificate.PublicKeyBlob.pubExp.value = self._rsaPublicKey.e
     certificate.sign()
     return gcc.ServerCertificate(certificate)