openssl: Add variant to use system certificates#6396
Conversation
182d6ea to
e775dcf
Compare
|
@tgamblin @adamjstewart Any opinions on this? It fixes problems like this when using Spack's openssl: |
tgamblin
left a comment
There was a problem hiding this comment.
This is pretty awesome. I definitely think it should be the default.
Can you add support for macOS as well? There, you have to use the security command to dump the system certs, but I don't believe it is much more code than what you already have.
Sorry, I do not have access to a macOS system. It probably makes more sense if someone else takes care of that part. Homebrew has a formula that can probably be used as a basis (https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl.rb). |
| version('1.0.1r', '1abd905e079542ccae948af37e393d28') | ||
| version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') | ||
|
|
||
| variant('system-certs', default=True, description='Use system certificates') |
There was a problem hiding this comment.
Can you remove the - from the variant name here? Technically it is allowed but we decided to prefer not to use it. use systemcerts
Ok -- why don't we go ahead and get this done for Linux first, then, and someone can add Mac OS in a later PR. |
e775dcf to
9d576e0
Compare
|
|
||
| pkg_dir = join_path(self.prefix, 'etc', 'openssl') | ||
|
|
||
| for dir in system_dirs: |
There was a problem hiding this comment.
Minor note: can we use a different name, like directory? Asking just because dir is a built-in function in python.
There was a problem hiding this comment.
I changed it to directory as you proposed.
9d576e0 to
a960ce6
Compare
Spack's openssl package is currently a bit useless because it can not verify any certificates. This PR adds a
system-certsvariant that symlinks the system certificates into the package.