Skip to content

Commit

Permalink
fix build with openssl < 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
amazingfate authored and akallabeth committed Feb 23, 2024
1 parent 4b2d877 commit e21afef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions libfreerdp/crypto/privatekey.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,19 @@ char* freerdp_key_get_param(const rdpPrivateKey* key, enum FREERDP_KEY_PARAM par
switch (param)
{
case FREERDP_KEY_PARAM_RSA_D:
#if OPENSSL_VERSION_NUMBER >= 0x10101007L
cbn = RSA_get0_d(rsa);
#endif
break;
case FREERDP_KEY_PARAM_RSA_E:
#if OPENSSL_VERSION_NUMBER >= 0x10101007L
cbn = RSA_get0_e(rsa);
#endif
break;
case FREERDP_KEY_PARAM_RSA_N:
#if OPENSSL_VERSION_NUMBER >= 0x10101007L
cbn = RSA_get0_n(rsa);
#endif
break;
default:
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion libfreerdp/crypto/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ TlsHandshakeResult freerdp_tls_accept_ex(rdpTls* tls, BIO* underlying, rdpSettin
* Disable SSL client site renegotiation.
*/

#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x30000000L) && \
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) && (OPENSSL_VERSION_NUMBER < 0x30000000L) && \
!defined(LIBRESSL_VERSION_NUMBER)
options |= SSL_OP_NO_RENEGOTIATION;
#endif
Expand Down
2 changes: 2 additions & 0 deletions libfreerdp/emu/scard/smartcard_virtual_gids.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,10 @@ static BOOL vgids_perform_digital_signature(vgidsContext* context)
{ g_PKCS1_SHA256, sizeof(g_PKCS1_SHA256), EVP_sha256() },
{ g_PKCS1_SHA384, sizeof(g_PKCS1_SHA384), EVP_sha384() },
{ g_PKCS1_SHA512, sizeof(g_PKCS1_SHA512), EVP_sha512() },
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
{ g_PKCS1_SHA512_224, sizeof(g_PKCS1_SHA512_224), EVP_sha512_224() },
{ g_PKCS1_SHA512_256, sizeof(g_PKCS1_SHA512_256), EVP_sha512_256() }
#endif
};

if (!pk)
Expand Down

0 comments on commit e21afef

Please sign in to comment.