Skip to content

Commit

Permalink
fix: cfssl provider support SAN URI
Browse files Browse the repository at this point in the history
  • Loading branch information
mayocream authored Dec 9, 2020
1 parent a538700 commit 763faa7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transport/ca/cfssl_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,17 @@ func (cap *CFSSL) SignCSR(csrPEM []byte) (cert []byte, err error) {
return nil, err
}

hosts := make([]string, len(csr.DNSNames), len(csr.DNSNames)+len(csr.IPAddresses))
hosts := make([]string, len(csr.DNSNames), len(csr.DNSNames)+len(csr.IPAddresses)+len(csr.URIs))
copy(hosts, csr.DNSNames)

for i := range csr.IPAddresses {
hosts = append(hosts, csr.IPAddresses[i].String())
}

for i := range csr.URIs {
hosts = append(hosts, csr.URIs[i].String())
}

sreq := &signer.SignRequest{
Hosts: hosts,
Request: string(csrPEM),
Expand Down

0 comments on commit 763faa7

Please sign in to comment.