bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Added missing TLSV1_1 and TLSV1_2 code to gnutls.


From: Tim Ruehsen
Subject: Re: [Bug-wget] [PATCH] Added missing TLSV1_1 and TLSV1_2 code to gnutls.c
Date: Wed, 26 Nov 2014 12:54:29 +0100
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

On Wednesday 26 November 2014 12:13:41 Giuseppe Scrivano wrote:
> Tim Ruehsen <address@hidden> writes:
> >      case secure_protocol_tlsv1:
> >        allowed_protocols[0] = GNUTLS_TLS1_0;
> >        allowed_protocols[1] = GNUTLS_TLS1_1;
> >        allowed_protocols[2] = GNUTLS_TLS1_2;
> >        err = gnutls_protocol_set_priority (session, allowed_protocols);
> >        break;
> > 
> > -
> > +    case secure_protocol_tlsv1_1:
> > +      allowed_protocols[0] = GNUTLS_TLS1_1;
> > +      allowed_protocols[2] = GNUTLS_TLS1_2;
> > +      err = gnutls_protocol_set_priority (session, allowed_protocols);
> > +      break;
> > +    case secure_protocol_tlsv1_2:
> > +      allowed_protocols[2] = GNUTLS_TLS1_2;
> > +      err = gnutls_protocol_set_priority (session, allowed_protocols);
> > +      break;
> > 
> >      default:
> allowed_protocols is a 0 terminated list.  So this last chunk should be:
> >      case secure_protocol_tlsv1:
> >        allowed_protocols[0] = GNUTLS_TLS1_0;
> >        allowed_protocols[1] = GNUTLS_TLS1_1;
> >        allowed_protocols[2] = GNUTLS_TLS1_2;
> >        err = gnutls_protocol_set_priority (session, allowed_protocols);
> >        break;
> > 
> > +    case secure_protocol_tlsv1_1:
> > +      allowed_protocols[0] = GNUTLS_TLS1_1;
> > +      allowed_protocols[1] = GNUTLS_TLS1_2;
> > +      err = gnutls_protocol_set_priority (session, allowed_protocols);
> > +      break;
> > +
> > +    case secure_protocol_tlsv1_2:
> > +      allowed_protocols[0] = GNUTLS_TLS1_2;
> > +      err = gnutls_protocol_set_priority (session, allowed_protocols);
> > +      break;
> > 
> >      default:
> ACK with this change.  I prefer if we leave an empty line between the
> "break" and the next "case", what do you think?

Thanks for having a look.

Fixed, empty lines added and pushed.

BTW, after the next release of Wget I suggest we cleanup 
HAVE_GNUTLS_PRIORITY_SET_DIRECT... even the GnuTLS documentation has no 
'Since' for gnutls_priority_set_direct(). So I guess the function is only 
missing in very old libraries... which are known to have bugs and missing 
features in many ways. Maaybe it is good if people fall over it ;-)

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]