Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline order duplication flow #102

Open
ronaldtse opened this issue Mar 23, 2017 · 2 comments
Open

Streamline order duplication flow #102

ronaldtse opened this issue Mar 23, 2017 · 2 comments

Comments

@ronaldtse
Copy link
Collaborator

Hi @abunashir ,

Here's the flow that we wish to utilize in our certificate generation code. Could you have a look and see what gaps we still need to fill? Thanks.

order = Digicert::Order.filter(
  common_name: "*.example.com",
  product_type: Digicert::Product::WildcardSsl
)

%(name1 name2).each do |name|

  key = load_key(keypath[name])
  csr = Digicert::Csr.new(
    order: order, # obtain attributes from order that aren't provided here
    key: key # only change the key in this CSR
  )

  duplicate_request = order.duplicate(csr: csr)

  downloaded_certs = duplicate_request.download_certificate(format: "zip")

  root_cert = downloaded_certs[:root]
  intermediate_cert = downloaded_certs[:intermediate]
  cert = downloaded_certs[:cert]
end
@ronaldtse
Copy link
Collaborator Author

@abunashir is this type of flow possible now? Thanks!

@abunashir
Copy link
Member

abunashir commented Jun 15, 2017

@ronaldtse: Not exactly the same way, as we are still using the OpenStruct but we can do that same thing through the find interface and then download the certificate content.

Once we have done this #103 (comment) then we can do it like the above flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants