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

Fix SSL EV Plus duplication issue #145

Merged
merged 2 commits into from
Jul 22, 2018
Merged

Fix SSL EV Plus duplication issue #145

merged 2 commits into from
Jul 22, 2018

Conversation

abunashir
Copy link
Member

Currently, the duplication for SSL EV Plus request throws an Invalid DNS name issue. After looking into this we found this interface does not expect us to provide both root and www in the same request, otherwise it won't process that request.

This commit adds simple fix, and it will remove www. from the dns_names list and this should fix the issue for now.

Fixes: #135

Currently, the duplication for SSL EV Plus request throws an
`Invalid DNS name` issue. After looking into this we found this
interface does not expect us to provide both `root` and `www` in
the same request, otherwise it won't process that request.

This commit adds simple fix, and it will remove `www.` from
the `dns_names` list and this should fix the issue for now.

Fixes: 135
@ronaldtse
Copy link
Collaborator

@kwkwan could you help check if this solves the problem? Thanks!

@kwkwan
Copy link
Contributor

kwkwan commented Jul 18, 2018

As the certificate is EV SSL certificate, we should select dns_name starts with “www.” instead of removing it.

dns_names.select{|dns_name| dns_name.match(/^(www.)/) }

Otherwise, it will cause error

order = Digicert::OrderDuplicator.create(order_id: order_id)
Digicert::Errors::RequestError: [{"code"=>"invalid_dns_name_on_duplicate", "message"=>"Invalid DNS name on duplicate request. The DNS names must match what was on the original order."}]

This commit add some changes to the `OrderManager`, so it will
select any subdomains expect the root domain, so it should not
throw the invalid DNS name error on duplication.
@abunashir
Copy link
Member Author

@kwkwan I'm not sure about the complete scenario for other types of duplication or reissue, but I've modified the regex a bit so it selects any subdomains except the root domains, and please let me know if that fixes the issues. Thanks!

@abunashir
Copy link
Member Author

@kwkwan: Merging it for now, but please check it out whenever you have a chance and if necessary then I will add the necessary changes, Thanks!

@abunashir abunashir merged commit abc6386 into master Jul 22, 2018
@abunashir abunashir deleted the fix-ev-plus-dns-issue branch July 22, 2018 14:00
@kwkwan
Copy link
Contributor

kwkwan commented Jul 23, 2018

@abunashir It looks fine. Thanks.

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

Successfully merging this pull request may close these issues.

OrderDuplicator fails on default request due to API issue
3 participants