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

2nd try: Adds out-name cli option #54

Closed
wants to merge 1 commit into from

Conversation

mcpride
Copy link

@mcpride mcpride commented Apr 24, 2018

Pull request #52 was closed because I made a lot of changes in cloned master while this request was open. Sorry for that! So this is the next try - now based on a branch. You can decide if it is worth to merge. I made my changes in my clone of your great work now (also experimental PFX export).

Original comment of #52:

I needed such a solution for better script processing with predefined output names (which can differ from cn or domain)

@mcpride mcpride mentioned this pull request Apr 24, 2018
@@ -82,6 +83,9 @@ func newCertAction(c *cli.Context) {
}

formattedName := strings.Replace(name, " ", "_", -1)
if c.IsSet("out-name") {
formattedName = strings.Replace(c.String("out-name"), " ", "_", -1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the string replace is potentially confusing and we should omit it. Just do formattedName = out-name. If the user specifies an out-name, we should use it directly.

@@ -46,6 +46,7 @@ func NewCertRequestCommand() cli.Command {
cli.StringFlag{"ip", "", "IP address entries for subject alt name (comma separated)", ""},
cli.StringFlag{"domain", "", "DNS entries for subject alt name (comma separated)", ""},
cli.StringFlag{"key", "", "Path to private key PEM file. If blank, will generate new keypair.", ""},
cli.StringFlag{"out-name, on", "", "Name for output files without path and extension. If blank, Common name will be used.", ""},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer out to on

@bootstraponline bootstraponline mentioned this pull request Jun 9, 2018
@mcpherrinm
Copy link
Contributor

there's a few review issues that are lingering here, so we're tackling this in a slightly different way in #81

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.

None yet

2 participants