Fix #5115: Cast PEM data from BYTE* to char* to silence warnings.

This commit is contained in:
Armin Novak 2018-12-07 12:36:18 +01:00
parent 696fa22fb4
commit d05217454f

View File

@ -1192,20 +1192,24 @@ static BOOL is_accepted(rdpTls* tls, const BYTE* pem, size_t length)
static BOOL accept_cert(rdpTls* tls, const BYTE* pem, UINT32 length)
{
rdpSettings* settings = tls->settings;
char* dupPem = _strdup((const char*) pem);
if (!dupPem)
return FALSE;
if (tls->isGatewayTransport)
{
settings->GatewayAcceptedCert = _strdup(pem);
settings->GatewayAcceptedCert = dupPem;
settings->GatewayAcceptedCertLength = length;
}
else if (is_redirected(tls))
{
settings->RedirectionAcceptedCert = _strdup(pem);
settings->RedirectionAcceptedCert = dupPem;
settings->RedirectionAcceptedCertLength = length;
}
else
{
settings->AcceptedCert = _strdup(pem);
settings->AcceptedCert = dupPem;
settings->AcceptedCertLength = length;
}