-
Notifications
You must be signed in to change notification settings - Fork 14
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
Not compatible with FreeBSD #1
Comments
@Cubox- Thanks for filling the issue, if you want to provide a PR I'll merge it, and integrate it into step. |
Will try. In the meantime, are those functions being used for anything outside of the cli command truststore? |
We're only using it for |
You can try that with this build constraint // +build !linux,!darwin,!windows That will make it work for other OS too. |
@Cubox- I've just committed a file that will make the compilation possible FreeBSD support is still pending, so I'll keep this issue open |
@Cubox- Is this still something you're working on? We (the Caddy project) have started seeing requests for this too and we think it'd be a great contribution 😃 |
@mholt no sorry |
That's alright, just wanted to check in! 👌 |
'Trust store unsupported' Issue surfaces in the FreeBSD port of step-ca smallstep/certificates#572 and the Caddy internal CA (based on the Smallstep libraries) https://caddy.community/t/unresolved-mtls-under-freebsd/12364 |
This was totally lost, added to the triage meeting. |
I have some info that may be useful. This is in relation to the Caddy internal CA, but will probably be relevant to the Smallstep CA as well. Full details in this Caddy forum post forward https://caddy.community/t/mtls-under-freebsd-is-now-working/12364/47. TLDR the short version... This is what I was seeing in the Caddy console log:
I then executed the following command....
Restarting Caddy, the internal CA now works. The console log shows the following...
Don't get too excited though. The 'solution' is semi-permanent at best. The internal CA breaks if the A second issue to contend with is the location of |
@basilhendroff Digging a bit more in FreeBSD bug tickets, there was apparently a Also an interesting development, Go made a change regarding the location of the trust store a few days ago which should land in the next version of Go, i.e. version 1.17: golang/go#46284. This might also help. I guess this is all meant to land in FreeBSD 12.2? I don't follow FreeBSD progress, so you may understand this better, but I'm hoping this might help push this in the right direction. |
@francislavoie My reading is that the As I understand it, Caddy doesn’t currently use OpenSSL - it uses the implementation of crypto from the Go standard library. With the proposed Go change, my interpretation is that Go intends to support OpenSSL. If you follow the link golang/go#46284., it does reference |
Not quite, it just adds another file location from which it would load trust (this new one being preferred first if it exists). Still uses Go's crypto implementation. The change is merged in Go, and will be released in Go 1.17 (and Caddy would just need to be built using that version of Go to get it to work). Actually, you might be able to build Caddy with a nightly/prerelease version of Go, to test out that Caddy reads trust from that new location. |
Okay, it appears we now have a way forward. certctl is a new certificate manager for FreeBSD 12.2 and later versions. It's unlikely this will be backported to earlier FreeBSD versions, which still rely on the method described in the OP. High-level steps:
Detailed testing to confirm that this approach works can be viewed here. |
@basilhendroff If you can send us a PR defining this for FreeBSD, I'll merge it truststore/truststore_others.go Lines 7 to 21 in 23dd882
|
@maraino Unfortunately, I'm not a developer so I'm unable to take this further. I've sounded out the TrueNAS community in the thread Calling on Go developers... for a Go developer with FreeBSD expertise to help bring some closure to this issue. EDIT: I've cast the net further afield to the FreeBSD community Calling Go developers... |
A HUGE thank you to @qiu3344 from the FreeBSD community for responding to the plea for a Go developer to help resolve the FreeBSD trust store issue within SmallStep. @qiu3344 stepped up to the plate and unselfishly contributed their expertise and time to bring closure to this issue, Around 100 lines of Go code were added in a pull request. The fix should find its way in a future release of SmallStep and Caddy. Anybody who uses these products on FreeBSD, and its derivatives such as TrueNAS, for private PKI certificate lifecycle management, owes @qiu3344 a debt of gratitude for their contribution in making these products fully functional on more recent FreeBSD versions. |
Add FreeBSD `certctl` support (Fixes #1)
@maraino if you could give me a heads up when the releases are tagged, that'd be greatly appreciated 😄 Edit: Thanks! caddyserver/caddy#4453 |
There is no code to handle FreeBSD.
FreeBSD stores certificates in /usr/local/etc/ssl.
The port security/p11-kit provides the
trust
utilityThe text was updated successfully, but these errors were encountered: