deprecating MD5 in signature verification for gnutls-{cli, serv}

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 6 06:57:35 CET 2009


On 01/06/2009 12:20 AM, Daniel Kahn Gillmor wrote:
> So i suspect that the following is the correct patch (against the git
> head), but i have not tested it yet (and i need to sleep before it gets
> any later):
> 
> diff --git a/lib/x509/verify.c b/lib/x509/verify.c
> index 02964ba..c00b4bf 100644
> --- a/lib/x509/verify.c
> +++ b/lib/x509/verify.c
> @@ -320,6 +320,7 @@ _gnutls_verify_certificate2 (gnutls_x509_crt_t cert,
>  	{
>  	  if (output)
>  	    *output |= GNUTLS_CERT_INSECURE_ALGORITHM | GNUTLS_CERT_INVALID;
> +	  ret = 0;
>  	}
>      }
> 
> @@ -1036,6 +1037,7 @@ _gnutls_verify_crl2 (gnutls_x509_crl_t crl,
>        {
>  	if (output)
>  	  *output |= GNUTLS_CERT_INSECURE_ALGORITHM | GNUTLS_CERT_INVALID;
> +	ret = 0;
>        }
>    }

OK, i've tested this patch now against 2.6.3, and it seems to have the
documented behavior: connections certified with SHA1 signatures work
fine, but connections certified with MD5 produce output like:

 [...]
- Peer's certificate is NOT trusted
- Version: TLS1.0
- Key Exchange: DHE-RSA
- Cipher: AES-128-CBC
- MAC: SHA1
- Compression: NULL
*** Verifying server certificate failed...
1 dkg at pip:~$

	--dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 890 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20090106/dbeaf0bb/attachment.pgp>


More information about the Gnutls-devel mailing list