Skip to content

Commit

Permalink
fix validation according to PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
realmgic committed Oct 5, 2023
1 parent 5f164c2 commit 9dcf080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ func newObserver(server *aero.Host, user, pass string) (o *Observer, err error)
case "external":
clientPolicy.AuthMode = aero.AuthModeExternal
case "pki":
if len(config.Aerospike.RootCA) == 0 || len(config.Aerospike.CertFile) == 0 || len(config.Aerospike.KeyFile) == 0 {
log.Fatalln("Invalid certificate configuration when using auth mode PKI: cert_file, key_file, root_ca must be set")
if len(config.Aerospike.CertFile) == 0 || len(config.Aerospike.KeyFile) == 0 {
log.Fatalln("Invalid certificate configuration when using auth mode PKI: cert_file and key_file must be set")
}
clientPolicy.AuthMode = aero.AuthModePKI
default:
Expand Down

0 comments on commit 9dcf080

Please sign in to comment.