From 49d5234b39aa491747864efba1c2246c6e960b6f Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 12 Nov 2012 04:06:03 +0100 Subject: Load own certs from \certs --- src/common/server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/server.c') diff --git a/src/common/server.c b/src/common/server.c index 360fb2c6..dbfdcdd8 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -1727,14 +1727,14 @@ server_connect (server *serv, char *hostname, int port, int no_login) char *cert_file; /* first try network specific cert/key */ - cert_file = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s.pem", + cert_file = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "certs" G_DIR_SEPARATOR_S "%s.pem", get_xdir (), server_get_network (serv, TRUE)); if (SSL_CTX_use_certificate_file (ctx, cert_file, SSL_FILETYPE_PEM) == 1) SSL_CTX_use_PrivateKey_file (ctx, cert_file, SSL_FILETYPE_PEM); else { - /* if that doesn't exist, try /client.pem */ - cert_file = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "client.pem", get_xdir ()); + /* if that doesn't exist, try /certs/client.pem */ + cert_file = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "certs" G_DIR_SEPARATOR_S "client.pem", get_xdir ()); if (SSL_CTX_use_certificate_file (ctx, cert_file, SSL_FILETYPE_PEM) == 1) SSL_CTX_use_PrivateKey_file (ctx, cert_file, SSL_FILETYPE_PEM); } -- cgit 1.4.1