Browse Source

[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
tags/v1.0.90
Adam Tkac 13 years ago
parent
commit
437b0c2fc3
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      common/rfb/CSecurityTLS.cxx

+ 6
- 6
common/rfb/CSecurityTLS.cxx View File

@@ -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)

Loading…
Cancel
Save