libfreerdp/core/certificate: open key file for reading only

There's no point in writing the key file for read-write, and it makes it
impossible to run the shadow server with the key file being read only.
This commit is contained in:
KOVACS Krisztian 2017-09-28 14:00:18 +02:00
parent 5189814930
commit c13c9035eb

View File

@ -753,7 +753,7 @@ rdpRsaKey* key_new(const char* keyfile)
char* buffer = NULL;
rdpRsaKey* key = NULL;
fp = fopen(keyfile, "r+b");
fp = fopen(keyfile, "rb");
if (!fp)
{
WLog_ERR(TAG, "unable to open RSA key file %s: %s.", keyfile, strerror(errno));