mirror of https://github.com/jackc/pgx.git
Run go fmt
parent
cdd2cc4124
commit
69b99209fb
|
@ -715,16 +715,16 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P
|
|||
if x509.IsEncryptedPEMBlock(block) {
|
||||
// Attempt decryption with pass phrase
|
||||
// NOTE: only supports RSA (PKCS#1)
|
||||
if(sslpassword != ""){
|
||||
if sslpassword != "" {
|
||||
decryptedKey, decryptedError = x509.DecryptPEMBlock(block, []byte(sslpassword))
|
||||
}
|
||||
//if sslpassword not provided or has decryption error when use it
|
||||
//try to find sslpassword with callback function
|
||||
if (sslpassword == "" || decryptedError!= nil) {
|
||||
if(parseConfigOptions.GetSSLPassword != nil){
|
||||
if sslpassword == "" || decryptedError != nil {
|
||||
if parseConfigOptions.GetSSLPassword != nil {
|
||||
sslpassword = parseConfigOptions.GetSSLPassword(context.Background())
|
||||
}
|
||||
if(sslpassword == ""){
|
||||
if sslpassword == "" {
|
||||
return nil, fmt.Errorf("unable to find sslpassword")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package pgconn
|
||||
|
|
Loading…
Reference in New Issue