def certificate_request(self, csr_der, key): logger.info("Preparing and sending CSR..") return { "type": "certificateRequest", "csr": jose.b64encode_url(csr_der), "signature": crypto_util.create_sig(csr_der, self.key_file) }
def authorization_request(req_id, name, server_nonce, responses, key_file): """Create ACME "authorizationRequest" message. :param req_id: TODO :type req_id: TODO :param name: TODO :type name: TODO :param server_nonce: TODO :type server_nonce: TODO :param responses: TODO :type response: TODO :param key_file: TODO :type key_file: TODO :returns: ACME "authorizationRequest" message. :rtype: dict """ return { "type": "authorizationRequest", "sessionID": req_id, "nonce": server_nonce, "responses": responses, "signature": crypto_util.create_sig(name + le_util.jose_b64decode(server_nonce), key_file), }
def authorization_request(req_id, name, server_nonce, responses, key, nonce=None): """Create ACME "authorizationRequest" message. :param str req_id: SessionID from the server challenge :param str name: Hostname :param str server_nonce: Nonce from the server challenge :param list responses: List of completed challenges :param str key: Key in string form. Accepted formats are the same as for `Crypto.PublicKey.RSA.importKey`. :param str nonce: Nonce used for signature. Useful for testing. :returns: ACME "authorizationRequest" message. :rtype: dict """ return { "type": "authorizationRequest", "sessionID": req_id, "nonce": server_nonce, "responses": responses, "signature": crypto_util.create_sig(name + le_util.jose_b64decode(server_nonce), key, nonce), }
def authorization_request(req_id, name, server_nonce, responses, key_file): """Create ACME "authorizationRequest" message. :param req_id: TODO :type req_id: TODO :param name: TODO :type name: TODO :param server_nonce: TODO :type server_nonce: TODO :param responses: TODO :type response: TODO :param key_file: TODO :type key_file: TODO :returns: ACME "authorizationRequest" message. :rtype: dict """ return { "type": "authorizationRequest", "sessionID": req_id, "nonce": server_nonce, "responses": responses, "signature": crypto_util.create_sig( name + le_util.jose_b64decode(server_nonce), key_file), }
def authorization_request(self, id, name, server_nonce, responses): auth_req = {"type":"authorizationRequest", "sessionID":id, "nonce":server_nonce} auth_req["signature"] = crypto_util.create_sig( name + jose.b64decode_url(server_nonce), self.key_file) auth_req["responses"] = responses return auth_req
def authorization_request(self, id, name, server_nonce, responses): auth_req = { "type": "authorizationRequest", "sessionID": id, "nonce": server_nonce } auth_req["signature"] = crypto_util.create_sig( name + jose.b64decode_url(server_nonce), self.key_file) auth_req["responses"] = responses return auth_req
def certificate_request(csr_der, key): """Create ACME "certificateRequest" message. :param str csr_der: DER encoded CSR. :param key: TODO :returns: ACME "certificateRequest" message. :rtype: dict """ return { "type": "certificateRequest", "csr": le_util.jose_b64encode(csr_der), "signature": crypto_util.create_sig(csr_der, key), }
def revocation_request(key_file, cert_der): """Create ACME "revocationRequest" message. :param str key_file: Path to a file containing RSA key. Accepted formats are the same as for `Crypto.PublicKey.RSA.importKey`. :param str cert_der: DER encoded certificate. :returns: ACME "revocationRequest" message. :rtype: dict """ return { "type": "revocationRequest", "certificate": le_util.jose_b64encode(cert_der), "signature": crypto_util.create_sig(cert_der, key_file), }
def revocation_request(cert_der, key, nonce=None): """Create ACME "revocationRequest" message. :param str cert_der: DER encoded certificate. :param str key: Key in string form. Accepted formats are the same as for `Crypto.PublicKey.RSA.importKey`. :param str nonce: Nonce used for signature. Useful for testing. :returns: ACME "revocationRequest" message. :rtype: dict """ return { "type": "revocationRequest", "certificate": le_util.jose_b64encode(cert_der), "signature": crypto_util.create_sig(cert_der, key, nonce), }
def certificate_request(csr_der, key): """Create ACME "certificateRequest" message. :param csr_der: DER encoded CSR. :type csr_der: str :param key: TODO :type key: TODO :returns: ACME "certificateRequest" message. :rtype: dict """ return { "type": "certificateRequest", "csr": le_util.jose_b64encode(csr_der), "signature": crypto_util.create_sig(csr_der, key), }
def revocation_request(key_file, cert_der): """Create ACME "revocationRequest" message. :param key_file: Path to a file containing RSA key. Accepted formats are the same as for `Crypto.PublicKey.RSA.importKey`. :type key_file: str :param cert_der: DER encoded certificate. :type cert_der: str :returns: ACME "revocationRequest" message. :rtype: dict """ return { "type": "revocationRequest", "certificate": le_util.jose_b64encode(cert_der), "signature": crypto_util.create_sig(cert_der, key_file), }
def authorization_request(req_id, name, server_nonce, responses, key, nonce=None): """Create ACME "authorizationRequest" message. :param str req_id: SessionID from the server challenge :param str name: Hostname :param str server_nonce: Nonce from the server challenge :param list responses: List of completed challenges :param str key: Key in string form. Accepted formats are the same as for `Crypto.PublicKey.RSA.importKey`. :param str nonce: Nonce used for signature. Useful for testing. :returns: ACME "authorizationRequest" message. :rtype: dict """ return { "type": "authorizationRequest", "sessionID": req_id, "nonce": server_nonce, "responses": responses, "signature": crypto_util.create_sig( name + le_util.jose_b64decode(server_nonce), key, nonce), }
def _call(self, *args, **kwargs): from letsencrypt.client.crypto_util import create_sig return create_sig(*args, **kwargs)
def certificate_request(self, csr_der, key): logger.info("Preparing and sending CSR..") return {"type":"certificateRequest", "csr":jose.b64encode_url(csr_der), "signature":crypto_util.create_sig(csr_der, self.key_file)}
def revocation_request(self, key_file, cert_der): return {"type":"revocationRequest", "certificate":jose.b64encode_url(cert_der), "signature":crypto_util.create_sig(cert_der, key_file)}
def revocation_request(self, key_file, cert_der): return { "type": "revocationRequest", "certificate": jose.b64encode_url(cert_der), "signature": crypto_util.create_sig(cert_der, key_file) }