-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat(20.04): add 'data' slice to openssl SDF #262
feat(20.04): add 'data' slice to openssl SDF #262
Conversation
Diff of dependencies: |
7cc59cf
to
7b3e319
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, thanks
Proposed changes
Add
openssl_data
slice for users does not require the "openssl" binaries, but only needs thepem
bundled certificate at the defaultcafile
.The problem: Programmes in rocks with base focal and jammy cannot get local issuer certificates during an SSL certificate verification.
The cause: The lack of both the symlinks of certificates and rehashed symlinks to the certificates in
/etc/ssl/certs
that point to the certificates introduced by package "ca-certificates" and the symlink pointing to the ca-certificates bundle crt file.To cope with this problem, we are diverging a bit from the behaviour of the package "openssl" in focal and jammy, providing the symlink
/usr/lib/ssl/cert.pem -> /etc/ssl/certs/ca-certificates.crt
in the sliceopenssl_data
. The reasons behind that are:The SSL library by default reads the local certificates firstly at the bundled certificates
cafile
, which defaults at/usr/lib/ssl/certs.pem
, and then the single certificates incapath
which defaults to/usr/lib/ssl/certs
.In focal and jammy, the "openssl" package does not provide a
capath
symlink/usr/lib/ssl/certs.pem -> /etc/ssl/certs/ca-certificates.crt
. As a result, the certificates have to be read from thecapath
, which by default is/usr/lib/ssl/certs -> /etc/ssl/certs
, wheretthe certificates from package "ca-certificates" are symbolically linked to/etc/ssl/certs
by the scriptupdate-ca-certificates
and rehashed withopenssl rehash
orc_rehash
(this is automatically triggered with the maintainer scripts of the package "ca-certificates"). However, with the current specification of chisel slice definition files and starlark (the mutation script language in chisel SDF), it's not possible to fully mimic the behaviour of the maintainer scrip and theupdate-ca-certificates
script in the package "ca-certificates" to calculate the hashes for the certificates and create symlinks with file name formatHHHHHHHH.D
(H
for hex,D
for dec) within the directory/etc/ssl/certs
.Such symlink
/usr/lib/ssl/certs.pem -> /etc/ssl/certs/ca-certificates.crt
is provided in the package "openssl" starting from noble. It is verified to work for the same case in a rock built with a noble base.Therefore, we providing a symlink
/usr/lib/ssl/certs.pem -> /etc/ssl/certs/ca-certificates.crt
is the only solution for now, though it deviates a bit from the behaviour of the package "openssl".FYI: @letFunny
Related issues/PRs
ca-certificates
is incompatible with OpenSSL #257Forward porting
#273
Checklist