Duplicate PEM when accepted.

This commit is contained in:
Armin Novak 2018-11-30 11:41:51 +01:00
parent e04c319d21
commit b27470405c

View File

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