From a29acc9c318781b59063091b895773fc6cbe96e7 Mon Sep 17 00:00:00 2001 From: Zihao Chang Date: Tue, 16 Mar 2021 15:58:43 +0800 Subject: crypto: add reload for QCryptoTLSCredsClass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds reload interface for QCryptoTLSCredsClass and implements the interface for QCryptoTLSCredsX509. Signed-off-by: Zihao Chang Acked-by: Daniel P. Berrangé Message-Id: <20210316075845.1476-2-changzihao1@huawei.com> Signed-off-by: Gerd Hoffmann --- include/crypto/tlscreds.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/crypto/tlscreds.h b/include/crypto/tlscreds.h index 079e376..d0808e3 100644 --- a/include/crypto/tlscreds.h +++ b/include/crypto/tlscreds.h @@ -30,14 +30,15 @@ #define TYPE_QCRYPTO_TLS_CREDS "tls-creds" typedef struct QCryptoTLSCreds QCryptoTLSCreds; -DECLARE_INSTANCE_CHECKER(QCryptoTLSCreds, QCRYPTO_TLS_CREDS, - TYPE_QCRYPTO_TLS_CREDS) - typedef struct QCryptoTLSCredsClass QCryptoTLSCredsClass; +DECLARE_OBJ_CHECKERS(QCryptoTLSCreds, QCryptoTLSCredsClass, QCRYPTO_TLS_CREDS, + TYPE_QCRYPTO_TLS_CREDS) + #define QCRYPTO_TLS_CREDS_DH_PARAMS "dh-params.pem" +typedef bool (*CryptoTLSCredsReload)(QCryptoTLSCreds *, Error **); /** * QCryptoTLSCreds: * @@ -61,6 +62,7 @@ struct QCryptoTLSCreds { struct QCryptoTLSCredsClass { ObjectClass parent_class; + CryptoTLSCredsReload reload; }; -- cgit v1.1 From 1f08e3415120637cad7f540d9ceb4dba3136dbdd Mon Sep 17 00:00:00 2001 From: Zihao Chang Date: Tue, 16 Mar 2021 15:58:44 +0800 Subject: vnc: support reload x509 certificates for vnc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch add vnc_display_reload_certs() to support update x509 certificates. Signed-off-by: Zihao Chang Reviewed-by: Daniel P. Berrangé Message-Id: <20210316075845.1476-3-changzihao1@huawei.com> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/ui/console.h b/include/ui/console.h index c960b70..2714038 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -476,6 +476,7 @@ int vnc_display_password(const char *id, const char *password); int vnc_display_pw_expire(const char *id, time_t expires); void vnc_parse(const char *str); int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp); +bool vnc_display_reload_certs(const char *id, Error **errp); /* input.c */ int index_from_key(const char *key, size_t key_length); -- cgit v1.1 From 181b4bbf610c9126f499e2c516fb9b2a880468b8 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Sun, 14 Mar 2021 16:39:27 +0000 Subject: include/ui/console.h: Delete is_surface_bgr() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function is_surface_bgr() is no longer used anywhere, so we can delete it. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210314163927.1184-1-peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include') diff --git a/include/ui/console.h b/include/ui/console.h index 2714038..ca3c7af 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -267,16 +267,6 @@ PixelFormat qemu_default_pixelformat(int bpp); DisplaySurface *qemu_create_displaysurface(int width, int height); void qemu_free_displaysurface(DisplaySurface *surface); -static inline int is_surface_bgr(DisplaySurface *surface) -{ - if (PIXMAN_FORMAT_BPP(surface->format) == 32 && - PIXMAN_FORMAT_TYPE(surface->format) == PIXMAN_TYPE_ABGR) { - return 1; - } else { - return 0; - } -} - static inline int is_buffer_shared(DisplaySurface *surface) { return !(surface->flags & QEMU_ALLOCATED_FLAG); -- cgit v1.1