Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support loading certificates from macOS keychain #167

Merged
merged 3 commits into from
Jun 12, 2018
Merged

Conversation

csstaub
Copy link
Member

@csstaub csstaub commented Jun 7, 2018

Support loading certificates from macOS keychain using certstore.

Can be used like this, e.g. if the test-keys/client keystore is imported into the macOS keychain:

ghostunnel client \
    --listen localhost:8080 \
    --target localhost:8443 \
    --keychain-identity client \
    --cacert test-keys/cacert.pem

Note that this requires -tags certstore on build, and only compiles with that flag enabled on macOS 10.12+. The build tag is required as xgo can only target up to macOS 10.11 on cross-compile, and the necessary APIs are not available there. Also this is "experimental" and I haven't really tested it very well besides ensuring that the basic functionality works.

csstaub added 2 commits June 7, 2018 14:05
Requires optional build tag "certstore" to be set because karalabe/xgo
doesn't support darwin-10.12 (only up to 10.11) for cross-compilation,
and mastahyeti/certstore requires 10.12 minimum.
@csstaub csstaub requested a review from mcpherrinm June 7, 2018 22:12
@csstaub csstaub merged commit 3d206c4 into master Jun 12, 2018
@csstaub csstaub deleted the cs/certstore branch June 12, 2018 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants