I've crosscompiled openssl for an ARM device running linux 2.6.36.

If I try to make a connection to a site using:

openssl s_client -connect google.com:443

I will receive an error 20: unable to get local issuer certificate.

If I run:

openssl s_client -connect google.com:443 -CAfile=/etc/ssl/certs/ca-certificates.crt

the connection will succeed without errors.

openssl version -d returns OPENSSLDIR: /usr/lib/ssl which structure is the following:

ls -lh /usr/lib/ssl/
lrwxrwxrwx   1   root   root   14   Jan 1 1970 certs -> /etc/ssl/certs
lrwxrwxrwx   1   root   root   20   Jan 1 1970 openssl.cnf -> /etc/ssl/openssl.cnf
lrwxrwxrwx   1   root   root   17   Jan 1 1970 private -> /etc/ssl/private
lrwxrwxrwx   1   root   root   22   Jan 1 1970 misc 
lrwxrwxrwx   1   root   root   34   Jan 1 1970 openssl.cnf.dist

I need openssl correctly configured in order to run a software which I have developed, so I can't set evertytime the -CAfile flags beacuse I will not directly call openssl s_client.

How could I set the directory in which openssl search for certificates? I'm trying to solve this problem since some days without success.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.