mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 13:36:02 +03:00
[GH-ISSUE #318] Cannot sign csr get panic error #204
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#204
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @symgryph on GitHub (Dec 3, 2020).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/318
I generated a csr on an appliance I use, and when I use the following:
I get:
@Vaka82 commented on GitHub (Dec 7, 2020):
Same issue - Any suggestions..?
@Vaka82 commented on GitHub (Dec 8, 2020):
It's panicking @ the below code as hosts slice is empty -
Adding this before that fileNames call seem to fix this issue for me.
if len(hosts) == 0 {
hosts = []string{csr.Subject.CommonName}
}
@gergelyzs commented on GitHub (Feb 24, 2021):
i have found the same issue. I believe it is because the CSR has no SAN. If you can modify your CSR, it's easy enough to circumvent. I seem to remember that having no SAN is deprecated, so this is not entirely unexpected. For me, the CSR is coming from an old iDRAC, so no way I can change it.
Fix works because it reads the CN. @Vaka82 care to make a PR?
@adippel commented on GitHub (Nov 4, 2021):
+1 encountered this just recently. dont know if using CN is the right way since using CN for domain names is not the right way. At least replacing the meaningless panic is a must.
@FiloSottile commented on GitHub (Apr 25, 2022):
Fixed, thank you for the report. The feature to use the CN if there were no SANs was already there, but then it was trying to print the hosts from the CSR instead of the generated certificate.