Skip to content

Commit

Permalink
tls: fix typo, use clientCertSearchPath for clientcert.pem (#940)
Browse files Browse the repository at this point in the history
`clientcert.pem` is located in `/etc/pki/libvirt/clientcert.pem` as per
https://www.libvirt.org/tlscerts.html

Fixes

```go
level=error msg="Error: failed to dial libvirt: can't locate resource 'clientcert.pem' in [/home/kni/.pki/libvirt /etc/pki/libvirt/private]: file does not exist"
```
  • Loading branch information
rbbratta committed Dec 27, 2022
1 parent 105ef85 commit 4c7182d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libvirt/uri/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (u *ConnectionURI) tlsConfig() (*tls.Config, error) {
// non-root also looks in $HOME/.pki first
if !root {
caCertSearchPath = append([]string{os.ExpandEnv(defaultUserPKIPath)}, caCertSearchPath...)
clientCertSearchPath = append([]string{os.ExpandEnv(defaultUserPKIPath)}, clientKeySearchPath...)
clientCertSearchPath = append([]string{os.ExpandEnv(defaultUserPKIPath)}, clientCertSearchPath...)
clientKeySearchPath = append([]string{os.ExpandEnv(defaultUserPKIPath)}, clientKeySearchPath...)
}
}
Expand Down

0 comments on commit 4c7182d

Please sign in to comment.