-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add subject_alt_names
kwarg to Cert.generate
#463
Add subject_alt_names
kwarg to Cert.generate
#463
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think subject_alt_names
should accept an Array of IP or hostname Strings, and have them be mapped to "DNS:..."
or "IP:..."
.
@@ -356,6 +357,11 @@ def self.generate(version: 2, | |||
else cert.subject | |||
end | |||
|
|||
if subject_alt_names | |||
extensions ||= {} | |||
extensions = extensions.merge('subjectAltName' => subject_alt_names.join(', ')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, depends if we want to accept raw subject-alt-name values or IP/hostname Strings. If we accept IP/hostname strings, then we'd want to check if the string is an IP address, and map it to either "DNS:#{value}"
or "IP:#{value}"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be rebased off of the 1.1.0
branch. New features should always go into a the next minor version branch.
#445