Re: [PATCH spice-server] replay: Support TLS in replay utility

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

 



On Fri, Feb 03, 2017 at 03:14:32PM +0000, Frediano Ziglio wrote:
> Allows to test encrypted connections.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/tests/replay.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/server/tests/replay.c b/server/tests/replay.c
> index 9757e59..d76ef00 100644
> --- a/server/tests/replay.c
> +++ b/server/tests/replay.c
> @@ -325,6 +325,9 @@ int main(int argc, char **argv)
>      gint port = 5000, compression = SPICE_IMAGE_COMPRESSION_AUTO_GLZ;
>      gint streaming = SPICE_STREAM_VIDEO_FILTER;
>      gboolean wait = FALSE;
> +    gint tls_port = 0;
> +    gchar *cacert_file = NULL, *cert_file = NULL, *key_file = NULL;
> +
>      FILE *fd;
>  
>      GOptionEntry entries[] = {
> @@ -337,6 +340,10 @@ int main(int argc, char **argv)
>          { "slow", 's', 0, G_OPTION_ARG_INT, &slow, "Slow down replay. Delays USEC microseconds before each command", "USEC" },
>          { "skip", 0, 0, G_OPTION_ARG_INT, &skip, "Skip 'slow' for the first n commands", NULL },
>          { "count", 0, 0, G_OPTION_ARG_NONE, &print_count, "Print the number of commands processed", NULL },
> +        { "tls-port", 0, 0, G_OPTION_ARG_INT, &tls_port, "Secure server port", "PORT" },
> +        { "cacert-file", 0, 0, G_OPTION_ARG_FILENAME, &cacert_file, "TLS CA certificate", "FILE" },
> +        { "cert-file", 0, 0, G_OPTION_ARG_FILENAME, &cert_file, "TLS server certificate", "FILE" },
> +        { "key-file", 0, 0, G_OPTION_ARG_FILENAME, &key_file, "TLS server private key", "FILE" },
>          { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file, "replay file", "FILE" },

You need to free these G_OPTION_ARG_FILENAME options when you no longer
need them.

Apart from this,
Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]