Skip to content

Commit

Permalink
nss functions: don't block on error
Browse files Browse the repository at this point in the history
  • Loading branch information
Thykof committed Dec 19, 2023
1 parent 049d105 commit feb50b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/nss/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ func NewManager(dbPath []string, certutil CertUtilServicer, logger Logger) *Mana

// executeOnPaths executes the given operation on each NSS database path.
func (m *Manager) executeOnPaths(operation func(path string) error) error {
var totalErr error

for _, path := range m.dbPath {
if err := operation(path); err != nil {
return err
totalErr = fmt.Errorf("%w\n%w", totalErr, err)
}
}

return nil
return totalErr
}

// AddCA adds the certificate to the NSS databases.
Expand Down

0 comments on commit feb50b1

Please sign in to comment.