def signRequest(self, subject): log.msg(format='Signing certificate for %(name)s', name=subject) reqPath = self.csrPath.child(subject) if not reqPath.exists(): raise Exception req = CertificateRequest.loadPEM(reqPath.getContent()) cert = self.cert.signRequestObject(req, genSerial(subject), digestAlgorithm='sha512') certPath = self.publicPath.child(subject) certPath.setContent(cert.dumpPEM()) certPath.chmod(0644) return cert
def submitCertificateRequest(self, request): request = CertificateRequest.loadPEM(request) return (self.store.submitCertificateRequest(request) .addCallback(lambda _: {}))