[gnutls-dev] Server->client cert. request not TLS 1.2-compatible
Simon Josefsson
simon at josefsson.org
Wed Dec 27 20:00:55 CET 2006
ludovic.courtes at laas.fr (Ludovic Courtès) writes:
> Hi,
>
> `_gnutls_gen_cert_server_cert_req ()' is not TLS 1.2-aware, unlike
> `_gnutls_proc_cert_cert_req ()'. Specifically TLS 1.2 requires (per
> `draft-ietf-tls-rfc4346-bis-02.txt') certificate request messages to
> include a `certificate_hash' sequence. While `proc_cert_cert_req' does
> expect and read this sequence when in TLS 1.2,
> `gen_cert_server_cert_req' does not issue that sequence.
>
> A temporary workaround that may only works with GnuTLS-based TLS 1.2
> clients/servers is attached: basically, it modifies
> `gen_cert_server_cert_req' so that it produces an empty hash algorithm
> sequence.
Hi! Thanks for the analysis, I agree. I installed your patch in
1.7.x.
> Again, if need be, I'd be glad to provide a real fix based on your
> input.
What remains to be done here is to support the new hashes enabled by
TLS 1.2. I have not had any time to work on that, but if you want to
take a stab at making e.g. SHA-256 work, that would be very useful. I
didn't think through what other changes would be required to support
them, maybe some new APIs are required. Right now, the TLS 1.2
support in GnuTLS is the minimal required to conform with the protocol
syntax, there is no support for SHA2.
I'd be happy to work with you to improve the TLS 1.2 support, but I'm
rather short on spare time so my responses may be slow.
/Simon
> Thanks,
> Ludovic.
>
>
>
> --- orig/lib/auth_cert.c
> +++ mod/lib/auth_cert.c
> @@ -1403,6 +1403,7 @@
> gnutls_certificate_credentials_t cred;
> int size;
> opaque *pdata;
> + gnutls_protocol_t ver = gnutls_protocol_get_version (session);
>
> /* Now we need to generate the RDN sequence. This is
> * already in the CERTIFICATE_CRED structure, to improve
> @@ -1439,6 +1440,13 @@
> pdata[2] = DSA_SIGN; /* only these for now */
> pdata += CERTTYPE_SIZE;
>
> + if (ver == GNUTLS_TLS1_2)
> + {
> + /* supported hashes (nothing for now -- FIXME) */
> + *pdata = 0;
> + pdata++, size++;
> + }
> +
> if (session->security_parameters.cert_type == GNUTLS_CRT_X509 &&
> session->internals.ignore_rdn_sequence == 0)
> {
>
>
> _______________________________________________
> Gnutls-dev mailing list
> Gnutls-dev at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnutls-dev
More information about the Gnutls-devel
mailing list