code: def signCertAs(self, cert, signas):
          '''
          Signs a certificate with a CA keypair.
  
          Args:
              cert (OpenSSL.crypto.X509): The certificate to sign.
              signas (str): The CA keypair name to sign the new keypair with.
  
          Examples:
              Sign a certificate with the CA "myca":
  
                  cdir.signCertAs(mycert, 'myca')
  
          Returns:
              None
          '''
          cakey = self.getCaKey(signas)
          if cakey is None:
              raise s_exc.NoCertKey('Missing .key for %s' % signas)
          cacert = self.getCaCert(signas)
          if cacert is None:
              raise s_exc.NoCertKey('Missing .crt for %s' % signas)
  
          cert.set_issuer(cacert.get_subject())
          cert.sign(cakey, self.signing_digestf signCertAs(self, cert, signas):
          '''
          Signs a certificate with a CA keypair.
  
          Args:
              cert (OpenSSL.crypto.X509): The certificate to sign.
              signas (str): The CA keypair name to sign the new keypair with.
  
          Examples:
              Sign a certificate with the CA "myca":
  
                  cdir.signCertAs(mycert, 'myca')
  
          Returns:
              None
          '''
          cakey = self.getCaKey(signas)
          if cakey is None:
              raise s_exc.NoCertKey('Missing .key for %s' % signas)
          cacert = self.getCaCert(signas)
          if cacert is None:
              raise s_exc.NoCertKey('Missing .crt for %s' % signas)
  
          cert.set_issuer(cacert.get_subject())
          cert.sign(cakey, self.signing_digest)
docs: Signs a certificate with a CA keypair.
  
          Args:
              cert (OpenSSL.crypto.X509): The certificate to sign.
              signas (str): The CA keypair name to sign the new keypair with.
  
          Examples:
              Sign a certificate with the CA "myca":
  
                  cdir.signCertAs(mycert, 'myca')
  
          Returns:
              None