Merge pull request #4226 from krisztian-kovacs-balabit/open-x509-keyfile-readonly

libfreerdp/core/certificate: open key file for reading only
This commit is contained in:
David Fort 2017-11-09 18:11:12 +01:00 committed by GitHub
commit dcafd4dacd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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