[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnutls_set_priority() does not handle strings starting with "NONE".
From: |
Laurence Withers |
Subject: |
gnutls_set_priority() does not handle strings starting with "NONE". |
Date: |
Sun, 3 Feb 2008 21:53:51 +0000 |
User-agent: |
KMail/1.9.7 |
Hi,
In the gnutls function reference, for the function gnutls_set_priority()
it is stated:
"NONE" nothing is enabled. This disables even protocols and
compression methods.
and one of the examples:
"NONE:+VERS-TLS1.0:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"
However, if you actually try that example, or even the string "NONE" on
its own, it doesn't work (it returns GNUTLS_E_INVALID_REQUEST and sets
the error location to the start of the string).
Tracing this back into the code, the token "NONE" is handled specially
before the for loop in gnutls_set_priority() that parses each token.
However, the loop itself always parses all tokens and it doesn't know
handle "NONE".
I attached a patch which causes the first token to be skipped by this
loop if it was "NONE". The patch is against 2.2.1 but also applies
against 2.3.0.
Bye for now,
--
Laurence Withers, <address@hidden> -- jabber:address@hidden
http://www.lwithers.me.uk/ tel:+447753988197
gnutls_priority_init-NONE.patch
Description: Text Data
- gnutls_set_priority() does not handle strings starting with "NONE".,
Laurence Withers <=