mirror of
https://tildegit.org/solderpunk/gemcert
synced 2024-11-23 00:32:08 +01:00
Allow setting CN of client certs, for apps which use it for usenames.
This commit is contained in:
parent
4fd7d4d9be
commit
2357f81d67
8
main.go
8
main.go
@ -90,8 +90,12 @@ func getServerCertTemplate(domain string, notBefore time.Time, notAfter time.Tim
|
||||
return template
|
||||
}
|
||||
|
||||
func getClientCertTemplate(domain string, notBefore time.Time, notAfter time.Time) x509.Certificate {
|
||||
return getCommonCertTemplate(notBefore, notAfter)
|
||||
func getClientCertTemplate(cn string, notBefore time.Time, notAfter time.Time) x509.Certificate {
|
||||
template := getCommonCertTemplate(notBefore, notAfter)
|
||||
template.Subject = pkix.Name{
|
||||
CommonName: cn,
|
||||
}
|
||||
return template
|
||||
}
|
||||
|
||||
func getCommonCertTemplate(notBefore time.Time, notAfter time.Time) x509.Certificate {
|
||||
|
Loading…
Reference in New Issue
Block a user