Fix error messages for consistency in ca.go and certdb.go
This commit is contained in:
@@ -98,7 +98,7 @@ func SaveCAState() error {
|
||||
// UpdateCAStateAfterIssue updates the CA state JSON after issuing a certificate
|
||||
func (s *CAState) UpdateCAStateAfterIssue(serialType, name string, subject string, certType string, serialNumber any, validity time.Duration) error {
|
||||
if s == nil {
|
||||
return fmt.Errorf("CAState is nil in UpdateCAStateAfterIssue. This indicates a programming error.")
|
||||
return fmt.Errorf("CAState is nil in UpdateCAStateAfterIssue. This indicates a programming error")
|
||||
}
|
||||
issued := time.Now().UTC().Format(time.RFC3339)
|
||||
expires := time.Now().Add(validity).UTC().Format(time.RFC3339)
|
||||
@@ -135,7 +135,7 @@ func (s *CAState) AddCertificate(name, subject, certType, issued, expires, seria
|
||||
// RevokeCertificate revokes a certificate by serial number and reason code, updates state, and saves to disk
|
||||
func (s *CAState) RevokeCertificate(serial string, reason int) error {
|
||||
if s == nil {
|
||||
return fmt.Errorf("CAState is nil in RevokeCertificate. This indicates a programming error.")
|
||||
return fmt.Errorf("CAState is nil in RevokeCertificate. This indicates a programming error")
|
||||
}
|
||||
revoked := false
|
||||
revokedAt := time.Now().UTC().Format(time.RFC3339)
|
||||
|
||||
Reference in New Issue
Block a user