[Spice-devel] [PATCH spice-gtk 1/2] Add SpiceSession:ca property
Christophe Fergeau
cfergeau at redhat.com
Wed Nov 21 04:33:48 PST 2012
On Mon, Nov 19, 2012 at 09:52:01PM +0100, Marc-André Lureau wrote:
> ---
> gtk/spice-session-priv.h | 2 ++
> gtk/spice-session.c | 40 ++++++++++++++++++++++++++++++++++++++--
> 2 files changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/gtk/spice-session-priv.h b/gtk/spice-session-priv.h
> index 13345b4..804658d 100644
> --- a/gtk/spice-session-priv.h
> +++ b/gtk/spice-session-priv.h
> @@ -40,6 +40,7 @@ struct _SpiceSessionPrivate {
> char *ca_file;
> char *ciphers;
> GByteArray *pubkey;
> + GByteArray *ca;
> char *cert_subject;
> guint verify;
> gboolean read_only;
> @@ -135,6 +136,7 @@ const gchar* spice_session_get_host(SpiceSession *session);
> const gchar* spice_session_get_cert_subject(SpiceSession *session);
> const gchar* spice_session_get_ciphers(SpiceSession *session);
> const gchar* spice_session_get_ca_file(SpiceSession *session);
> +void spice_session_get_ca(SpiceSession *session, guint8 **ca, guint *size);
I'd have a slight preference for a gsize *size, but the GByteArray API is
inconsistent wrt to gsize VS guint use, it seems to be using guint in older
API, and gsize in newer one. Patch looks good either way with the added
break; that you mentioned. Should we more explicit in the API doc about the
expected format for the CA cert data?
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20121121/20443f7b/attachment.pgp>
More information about the Spice-devel
mailing list