mirror of
https://github.com/Luzifer/vault-openvpn.git
synced 2024-11-09 16:50:04 +00:00
revoke all existing certificates for FQDN instead of only first one
This commit is contained in:
parent
06a6e462da
commit
2854879219
1 changed files with 4 additions and 1 deletions
5
main.go
5
main.go
|
@ -370,7 +370,10 @@ func revokeCertificateByFQDN(fqdn string) error {
|
||||||
|
|
||||||
for _, cert := range certs {
|
for _, cert := range certs {
|
||||||
if cert.Subject.CommonName == fqdn {
|
if cert.Subject.CommonName == fqdn {
|
||||||
return revokeCertificateBySerial(certutil.GetHexFormatted(cert.SerialNumber.Bytes(), ":"))
|
err := revokeCertificateBySerial(certutil.GetHexFormatted(cert.SerialNumber.Bytes(), ":"))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue