-
Notifications
You must be signed in to change notification settings - Fork 252
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 URI capability to SplitSANs method #305
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.
Looks ok but can you add a test with a uuid urn like:
urn:uuid:ddfe62ba-7e99-4bc1-83b3-8f57fe3e9959
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.
Prepend the generated uri. The rest looks ok.
command/ssh/certificate.go
Outdated
template := &x509.CertificateRequest{ | ||
Subject: csr.Subject, | ||
DNSNames: csr.DNSNames, | ||
IPAddresses: csr.IPAddresses, | ||
EmailAddresses: csr.EmailAddresses, | ||
URIs: []*url.URL{uri}, | ||
URIs: append(csr.URIs, uri), |
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.
Prepend the generated uri. There is code that expects the uuid URI to be the first one.
dnsNames = append(dnsNames, san) | ||
} else { | ||
uris = append(uris, u) | ||
} |
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 is probably not strictly ok, but I think it is good enough.
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.
yeah, I wasn't sure what the right answer was. 🤷♂️ If / when people complain, we'll fix it.
go.mod
Outdated
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e | ||
gopkg.in/square/go-jose.v2 v2.4.0 | ||
howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5 // indirect | ||
) | ||
|
||
// replace github.com/smallstep/certificates => ../certificates | ||
replace github.com/smallstep/certificates => ../certificates |
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.
Make sure to change this.
No description provided.