--- a/lib/mega.c
+++ b/lib/mega.c
@@ -803,7 +803,7 @@
     return FALSE;
   }
 
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
   RSA_get0_key(key, &k->m, &k->e, &k->d);
   RSA_get0_factors(key, &k->q, &k->p);
   RSA_get0_crt_params(key, NULL, NULL, &k->u);
