diff --git a/include/freerdp/crypto/certificate.h b/include/freerdp/crypto/certificate.h index 63c29eaa4..c44694363 100644 --- a/include/freerdp/crypto/certificate.h +++ b/include/freerdp/crypto/certificate.h @@ -39,6 +39,8 @@ extern "C" FREERDP_API void freerdp_certificate_free(rdpCertificate* certificate); + FREERDP_API BOOL freerdp_certificate_is_rsa(const rdpCertificate* certificate); + FREERDP_API char* freerdp_certificate_get_hash(const rdpCertificate* certificate, const char* hash, size_t* plength); diff --git a/include/freerdp/crypto/privatekey.h b/include/freerdp/crypto/privatekey.h index d7fd8278b..c06c40629 100644 --- a/include/freerdp/crypto/privatekey.h +++ b/include/freerdp/crypto/privatekey.h @@ -36,6 +36,8 @@ extern "C" FREERDP_API rdpPrivateKey* freerdp_key_new_from_pem(const char* pem); FREERDP_API void freerdp_key_free(rdpPrivateKey* key); + FREERDP_API BOOL freerdp_key_is_rsa(const rdpPrivateKey* key); + #ifdef __cplusplus } #endif diff --git a/libfreerdp/crypto/certificate.c b/libfreerdp/crypto/certificate.c index ae7ced4b4..0a1445d63 100644 --- a/libfreerdp/crypto/certificate.c +++ b/libfreerdp/crypto/certificate.c @@ -1492,3 +1492,9 @@ BYTE* freerdp_certificate_get_der(const rdpCertificate* cert, size_t* pLength) *pLength = (size_t)rc; return ptr; } + +BOOL freerdp_certificate_is_rsa(const rdpCertificate* cert) +{ + WINPR_ASSERT(cert); + return cert->isRSA; +} diff --git a/libfreerdp/crypto/privatekey.c b/libfreerdp/crypto/privatekey.c index c88b6377b..a68ee5572 100644 --- a/libfreerdp/crypto/privatekey.c +++ b/libfreerdp/crypto/privatekey.c @@ -311,3 +311,9 @@ EVP_PKEY* freerdp_key_get_evp_pkey(const rdpPrivateKey* key) EVP_PKEY_up_ref(evp); return evp; } + +BOOL freerdp_key_is_rsa(const rdpPrivateKey* key) +{ + WINPR_ASSERT(key); + return key->isRSA; +}