-
Notifications
You must be signed in to change notification settings - Fork 114
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
Use output
to save client cert file locally
#79
Conversation
Break condition was trying to match an empty array with nil This resulted in no break condition and the error working down to `error during PEM decoding` Instead match on an empty length Signed-off-by: Luke Hinds <lhinds@redhat.com>
Start to user the output flag to allow users to save the Client Cert locally Signed-off-by: Luke Hinds <lhinds@redhat.com>
Signed-off-by: Luke Hinds <lhinds@redhat.com>
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.
no need to redo the PEM decode/encode as it is done above.
break | ||
} | ||
certDer, restBytes := pem.Decode(remaining) | ||
|
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.
nit: maybe the extra line should be in line 53
if len(remaining) == 0 {
break
}
certDer, restBytes := pem.Decode(remaining)
if certDer == nil {
return nil, errors.New("error during PEM decoding")
}
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.
lgtm, a non tiny comment
Co-authored-by: Bob Callaway <bobcallaway@users.noreply.github.com>
Co-authored-by: Bob Callaway <bobcallaway@users.noreply.github.com>
Co-authored-by: Bob Callaway <bobcallaway@users.noreply.github.com>
Signed-off-by: Luke Hinds <lhinds@redhat.com>
Signed-off-by: Luke Hinds <lhinds@redhat.com>
should be good now @cpanato / @bobcallaway , DCO failure is from accepting bobs commits in the gui. |
Use
output
to save client cert file locallyThis PR is based on top of #78