Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option for gnutls priority string #152

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

panarom
Copy link
Contributor

@panarom panarom commented Aug 4, 2023

This patch introduces a parallel command-line option to specify a GNUTLS priority-string for the client (it already exists on the server).  The server allows an arbitrary string that contains parameters for e.g. TLS-version and acceptable ciphers; the client is hard-coded currently to `#define PRIORITY "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2"` in crypto-gnutls.c.  With the introduction of this patch, the client can e.g. use TLS1.3; or be set specifically to match whatever arbitrary TLS options the server requires.  The server does have a default setting of "%SERVER_PRECEDENCE"; however, that seems to apply only to server-selected ciphers: not any arbitrary TLS options to pass through to GNUTLS.
I initially ran into this issue when I created TLS1.3 CA/client/server certs, and got TLS errors running NBD; I then experimented with the nbd-client executable by `sed`-ing it to replace the PRIORITY string `1.2` with `1.3` in the binary itself, and was then able to successfully connect; but I figured it would be better to offer a parallel option (like the server-side) than to change the hard-coded string in the code-base, or only add a tls-version command-line option.
@panarom panarom marked this pull request as ready for review August 13, 2023 14:26
@yoe yoe merged commit f52c9ab into NetworkBlockDevice:master Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants