Skip to content

Commit

Permalink
Merge pull request #5066 from jtschladen/convert-csr-to-string
Browse files Browse the repository at this point in the history
Convert CSR to string
  • Loading branch information
jtschladen authored Jan 13, 2025
2 parents f00b32b + ba5c910 commit 960f8fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lemur/plugins/lemur_acme/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from lemur.dns_providers import service as dns_provider_service
from lemur.exceptions import InvalidConfiguration
from lemur.extensions import metrics

from lemur.plugins import lemur_acme as acme
from lemur.plugins.bases import IssuerPlugin
from lemur.plugins.lemur_acme.acme_handlers import AcmeHandler, AcmeDnsHandler
Expand Down Expand Up @@ -192,7 +191,10 @@ def get_ordered_certificates(self, pending_certs):
self.acme.autodetect_dns_providers(domain)

try:
order = acme_client.new_order(pending_cert.csr)
csr = pending_cert.csr
if isinstance(csr, str):
csr = csr.encode("ascii")
order = acme_client.new_order(csr)
except WildcardUnsupportedError:
capture_exception()
metrics.send(
Expand Down

0 comments on commit 960f8fe

Please sign in to comment.