mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-07 13:52:43 -04:00
Fixed problem with utf characters in the %APPDATA% path on Windows.
Added function for opening files on Windows and Linux - RsDirUtil::rs_fopen. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4124 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bc78397a64
commit
bc113326e4
17 changed files with 109 additions and 119 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "authgpg.h"
|
||||
#include "pqi/p3connmgr.h"
|
||||
#include "serialiser/rsconfigitems.h"
|
||||
#include "util/rsdir.h"
|
||||
|
||||
/******************** notify of new Cert **************************/
|
||||
#include "pqinotify.h"
|
||||
|
@ -178,7 +179,7 @@ static int initLib = 0;
|
|||
SSL_CTX_set_cipher_list(sslctx, "DEFAULT");
|
||||
|
||||
// certificates (Set Local Server Certificate).
|
||||
FILE *ownfp = fopen(cert_file, "r");
|
||||
FILE *ownfp = RsDirUtil::rs_fopen(cert_file, "r");
|
||||
if (ownfp == NULL)
|
||||
{
|
||||
std::cerr << "Couldn't open Own Certificate!" << std::endl;
|
||||
|
@ -201,7 +202,7 @@ static int initLib = 0;
|
|||
mOwnPublicKey = X509_get_pubkey(x509);
|
||||
|
||||
// get private key
|
||||
FILE *pkfp = fopen(priv_key_file, "rb");
|
||||
FILE *pkfp = RsDirUtil::rs_fopen(priv_key_file, "rb");
|
||||
if (pkfp == NULL)
|
||||
{
|
||||
std::cerr << "Couldn't Open PrivKey File!" << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue