All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 1/7] crypto: introduce new base module for TLS credentials
Date: Wed, 26 Aug 2015 13:48:14 +0100	[thread overview]
Message-ID: <20150826124739.GK21787@redhat.com> (raw)
In-Reply-To: <55DB7DB4.30907@redhat.com>

On Mon, Aug 24, 2015 at 02:25:24PM -0600, Eric Blake wrote:
> > +/* #define QCRYPTO_DEBUG */
> > +
> > +#ifdef QCRYPTO_DEBUG
> > +#define DPRINTF(fmt, ...) do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
> > +#else
> > +#define DPRINTF(fmt, ...) do { } while (0)
> > +#endif
> 
> Please rework this to:
> 
> #ifdef QCRYPTO_DEBUG
> # define QCRYPT_DEBUG_PRINT 1
> #else
> # define QCRYPT_DEBUG_PRINT 0
> #endif
> #define DPRINTF(fmt, ...) \
>     do { \
>         if (QCRYPT_DEBUG_PRINT) { \
>             fprintf(stderr, fmt, ## __VA_ARGS__); \
>         } \
>     } while (0)

Ah that's a good idea.

One day it would nice if QEMU had a standardized debug logging macro
in qemu-common.h, so we could just turn on/off debugging per file
using

   #define ENABLE_DEBUG 1
   #include "qemu-common.h"

> > +#define DH_BITS 2048
> > +
> > +static const char * const endpoint_map[QCRYPTO_TLS_CREDS_ENDPOINT_LAST + 1] = {
> > +    [QCRYPTO_TLS_CREDS_ENDPOINT_SERVER] = "server",
> > +    [QCRYPTO_TLS_CREDS_ENDPOINT_CLIENT] = "client",
> > +    [QCRYPTO_TLS_CREDS_ENDPOINT_LAST] = NULL,
> > +};
> 
> Is it worth an entry in a .json file to get qapi to generate this
> mapping automatically?

I guess adding the enum definition itself to QAPI would mean we
would get better introspection support when we solve QOM class
introspection of properties.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2015-08-26 12:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 14:14 [Qemu-devel] [PATCH v4 0/7] Extract TLS handling code from VNC server Daniel P. Berrange
2015-08-24 14:14 ` [Qemu-devel] [PATCH v4 1/7] crypto: introduce new base module for TLS credentials Daniel P. Berrange
2015-08-24 20:25   ` Eric Blake
2015-08-26 12:48     ` Daniel P. Berrange [this message]
2015-08-24 14:14 ` [Qemu-devel] [PATCH v4 2/7] crypto: introduce new module for TLS anonymous credentials Daniel P. Berrange
2015-08-24 20:46   ` Eric Blake
2015-08-26 14:49     ` Daniel P. Berrange
2015-08-24 14:14 ` [Qemu-devel] [PATCH v4 3/7] crypto: introduce new module for TLS x509 credentials Daniel P. Berrange
2015-08-26 15:07   ` Eric Blake
2015-08-24 14:14 ` [Qemu-devel] [PATCH v4 4/7] crypto: add sanity checking of " Daniel P. Berrange
2015-08-24 14:14 ` [Qemu-devel] [PATCH v4 5/7] crypto: introduce new module for handling TLS sessions Daniel P. Berrange
2015-08-24 14:14 ` [Qemu-devel] [PATCH v4 6/7] ui: fix return type for VNC I/O functions to be ssize_t Daniel P. Berrange
2015-08-24 14:14 ` [Qemu-devel] [PATCH v4 7/7] ui: convert VNC server to use QCryptoTLSSession Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150826124739.GK21787@redhat.com \
    --to=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.