I have this code:
package main
import (
_ "crypto/dsa"
"crypto/tls"
"fmt"
"io"
"net/http"
"os"
"time"
)
func main() {
url := "https://10.11.183.9:1002/xmlinterface.asmx/CheckPSAccountBalance?id=AAA¤cy=810"
trSkipVerify := &http.Transport{
MaxIdleConnsPerHost: 10,
TLSClientConfig: &tls.Config{
MinVersion: tls.VersionSSL30,
MaxVersion: tls.VersionTLS10,
PreferServerCipherSuites: true,
InsecureSkipVerify: true,
},
}
client := http.Client{
Timeout: 15 * time.Second,
Transport: trSkipVerify,
}
resp, err := client.Get(url)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
io.Copy(os.Stdout, resp.Body)
}
and when i run it, i got following error message:
tls: server's certificate contains an unsupported type of public key: *dsa.PublicKey
here i found the point: https://golang.org/src/crypto/tls/handshake_client.go switch certs[0].PublicKey.(type) {
by default tls client doesn't have support for dsa public key type. What can I do to solve this issue? The url above, that i'm trying to do requests is third party provider and here isn't any opportunities to do some changes on that side.
Thanks.