search for: print_gnutls_error

Displaying 4 results from an estimated 4 matches for "print_gnutls_error".

2018 Jun 25
2
[PATCH nbdkit] tls: Implement Pre-Shared Keys (PSK) authentication.
This is ready for review but needs a bit more real-world testing before I'd be happy about it going upstream. It also needs tests. It does interoperate with qemu, at least in my limited tests. Rich.
2018 Jun 25
0
[PATCH nbdkit] tls: Implement Pre-Shared Keys (PSK) authentication.
...t; #include <assert.h> @@ -51,7 +53,12 @@ #include <gnutls/gnutls.h> +static int crypto_auth = 0; +#define CRYPTO_AUTH_CERTIFICATES 1 +#define CRYPTO_AUTH_PSK 2 + static gnutls_certificate_credentials_t x509_creds; +static gnutls_psk_server_credentials_t psk_creds; static void print_gnutls_error (int err, const char *fs, ...) __attribute__((format (printf, 2, 3))); @@ -147,23 +154,9 @@ load_certificates (const char *path) return 1; } -/* Initialize crypto. This also handles the command line parameters - * and loading the server certificate. - */ -void -crypto_init (int tls_set_on...
2018 Jun 28
3
Re: [PATCH nbdkit] tls: Implement Pre-Shared Keys (PSK) authentication.
...to the PSK file is absolute. */ > + abs_psk_file = realpath (tls_psk, NULL); > + if (abs_psk_file == NULL) { > + perror (tls_psk); > + exit (EXIT_FAILURE); > + } > + > + err = gnutls_psk_allocate_server_credentials (&psk_creds); > + if (err < 0) { > + print_gnutls_error (err, "allocating PSK credentials"); > + exit (EXIT_FAILURE); Do you care about lint-like efforts to free abs_psk_file before exit? (I don't) > + } > + > + /* Note that this function makes a copy of the string so it > + * is safe to free it afterwards. > +...
2018 Jun 25
1
[PATCH v2 nbdkit] tls: Implement Pre-Shared Keys (PSK)
v2: * Improved documentation. * Added a test (interop with qemu client).