Hello

tnx for help.

I tried like:

    tlsConfig := &tls.Config{
        Certificates: []tls.Certificate{cert},
        RootCAs: caCertPool,
        InsecureSkipVerify: false,
    }

    //tlsConfig.BuildNameToCertificate()
    transport := &http.Transport{TLSClientConfig: tlsConfig}
    client := &http.Client{Transport: transport}

but it is the same thing. What about GetClientCertificate() config, how to
use, should this help?
// GetClientCertificate, if not nil, is called when a server requests a
// certificate from a client. If set, the contents of Certificates will
// be ignored.



V V pon., 19. feb. 2018 ob 09:33 je oseba Jakob Borg <ja...@kastelo.net>
napisala:

> Try without using Config.BuildNameToCertificate. That’s a server side
> thing and I doubt it does what you want on the client side.
>
> //jb
>
> On 16 Feb 2018, at 14:41, mzou...@gmail.com wrote:
>
> Hello
>
> this is my code:
> https://play.golang.org/p/yxhYXEVMPjB
>
>
> I got certificate in pfx format, I extraced client, CA, private
> certificate which i imported in my program.
> # Extract Public Key (ask for password)
> openssl pkcs12 -in file.pfx -out file_public.pem -clcerts -nokeys
>
> # Extract Certificate Authority Key (ask for password)
> openssl pkcs12 -in file.pfx -out file_ca.pem -cacerts -nokeys
>
> # Extract Private Key (ask for password)
> openssl pkcs12 -in file.pfx -out file_private.pem -nocerts -nodes
>
>
> I need to send certificate in request to server but the thing is that i
> get from server that certificate is not included in request. I did trace
> also with WireShark and there is no certificate appanded in request.
>
>
> Thank you for all your help!
> miha
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to