request_issuance Accept and Content-Type

This commit is contained in:
Jakub Warmuz 2015-03-25 06:10:38 +00:00
parent 66bc89f186
commit 3786170a89
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA

View file

@ -243,10 +243,14 @@ class Network(object):
# TODO: assert len(authzrs) == number of SANs
req = messages2.CertificateRequest(
csr=csr, authorizations=tuple(authzr.uri for authzr in authzrs))
content_type = 'application/plix-cert' # TODO: add 'cert_type 'argument
response = self._post(
authzrs[0].new_cert_uri, # TODO: acme-spec #90
self._wrap_in_jws(req))
# assert content-type: application/pkix-cert
self._wrap_in_jws(req),
content_type=content_type,
headers={'Accept': content_type})
return messages2.CertificateResource(
authzrs=authzrs,
body=M2Crypto.X509.load_cert_der_string(response.text),