Fix challenge bdd tests

This commit is contained in:
Fang-Pen Lin
2025-11-11 21:24:47 -08:00
parent a19c840060
commit f14df38eaa
2 changed files with 15 additions and 3 deletions

View File

@@ -389,6 +389,15 @@ def step_impl(context: Context, url: str):
send_raw_acme_req(context, url)
@then(
"I encode CSR {pem_var} as JOSE Base-64 DER as {var_name}",
)
def step_impl(context: Context, pem_var: str, var_name: str):
csr = eval_var(context, pem_var)
parsed_csr = x509.load_pem_x509_csr(csr)
context.vars[var_name] = json_util.encode_csr(parsed_csr)
@then(
"I submit the certificate signing request PEM {pem_var} certificate order to the ACME server as {order_var}"
)