Fixes to the documentation. Added missing --revoked logic for the list command.
Some checks failed
Release / release (push) Failing after 53s
Some checks failed
Release / release (push) Failing after 53s
This commit is contained in:
14
ca.go
14
ca.go
@@ -460,9 +460,19 @@ func issueSingleCertificate(def CertificateDefinition, i int, n int) (bool, erro
|
||||
return false, fmt.Errorf("certificate name must be specified and contain only letters, numbers, dash, or underscore")
|
||||
}
|
||||
|
||||
// Check if the certificate is in database, fail if it is.
|
||||
// Check if the certificate is in database, skip if it already exists and is valid.
|
||||
if caState.FindByName(def.Name, false) != nil {
|
||||
return false, fmt.Errorf("certificate %s already exists and is valid", def.Name)
|
||||
if !dryRun {
|
||||
fmt.Printf("skipped (already exists).\n")
|
||||
} else {
|
||||
msg := fmt.Sprintf("Certificate '%s' already exists and is valid (would skip).", def.Name)
|
||||
if n > 1 {
|
||||
fmt.Printf("[%d/%d] %s\n", i+1, n, msg)
|
||||
} else {
|
||||
fmt.Printf("%s\n", msg)
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// Initialize Subject if not specified
|
||||
|
||||
Reference in New Issue
Block a user