mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-05 05:26:27 +00:00
ovirt: Only set SPICE CA cert if it's non NULL
We currently reuse the oVirt CA cert for SPICE connection as well, but it may not be set. When this happens, we don't want to try to use it.
This commit is contained in:
parent
daa499f27e
commit
73a4e9993d
@ -803,14 +803,18 @@ create_ovirt_session(VirtViewerApp *app, const char *uri)
|
||||
SpiceSession *session;
|
||||
GByteArray *ca_cert;
|
||||
|
||||
g_object_get(G_OBJECT(proxy), "ca-cert", &ca_cert, NULL);
|
||||
session = remote_viewer_get_spice_session(REMOTE_VIEWER(app));
|
||||
g_object_set(G_OBJECT(session),
|
||||
"ca", ca_cert,
|
||||
"password", ticket,
|
||||
"cert-subject", host_subject,
|
||||
NULL);
|
||||
g_byte_array_unref(ca_cert);
|
||||
g_object_get(G_OBJECT(proxy), "ca-cert", &ca_cert, NULL);
|
||||
if (ca_cert != NULL) {
|
||||
g_object_set(G_OBJECT(session),
|
||||
"ca", ca_cert,
|
||||
NULL);
|
||||
g_byte_array_unref(ca_cert);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user