Hello Dave,

 

I would like to simplify the issue as following.

 

1.       Both client and server performs SSL Handshake using cert chain.

2.       In our case server responds correctly with the entire chain of cert
(Server is some proprietary system)

3.       Client also expected to send the entire cert chain, which is
already available as a single file in .pem mode (Client is Kannel)

4.       What happens is, seems libssl pass only the first cert in the cert
chain file and doesn't pass the rest.

5.       Need a mechanism  to configure libssl to pass the entire chain, How
to implement this?

 

Thanks in advance,

 

Fahim

From: [email protected]
[mailto:[email protected]] On Behalf Of Dave Thompson
Sent: Tuesday, January 07, 2014 4:08 AM
To: [email protected]
Subject: RE: OpenSSL doesn't pass full cert chain

 

To be certain I'm clear, since your terminology is a bit unusual:

you have a server application using openssl library (libssl), which 

has a cert that was issued by a CA using intermediate certs.

The prover (server in nearly all cases, client in rare cases) 

per RFC MUST send the full chain except optionally the root 

i.e. entity cert and any intermediate/chain cert(s) in order.

In some situations this isn't actually needed, if the child

cert(s) specify where the parent(s) can be obtained using 

AuthorityInfoAcccess extension and the relier implements AIA 

(which libssl as relier does not), or if the relier has the lower cert(s) 

in >its< truststore (which libssl and some other SSL implementations 

can, but I know nothing about your client kannel).

 

Assuming you want to go with the standard approach, a libssl prover 

(here your server) will send the full chain if you do either of two 

(or maybe three) things:

- call SSL_CTX_use_certificate_chain_file INSTEAD OF use_certificate_file 

and provide a file containing first the entity=server cert and then 

the chain=intermediate cert(s), and optionally root, all in PEM

- provide a truststore which contains the chain certs, and optionally root,

unambiguosly (i.e. there are NOT two or more certs for the same CA name).

There are two variants of this:

- set up a private CA file and/or CA directory and call
load_verify_locations

- put them in your system's default store and call set_default_verify_paths

Both of these also mean that the provided certs are considered trusted 

when verifying the peer, which for a server occurs only if client
authentication 

aka client cert is requested and is provided by the client. This should
rarely 

if ever be a problem because if you expect and assert the peer should 

trust these CAs when verifying you, then you ought to trust them also.

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Fahim
Sent: Saturday, January 04, 2014 12:36
To: [email protected]
Subject: OpenSSL doesn't pass full cert chain

 

Hello,

 

We are looking for a potential tweak or customization of openSSL for an
existing project, and I was wondering if I could get your input.

 

Summary: we want to alter or configure openSSL so that it will pass the
entire cert chain for authentication instead of just the first certificate.
Passing just the first cert appears to be the default, which is not working
for our application, but we cannot figure out how to change that particular
setting so that the entire certificate chain is sent.

 

Background: We are trying to perform SMPP over SSL connectivity using kannel
on the client side and done configuration changes at the kannel side to make
it perform as client and created the single cert file with the whole
certificate chain (Signed certificate of the server, intermediate certs and
the root cert)  and the same currently deployed with kannel. But still
clientside  authentication fails because openssl which handles the SSL at
the server  passes the first certificate only (in our case it is signed
certificate only) to the server side and does not process beyond that. In
fact, openSSL must be configured to pass the entire chain (Intermediate
certs and root cert), but it fails to do so. It turns out it is the by
default behavior of the openSSL .We found at
http://gagravarr.org/writing/openssl-certs/general.shtml that "In almost all
cases, OpenSSL will assume that there's only one certificate in a given
file. As such, it will generally only use the first certificate that it
finds, and will ignore all others." This is the behavior we are trying to
figure out how to chain.

 

Does anyone have any suggestions here? I would appreciate your feedback.

 

Thanks in advance,

 

Best Regards,

 

Fahim

Reply via email to