mirror of https://github.com/status-im/migrate.git
`x-tls-cert` and `x-tls-key` must set both.
This commit is contained in:
parent
9d36dd9841
commit
9049e49f9e
|
@ -143,8 +143,8 @@ func (m *Mysql) Open(url string) (database.Driver, error) {
|
|||
}
|
||||
|
||||
clientCert := make([]tls.Certificate, 0, 1)
|
||||
if purl.Query().Get("x-tls-cert") != "" && purl.Query().Get("x-tls-key") != "" {
|
||||
certs, err := tls.LoadX509KeyPair(purl.Query().Get("x-tls-cert"), purl.Query().Get("x-tls-key"))
|
||||
if ccert, ckey := purl.Query().Get("x-tls-cert"), purl.Query().Get("x-tls-key"); ccert != "" || ckey != "" {
|
||||
certs, err := tls.LoadX509KeyPair(ccert, ckey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue