>From: [email protected] On Behalf Of Yijun Wu
>Sent: Friday, 23 August, 2013 04:05
>I'm using OpenSSL to do some research and I find some
>strange behaviors of certificate exchange on client side.
>The cipher suite is set to "AES128-SHA" on both server
>and client side, which I think shall only use and exchange
>RSA key and certificate. But [client uses DSA]
>The cipher suite is set to "DHE-DSS-AES128-SHA" on both server
>and client side, which I think shall only use and exchange DSA
>key and certificate. But [client selects RSA over DSA]
>However, it will just return no shared cipher error on server side
>when the set cipher suite doesn't match what it contains. eg:
>cipher suite is "AES128-SHA" but the server only contains DSA key
>and certificate.
>I just don't know whether it is a correct behavior. It would be
>appreciated if someone could help me to explain this issue.
It is correct. The cert type(s) the client may use is controlled
by the certificate_types field in the server's CertificateRequest
message, and in TLSv1.2 also by the signature_algorithms field.
The server could use certificate_types to limit client to the same
algorithm(s) implied for the server but openssl doesn't (and
neither does Java JSSE, the only other server I can easily test).
On the other hand SERVER cert type IS controlled by the
key-exchange protocol of the ciphersuite negotiated --
see 7.4.2 in RFC 2246,4346,5246 -- except that in TLSv1.2
the "fixed DH" protocols DH_RSA and DH_DSS, and similarly
"fixed ECDH" ECDH_RSA and ECDH_ECDSA, no longer limit the
cert signing algorithm, but the client's signature_algorithms
does limit the server cert chain for all key-exchange protocols
(except of course those not using certs at all).
In addition, a server ECC (ECDSA and/or ECDH) cert must
match the supported_curves and supported_formats extensions
if they are specified by the client, and this may result in
"no shared cipher" even though both client and server support
e.g. ECDHE-RSA-something -- and openssl server can only configure
one ECC key-and-cert per context so there's no way for it to
support clients with nonoverlapping sets of supported curves.
Fortunately people seem to be converging on P256 and P384,
almost certainly because NSA "blessed" them in Suite B.
There doesn't seem to be any comparable way for the server
to limit curves/formats of client ECC cert, but openssl is
safe because it implements all standard curves (and formats).
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]