Closed DomT4 closed 8 years ago
Hi,
If you move /usr/local/etc/libressl/cert.pem to /usr/local/etc/libressl/certs/, this issue will be solved.
The cert.pem should be placed into $OPENSSLDIR/certs/ .
In my CentOS7, with OpenSSL 1.0.2, OPENSSLDIR is set to /usr/lib/ssl/ and this directory and certs/ under this directory contain like this.
$ ls /usr/lib/ssl/ certs misc openssl.cnf private $ ls /usr/lib/ssl/certs/ 00673b5b.0 02265526.0 ... 9f533518.0 ACCVRAIZ1.pem ACEDICOM_Root.pem ... (many *.pem files are listed) ... thawte_Primary_Root_CA.pem thawte_Primary_Root_CA_-_G2.pem thawte_Primary_Root_CA_-_G3.pem $
It seems that both OpenSSL and LibreSSL search CA files from $OPENSSLDIR/certs/.
BTW, according to tls/Makefile.am, libtls expect cert.pem is placed under the OPENSSLDIR
... Makefile.am:libtls_la_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"@OPENSSLDIR@/cert.pem\" ...
This might be a conflict between openssl command and libtls API.
Best Regards,
OpenSSL had fixed this by this commit. https://github.com/openssl/openssl/commit/fe9b85c3cb79f1e29e61f01de105b34ce8177190
Thanks, I forwarded the patch for this to tech@openbsd.org for review.
This was tested initially on LibreSSL Portable but reproduces with the system LibreSSL on OpenBSD 5.9, hence the report here. That it reproduces on OpenBSD makes me wonder if this is a "feature" rather than a "bug". This doesn't reproduce on a current OpenSSL, either the latest 1.0.1 or 1.0.2 releases, for what that's worth.
LibreSSL built with a custom
--with-openssldir=/usr/local/etc/libressl
doesn't propagate tos_client
, and you have to pass the-CAfile
manually to create an error-free connection.Passing the
-CAfile
manually does produce the expected end result:Unsure if related but a
grep
forOPENSSLDIR
inOpenSSL 1.0.2h
&LibreSSL 2.3.6
shows OpenSSL stores the customopenssldir
passed during configure but LibreSSL seems to have discarded it in favour of the default path: