Discussion:
[gnutls-help] priority strings
Jeremy Harris
2018-08-09 21:16:53 UTC
Permalink
Hi,

My code is trying to do:

gnutls_priority_init(NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+CAMELLIA-256-GCM:+SIGN-ALL:+COMP-NULL)

This used to work, I think with a previous library version.
Under GnuTLS 3.6.3 (on f28) I'm getting:

"failed at offset 0, "NONE:+VE.." failed: No or insufficient priorities were set".


The manual at https://gnutls.org/manual/html_node/Priority-Strings.html still
says, in Table 6.3 for "NONE":

"Means nothing is enabled. This disables even protocol versions. It should be followed by the algorithms to be enabled."




What should I now be using?
--
Thanks,
Jeremy
Andreas Metzler
2018-08-11 05:01:35 UTC
Permalink
Post by Jeremy Harris
gnutls_priority_init(NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+CAMELLIA-256-GCM:+SIGN-ALL:+COMP-NULL)
This used to work, I think with a previous library version.
"failed at offset 0, "NONE:+VE.." failed: No or insufficient priorities were set".
The manual at https://gnutls.org/manual/html_node/Priority-Strings.html still
"Means nothing is enabled. This disables even protocol versions.
It should be followed by the algorithms to be enabled."
What should I now be using?
Hello,

playing around with
gnutls-cli -l --priority '...'
it looks like adding ':+GROUP-ALL' succeeds. I am not sure this makes
sense, though, and it has the downside of not being accepted by GnuTLS
3.5.x.

How about
NORMAL:-VERS-ALL:+VERS-TLS-ALL:-KX-ALL:+RSA:-CIPHER-ALL:+AES-128-CBC:+CAMELLIA-256-GCM:-COMP-ALL:+COMP-NULL

cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
Nikos Mavrogiannopoulos
2018-08-13 06:25:37 UTC
Permalink
Post by Andreas Metzler
Post by Jeremy Harris
gnutls_priority_init(NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+CAMELLIA-256-GCM:+SIGN-ALL:+COMP-NULL)
This used to work, I think with a previous library version.
"failed at offset 0, "NONE:+VE.." failed: No or insufficient priorities were set".
The manual at https://gnutls.org/manual/html_node/Priority-Strings.html still
"Means nothing is enabled. This disables even protocol versions.
It should be followed by the algorithms to be enabled."
What should I now be using?
Hello,
playing around with
gnutls-cli -l --priority '...'
it looks like adding ':+GROUP-ALL' succeeds. I am not sure this makes
sense, though, and it has the downside of not being accepted by GnuTLS
3.5.x.
Maybe we should document that the none + build up approach is
version-specific and cannot be guaranteed to work on protocol updates,
or across minor gnutls version updates. That was not the original
intention, but in practice over every TLS update (1.1 -> 1.2 -> 1.3)
these strings that were derived from none broke.
Post by Andreas Metzler
How about
NORMAL:-VERS-ALL:+VERS-TLS-ALL:-KX-ALL:+RSA:-CIPHER-ALL:+AES-128-CBC:+CAMELLIA-256-GCM:-COMP-ALL:+COMP-NULL
That is certainly much better, but from the perspective of someone who
has seen numerous of these priority strings in applications, I'd
really recommend using the defaults. Applications typically keep that
string fixed for more than a decade whereas gnutls defaults gets
updated (quite conservatively) to eliminate insecure configurations
and add new ciphers (think of SSL3.0, RC4, 3DES, DSA etc). As such,
I'd recommend gnutls_set_default_priority() or
gnutls_set_default_priority_append() -in 3.6.x-.

regards,
Nikos
Jeremy Harris
2018-08-20 12:33:40 UTC
Permalink
Post by Nikos Mavrogiannopoulos
Maybe we should document that the none + build up approach is
version-specific and cannot be guaranteed to work on protocol updates,
or across minor gnutls version updates. That was not the original
intention, but in practice over every TLS update (1.1 -> 1.2 -> 1.3)
these strings that were derived from none broke.
Post by Andreas Metzler
How about
NORMAL:-VERS-ALL:+VERS-TLS-ALL:-KX-ALL:+RSA:-CIPHER-ALL:+AES-128-CBC:+CAMELLIA-256-GCM:-COMP-ALL:+COMP-NULL
That is certainly much better, but from the perspective of someone who
has seen numerous of these priority strings in applications, I'd
really recommend using the defaults.
The use-case here is for testing an application. So I need
to be able to set odd combinations, for example to check
what happens at application level when the TL connect
fails for lack of compatible key-exchange.

Having to make the testsuite tls-library-version aware
would be sucky.




Also fails, presumably for equivalent reasons:

gnutls_priority_init(NORMAL:!MAC-ALL:+MD5) failed at offset 0,
"NORMAL.."): No or insufficient priorities were set.
--
Cheers,
Jeremy
Nikos Mavrogiannopoulos
2018-08-20 12:59:16 UTC
Permalink
Post by Jeremy Harris
Post by Nikos Mavrogiannopoulos
Maybe we should document that the none + build up approach is
version-specific and cannot be guaranteed to work on protocol updates,
or across minor gnutls version updates. That was not the original
intention, but in practice over every TLS update (1.1 -> 1.2 -> 1.3)
these strings that were derived from none broke.
Post by Andreas Metzler
How about
NORMAL:-VERS-ALL:+VERS-TLS-ALL:-KX-ALL:+RSA:-CIPHER-ALL:+AES-128-CBC:+CAMELLIA-256-GCM:-COMP-ALL:+COMP-NULL
That is certainly much better, but from the perspective of someone who
has seen numerous of these priority strings in applications, I'd
really recommend using the defaults.
The use-case here is for testing an application. So I need
to be able to set odd combinations, for example to check
what happens at application level when the TL connect
fails for lack of compatible key-exchange.
Having to make the testsuite tls-library-version aware
would be sucky.
gnutls_priority_init(NORMAL:!MAC-ALL:+MD5) failed at offset 0,
"NORMAL.."): No or insufficient priorities were set.
Because you are adding MD5 which is only available in combination with
RC4. RC4 is no longer included in the NORMAL set, so you'd need
something like:
'NORMAL:-MAC-ALL:+MD5:+ARCFOUR-128'

regards,
Nikos
Nikos Mavrogiannopoulos
2018-08-20 13:06:26 UTC
Permalink
On Mon, Aug 20, 2018 at 2:59 PM, Nikos Mavrogiannopoulos
Post by Nikos Mavrogiannopoulos
Post by Jeremy Harris
Post by Nikos Mavrogiannopoulos
Post by Andreas Metzler
How about
NORMAL:-VERS-ALL:+VERS-TLS-ALL:-KX-ALL:+RSA:-CIPHER-ALL:+AES-128-CBC:+CAMELLIA-256-GCM:-COMP-ALL:+COMP-NULL
That is certainly much better, but from the perspective of someone who
has seen numerous of these priority strings in applications, I'd
really recommend using the defaults.
The use-case here is for testing an application. So I need
to be able to set odd combinations, for example to check
what happens at application level when the TL connect
fails for lack of compatible key-exchange.
Having to make the testsuite tls-library-version aware
would be sucky.
gnutls_priority_init(NORMAL:!MAC-ALL:+MD5) failed at offset 0,
"NORMAL.."): No or insufficient priorities were set.
Because you are adding MD5 which is only available in combination with
RC4. RC4 is no longer included in the NORMAL set, so you'd need
'NORMAL:-MAC-ALL:+MD5:+ARCFOUR-128'
Do you have a list of strings with NONE that fail with 3.6.x? Maybe we
can have a work-around and enable any missing items in that case,
though it will be tricky to distinguish intentional leaving out of
parameters and unintentional one.

regards,
Nikos

Continue reading on narkive:
Loading...