mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[compat,libressl] fix compilation issues
This commit is contained in:
@@ -180,7 +180,13 @@ X509* x509_from_rsa(const RSA* rsa)
|
||||
{
|
||||
EVP_PKEY* pubkey = NULL;
|
||||
X509* x509 = NULL;
|
||||
BIO* bio = BIO_new(BIO_s_secmem());
|
||||
BIO* bio = BIO_new(
|
||||
#if defined(LIBRESSL_VERSION_NUMBER)
|
||||
BIO_s_mem()
|
||||
#else
|
||||
BIO_s_secmem()
|
||||
#endif
|
||||
);
|
||||
if (!bio)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -99,7 +99,13 @@ static RSA* evp_pkey_to_rsa(const rdpPrivateKey* key)
|
||||
}
|
||||
|
||||
RSA* rsa = NULL;
|
||||
BIO* bio = BIO_new(BIO_s_secmem());
|
||||
BIO* bio = BIO_new(
|
||||
#if defined(LIBRESSL_VERSION_NUMBER)
|
||||
BIO_s_mem()
|
||||
#else
|
||||
BIO_s_secmem()
|
||||
#endif
|
||||
);
|
||||
if (!bio)
|
||||
return NULL;
|
||||
const int rc = PEM_write_bio_PrivateKey(bio, key->evp, NULL, NULL, 0, NULL, NULL);
|
||||
|
||||
@@ -1107,8 +1107,8 @@ TlsHandshakeResult freerdp_tls_accept_ex(rdpTls* tls, BIO* underlying, rdpSettin
|
||||
* Disable SSL client site renegotiation.
|
||||
*/
|
||||
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && OPENSSL_VERSION_NUMBER < 0x30000000L) || \
|
||||
defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x30000000L) && \
|
||||
!defined(LIBRESSL_VERSION_NUMBER)
|
||||
options |= SSL_OP_NO_RENEGOTIATION;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ static char* makecert_read_str(BIO* bio, size_t* pOffset)
|
||||
length = new_len;
|
||||
x509_str = new_str;
|
||||
ERR_clear_error();
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
status = BIO_read_ex(bio, &x509_str[offset], length - offset, &readBytes);
|
||||
#else
|
||||
status = BIO_read(bio, &x509_str[offset], length - offset);
|
||||
|
||||
Reference in New Issue
Block a user