I have a site which usage certs as credentials, when I am using curl to make request getting success…
curl --cert cert.pem --key key.pem --url ‘https://test’ -v\n
but my go program keep failing and says bad credentials…
not sure what else to do to make it success. tried below code, no success.
Any help would be highly appreciated.
error message : 401 - Unauthorized: Access is denied due to invalid credentials.
Curl command works and get the requested data without any issue. Problem is only in Golang.
ncw
(Nick Craig-Wood)
3
Where is the CA in that curl
call? Is it embedded into the cert.pem
? If so separate it out into its own file for the Go program.
Thanks, yes it is reading from my mac book /etc/ssl/cert.pem. let me try. @ncw
1 Like
system
(system)
Closed
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.