mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
Accept --csr PEMFILE
* Closes: #1082 #1935 * Also produce better errors if SANs are missing, though not yet fixing #1076
This commit is contained in:
@@ -195,7 +195,8 @@ class Client(object):
|
||||
else:
|
||||
self.auth_handler = None
|
||||
|
||||
def obtain_certificate_from_csr(self, domains, csr):
|
||||
def obtain_certificate_from_csr(self, domains, csr,
|
||||
typ=OpenSSL.crypto.FILETYPE_ASN1):
|
||||
"""Obtain certificate.
|
||||
|
||||
Internal function with precondition that `domains` are
|
||||
@@ -223,8 +224,8 @@ class Client(object):
|
||||
|
||||
authzr = self.auth_handler.get_authorizations(domains)
|
||||
certr = self.acme.request_issuance(
|
||||
jose.ComparableX509(OpenSSL.crypto.load_certificate_request(
|
||||
OpenSSL.crypto.FILETYPE_ASN1, csr.data)),
|
||||
jose.ComparableX509(
|
||||
OpenSSL.crypto.load_certificate_request(typ, csr.data)),
|
||||
authzr)
|
||||
return certr, self.acme.fetch_chain(certr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user