From: "Daniel P. Berrange" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5 16/16] nbd: enable use of TLS with nbd-server-start command
Date: Thu, 4 Feb 2016 16:30:05 +0000 [thread overview]
Message-ID: <20160204163004.GF30301@redhat.com> (raw)
In-Reply-To: <56B37B66.6010101@redhat.com>
On Thu, Feb 04, 2016 at 09:25:10AM -0700, Eric Blake wrote:
> On 02/04/2016 06:50 AM, Daniel P. Berrange wrote:
> > This modifies the nbd-server-start QMP command so that it
> > is possible to request use of TLS. This is done by adding
> > a new optional parameter "tls-creds" which provides the ID
> > of a previously created QCryptoTLSCreds object instance.
> >
> > TLS is only supported when using an IPv4/IPv6 socket listener.
> >
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
>
> > +static QCryptoTLSCreds *nbd_get_tls_creds(const char *id, Error **errp)
> > +{
> > + Object *obj;
> > + QCryptoTLSCreds *creds;
> > +
> > + obj = object_resolve_path_component(
> > + object_get_objects_root(), id);
> > + if (!obj) {
> > + error_setg(errp, "No TLS credentials with id '%s'",
> > + id);
> > + return NULL;
> > + }
> > + creds = (QCryptoTLSCreds *)
> > + object_dynamic_cast(obj, TYPE_QCRYPTO_TLS_CREDS);
>
> Do we really need the C cast alongside an object_dynamic_cast()?
Yes, afraid so - object_dynamic_cast() still returns 'Object *'.
There's probably a case to be made that object_dynamic_cast()
should be returning 'void *', but I won't change that here.
> > +++ b/qapi/block.json
> > @@ -146,13 +146,15 @@
> > # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
> > #
> > # @addr: Address on which to listen.
> > +# @tls-creds: (optional) ID of the TLS credentials object. Since 2.6
>
> Worth a comment that it only works with IPv4/6?
Sure, we could do.
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 :|
prev parent reply other threads:[~2016-02-04 16:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 13:50 [Qemu-devel] [PATCH v5 00/16] Implement TLS support to QEMU NBD server & client Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 01/16] qom: add helpers for UserCreatable object types Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 02/16] qemu-nbd: add support for --object command line arg Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 03/16] nbd: convert block client to use I/O channels for connection setup Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 04/16] nbd: convert qemu-nbd server " Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 05/16] nbd: convert blockdev NBD " Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 06/16] nbd: convert to using I/O channels for actual socket I/O Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 07/16] nbd: invert client logic for negotiating protocol version Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 08/16] nbd: make server compliant with fixed newstyle spec Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 09/16] nbd: make client request fixed new style if advertized Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 10/16] nbd: allow setting of an export name for qemu-nbd server Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 11/16] nbd: always query export list in fixed new style protocol Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 12/16] nbd: use "" as a default export name if none provided Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 13/16] nbd: implement TLS support in the protocol negotiation Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 14/16] nbd: enable use of TLS with NBD block driver Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 15/16] nbd: enable use of TLS with qemu-nbd server Daniel P. Berrange
2016-02-04 13:50 ` [Qemu-devel] [PATCH v5 16/16] nbd: enable use of TLS with nbd-server-start command Daniel P. Berrange
2016-02-04 16:25 ` Eric Blake
2016-02-04 16:30 ` Daniel P. Berrange [this message]
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=20160204163004.GF30301@redhat.com \
--to=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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.