mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
More for new order
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
Feature: New Order
|
||||
|
||||
Scenario: Create a new order
|
||||
# Given I have an ACME cert profile as "acme_profile"
|
||||
# When I have an ACME client connecting to {BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/directory
|
||||
Given I have an ACME cert profile as "acme_profile"
|
||||
When I have an ACME client connecting to {BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/directory
|
||||
# # TODO: make it I have an account already instead?
|
||||
# Then I register a new ACME account with email [email protected] and EAB key id {acme_profile.eab_kid} with secret {acme_profile.eab_secret} as acme_account
|
||||
Then I register a new ACME account with email fangpen@infisical.com and EAB key id {acme_profile.eab_kid} with secret {acme_profile.eab_secret} as acme_account
|
||||
When I create certificate signing request as csr
|
||||
Then I add names to certificate signing request csr
|
||||
"""
|
||||
@@ -15,3 +15,4 @@ Feature: New Order
|
||||
"""
|
||||
Then I create a RSA private key pair as cert_key
|
||||
Then I sign the certificate signing request csr with private key cert_key and output it as csr_pem in PEM format
|
||||
Then I submit the certificate signing request PEM csr_pem certificate order to the ACME server
|
||||
|
||||
@@ -98,6 +98,13 @@ def step_impl(context: Context, email: str, kid: str, secret: str, account_var:
|
||||
context.vars[account_var] = context.acme_client.new_account(registration)
|
||||
|
||||
|
||||
@then(
|
||||
"I submit the certificate signing request PEM {pem_var} certificate order to the ACME server"
|
||||
)
|
||||
def step_impl(context: Context, pem_var: str):
|
||||
context.acme_order = context.acme_client.new_order(context.vars[pem_var])
|
||||
|
||||
|
||||
@when("I create certificate signing request as {csr_var}")
|
||||
def step_impl(context: Context, csr_var: str):
|
||||
context.vars[csr_var] = x509.CertificateSigningRequestBuilder()
|
||||
@@ -144,5 +151,4 @@ def step_impl(context: Context, csr_var: str, pk_var: str, pem_var: str):
|
||||
context.vars[csr_var]
|
||||
.sign(context.vars[pk_var], hashes.SHA256())
|
||||
.public_bytes(serialization.Encoding.PEM)
|
||||
.decode("utf-8")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user