Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
adavis10006 committed Feb 24, 2020
1 parent 5bb7973 commit affc9f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,11 @@ func (c *Config) validate() error {
}
if cachedPinPath, exist := slotMap[key.SlotNumber]; exist && key.UserPinPath != cachedPinPath {
return fmt.Errorf("key %q: unmatched pin code path for slot number #%d", key.Identifier, key.SlotNumber)
} else if !exist {
slotMap[key.SlotNumber] = key.UserPinPath
}
slotMap[key.SlotNumber] = key.UserPinPath

if key.CreateCACertIfNotExist && key.X509CACertLocation == "" {
return fmt.Errorf("key %q: key will create CA cert if not exist but X509CACertLocation is not specified", key.Identifier)
return fmt.Errorf("key %q: CA cert is supposed to be created if it doesn't exist but X509CACertLocation is not specified", key.Identifier)
}

if key.KeyType < crypki.RSA || key.KeyType > crypki.ECDSA {
Expand Down

0 comments on commit affc9f0

Please sign in to comment.