[crypto,cert] remove rsa check

the rsa keys to be checked are on the deprecation list for most SSL
libraries so the function might fail unexpectedly
This commit is contained in:
akallabeth 2023-02-14 12:58:24 +01:00 committed by Martin Fleisz
parent abec62c3af
commit 66245e7a00

View File

@ -283,19 +283,6 @@ static BOOL is_rsa_key(const X509* x509)
return (EVP_PKEY_id(evp) == EVP_PKEY_RSA);
}
static BOOL blob_is_rsa_key(const rdpCertBlob* cert)
{
WINPR_ASSERT(cert);
const BYTE* inData = cert->data;
X509* x509 = d2i_X509(NULL, &inData, cert->length);
if (!x509)
return FALSE;
BOOL rc = is_rsa_key(x509);
X509_free(x509);
return rc;
}
static BOOL certificate_read_x509_certificate(const rdpCertBlob* cert, rdpCertInfo* info)
{
wStream sbuffer = { 0 };
@ -312,12 +299,6 @@ static BOOL certificate_read_x509_certificate(const rdpCertBlob* cert, rdpCertIn
cert_info_free(info);
if (!blob_is_rsa_key(cert))
{
WLog_ERR(TAG, "Certificate is not of RSA type");
return FALSE;
}
s = Stream_StaticConstInit(&sbuffer, cert->data, cert->length);
if (!s)