You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like "func WithClientCertificateFile(certPath, keyPath string) Option" it would be nice to be able to load cert/key to X509 identity:
WithX509Identity(CertPath, keyPath) Option
Is it a rapid alternative to load cert/key ?
Thank's
The text was updated successfully, but these errors were encountered:
I found how (but I must cast []byte to ua.ByteString?):
cert, err := tls.LoadX509KeyPair("./loki.crt", "./loki.pem")
if err != nil {
fmt.Printf("Error opening certs. %s\n", err.Error())
}
localCertificate := cert.Certificate[0]
localPrivateKey, _ := cert.PrivateKey.(*rsa.PrivateKey)
// open a connection to server running locally
ch, err := client.Dial(
ctx,
"opc.tcp://localhost.localdomain:48010",
client.WithClientCertificate(localCertificate, localPrivateKey),
client.WithInsecureSkipVerify(), // skips verification of server certificate
client.WithX509Identity(**ua.ByteString(**localCertificate), localPrivateKey),
Like "func WithClientCertificateFile(certPath, keyPath string) Option" it would be nice to be able to load cert/key to X509 identity:
WithX509Identity(CertPath, keyPath) Option
Is it a rapid alternative to load cert/key ?
Thank's
The text was updated successfully, but these errors were encountered: