summaryrefslogtreecommitdiffstats
path: root/client/x11
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2009-12-30 16:07:14 +0200
committerYaniv Kamay <ykamay@redhat.com>2010-01-06 16:06:46 +0200
commite38a61900711169d66b1fa7e117b04d49106a1da (patch)
tree15765c0bb0bcf7b8133203340350c09902cec541 /client/x11
parent54a8e5027093baa1c847b43f2fb08bea93e0ed67 (diff)
downloadspice-e38a61900711169d66b1fa7e117b04d49106a1da.tar.gz
spice-e38a61900711169d66b1fa7e117b04d49106a1da.tar.xz
spice-e38a61900711169d66b1fa7e117b04d49106a1da.zip
server,client: server authentication for secured channels. #527411 #549673.
3 available mechanisms: by public key, by host name, and by certificate subject name. In the former method, chain of trust verification is not performed. The CA certificate files are looked for under <spice-config-dir>/spice_truststore.pem windows <spice-config-dir>=%APPDATA%\spicec\ linux <spice-config-dir>=$HOME/.spicec
Diffstat (limited to 'client/x11')
-rw-r--r--client/x11/platform.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index a1c08ca8..cff22891 100644
--- a/client/x11/platform.cpp
+++ b/client/x11/platform.cpp
@@ -64,6 +64,8 @@
#define USE_XRANDR_1_2
#endif
+#define SPICE_CONFIG_DIR ".spicec/"
+
static Display* x_display = NULL;
static bool x_shm_avail = false;
static XVisualInfo **vinfo = NULL;
@@ -1895,6 +1897,18 @@ bool Platform::is_monitors_pos_valid()
return (ScreenCount(x_display) == 1);
}
+void Platform::get_spice_config_dir(std::string& path)
+{
+ char* home_dir = getenv("HOME");
+ if (!home_dir) {
+ throw Exception("get home dir failed");
+ }
+
+ path = home_dir;
+ path += "/";
+ path += SPICE_CONFIG_DIR;
+}
+
static void root_win_proc(XEvent& event)
{
#ifdef USE_XRANDR_1_2