aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2011-02-07 10:46:16 +0000
committerAdam Tkac <atkac@redhat.com>2011-02-07 10:46:16 +0000
commit437b0c2fc39f6d4bcdb5ffe7f8d2c28e1df166e3 (patch)
tree19a16c11c789ad51d02d152bd17d5b884ab0392a /common
parent8311f4e2e43af11439fa3fd79377591d67de738a (diff)
downloadtigervnc-437b0c2fc39f6d4bcdb5ffe7f8d2c28e1df166e3.tar.gz
tigervnc-437b0c2fc39f6d4bcdb5ffe7f8d2c28e1df166e3.zip
[Bugfix] Append ".pem" suffix to saved certificates.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4254 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common')
-rw-r--r--common/rfb/CSecurityTLS.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index 427d2005..3877fe45 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -95,10 +95,10 @@ void CSecurityTLS::setDefaults()
}
int len = strlen(homeDir) + 1;
- CharArray caDefault(len + 7);
- CharArray crlDefault(len + 8);
- sprintf(caDefault.buf, "%sx509_ca", homeDir);
- sprintf(crlDefault.buf, "%s509_crl", homeDir);
+ CharArray caDefault(len + 11);
+ CharArray crlDefault(len + 12);
+ sprintf(caDefault.buf, "%sx509_ca.pem", homeDir);
+ sprintf(crlDefault.buf, "%s509_crl.pem", homeDir);
delete [] homeDir;
x509ca.setDefaultStr(strdup(caDefault.buf));
@@ -349,8 +349,8 @@ void CSecurityTLS::checkSession()
vlog.error("Could not obtain VNC home directory path");
else {
FILE *f;
- CharArray caSave(strlen(homeDir) + 11);
- sprintf(caSave.buf, "%sx509_certs", homeDir);
+ CharArray caSave(strlen(homeDir) + 1 + 19);
+ sprintf(caSave.buf, "%sx509_savedcerts.pem", homeDir);
delete [] homeDir;
f = fopen(caSave.buf, "a+");
if (!f)