Golang httpClient CA certificates default location?
I have a go
program that connects to an internal API using the httpClient
(it's all generated by swagger-codegen
).
The internal API is using https
and internal certificates with our internal CA.
On my Windows laptop, it works fine without specifying any CA.
On a Linux server, it fails with a x509: certificate signed by unknown authority
error.
I believe our Windows corporate laptops have CA installed by default, and that golang
is able to get those CA without any config.
Hence i would like to know where is go
checking for CAs on both Linux and Windows, so i could compare the setup between both OSes and install the correct CA on Linux.
windows ssl go ca
add a comment |
I have a go
program that connects to an internal API using the httpClient
(it's all generated by swagger-codegen
).
The internal API is using https
and internal certificates with our internal CA.
On my Windows laptop, it works fine without specifying any CA.
On a Linux server, it fails with a x509: certificate signed by unknown authority
error.
I believe our Windows corporate laptops have CA installed by default, and that golang
is able to get those CA without any config.
Hence i would like to know where is go
checking for CAs on both Linux and Windows, so i could compare the setup between both OSes and install the correct CA on Linux.
windows ssl go ca
1
Linux certs locations are defined here golang.org/src/crypto/x509/root_linux.go
– Mukesh Sharma
Nov 23 '18 at 9:57
Thanks, i found this in another answer, and the ones for Windows here: golang.org/src/crypto/x509/root_windows.go
– Gauthier
Nov 23 '18 at 10:00
1
Possible duplicate of Where is Golang picking up root CAs from?
– Mukesh Sharma
Nov 23 '18 at 10:02
yes, as stated in the answer, but it's only for Linux whereas i was also asking for Windows
– Gauthier
Nov 23 '18 at 10:05
add a comment |
I have a go
program that connects to an internal API using the httpClient
(it's all generated by swagger-codegen
).
The internal API is using https
and internal certificates with our internal CA.
On my Windows laptop, it works fine without specifying any CA.
On a Linux server, it fails with a x509: certificate signed by unknown authority
error.
I believe our Windows corporate laptops have CA installed by default, and that golang
is able to get those CA without any config.
Hence i would like to know where is go
checking for CAs on both Linux and Windows, so i could compare the setup between both OSes and install the correct CA on Linux.
windows ssl go ca
I have a go
program that connects to an internal API using the httpClient
(it's all generated by swagger-codegen
).
The internal API is using https
and internal certificates with our internal CA.
On my Windows laptop, it works fine without specifying any CA.
On a Linux server, it fails with a x509: certificate signed by unknown authority
error.
I believe our Windows corporate laptops have CA installed by default, and that golang
is able to get those CA without any config.
Hence i would like to know where is go
checking for CAs on both Linux and Windows, so i could compare the setup between both OSes and install the correct CA on Linux.
windows ssl go ca
windows ssl go ca
asked Nov 23 '18 at 9:36
GauthierGauthier
2,3171922
2,3171922
1
Linux certs locations are defined here golang.org/src/crypto/x509/root_linux.go
– Mukesh Sharma
Nov 23 '18 at 9:57
Thanks, i found this in another answer, and the ones for Windows here: golang.org/src/crypto/x509/root_windows.go
– Gauthier
Nov 23 '18 at 10:00
1
Possible duplicate of Where is Golang picking up root CAs from?
– Mukesh Sharma
Nov 23 '18 at 10:02
yes, as stated in the answer, but it's only for Linux whereas i was also asking for Windows
– Gauthier
Nov 23 '18 at 10:05
add a comment |
1
Linux certs locations are defined here golang.org/src/crypto/x509/root_linux.go
– Mukesh Sharma
Nov 23 '18 at 9:57
Thanks, i found this in another answer, and the ones for Windows here: golang.org/src/crypto/x509/root_windows.go
– Gauthier
Nov 23 '18 at 10:00
1
Possible duplicate of Where is Golang picking up root CAs from?
– Mukesh Sharma
Nov 23 '18 at 10:02
yes, as stated in the answer, but it's only for Linux whereas i was also asking for Windows
– Gauthier
Nov 23 '18 at 10:05
1
1
Linux certs locations are defined here golang.org/src/crypto/x509/root_linux.go
– Mukesh Sharma
Nov 23 '18 at 9:57
Linux certs locations are defined here golang.org/src/crypto/x509/root_linux.go
– Mukesh Sharma
Nov 23 '18 at 9:57
Thanks, i found this in another answer, and the ones for Windows here: golang.org/src/crypto/x509/root_windows.go
– Gauthier
Nov 23 '18 at 10:00
Thanks, i found this in another answer, and the ones for Windows here: golang.org/src/crypto/x509/root_windows.go
– Gauthier
Nov 23 '18 at 10:00
1
1
Possible duplicate of Where is Golang picking up root CAs from?
– Mukesh Sharma
Nov 23 '18 at 10:02
Possible duplicate of Where is Golang picking up root CAs from?
– Mukesh Sharma
Nov 23 '18 at 10:02
yes, as stated in the answer, but it's only for Linux whereas i was also asking for Windows
– Gauthier
Nov 23 '18 at 10:05
yes, as stated in the answer, but it's only for Linux whereas i was also asking for Windows
– Gauthier
Nov 23 '18 at 10:05
add a comment |
1 Answer
1
active
oldest
votes
For Windows: https://golang.org/src/crypto/x509/root_windows.go
For Linux: https://golang.org/src/crypto/x509/root_linux.go
Found via this SO answer.
at least make the URLs as links
– Kyslik
Nov 23 '18 at 20:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53444015%2fgolang-httpclient-ca-certificates-default-location%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
For Windows: https://golang.org/src/crypto/x509/root_windows.go
For Linux: https://golang.org/src/crypto/x509/root_linux.go
Found via this SO answer.
at least make the URLs as links
– Kyslik
Nov 23 '18 at 20:36
add a comment |
For Windows: https://golang.org/src/crypto/x509/root_windows.go
For Linux: https://golang.org/src/crypto/x509/root_linux.go
Found via this SO answer.
at least make the URLs as links
– Kyslik
Nov 23 '18 at 20:36
add a comment |
For Windows: https://golang.org/src/crypto/x509/root_windows.go
For Linux: https://golang.org/src/crypto/x509/root_linux.go
Found via this SO answer.
For Windows: https://golang.org/src/crypto/x509/root_windows.go
For Linux: https://golang.org/src/crypto/x509/root_linux.go
Found via this SO answer.
edited Nov 24 '18 at 9:45
answered Nov 23 '18 at 10:01
GauthierGauthier
2,3171922
2,3171922
at least make the URLs as links
– Kyslik
Nov 23 '18 at 20:36
add a comment |
at least make the URLs as links
– Kyslik
Nov 23 '18 at 20:36
at least make the URLs as links
– Kyslik
Nov 23 '18 at 20:36
at least make the URLs as links
– Kyslik
Nov 23 '18 at 20:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53444015%2fgolang-httpclient-ca-certificates-default-location%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Linux certs locations are defined here golang.org/src/crypto/x509/root_linux.go
– Mukesh Sharma
Nov 23 '18 at 9:57
Thanks, i found this in another answer, and the ones for Windows here: golang.org/src/crypto/x509/root_windows.go
– Gauthier
Nov 23 '18 at 10:00
1
Possible duplicate of Where is Golang picking up root CAs from?
– Mukesh Sharma
Nov 23 '18 at 10:02
yes, as stated in the answer, but it's only for Linux whereas i was also asking for Windows
– Gauthier
Nov 23 '18 at 10:05