def requestCert(config): subject = config['subject'] path = config['path'] store = yield config.parent.storeDeferred key = KeyPair.loadPEM(path.getContent()) req = generateCertificateRequest(key, subject) yield store.submitCertificateRequest(req)
def fromFilePath(cls, filePath): privatePath = filePath.child('private') publicPath = filePath.child('public') csrPath = filePath.child('csr') issuerPath = filePath.child('issuer') if issuerPath.exists(): issuer = issuerPath.getContent() key = KeyPair.loadPEM(privatePath.child(issuer).getContent()) cert = Certificate.loadPEM(publicPath.child(issuer).getContent()) store = cls(publicPath, privatePath, csrPath, key, cert, issuer) return store