diff --git a/pppd/crypto.c b/pppd/crypto.c index 3576afd5..8e982619 100644 --- a/pppd/crypto.c +++ b/pppd/crypto.c @@ -43,7 +43,6 @@ #ifdef PPP_WITH_OPENSSL #include #include -#endif #if OPENSSL_VERSION_NUMBER >= 0x30000000L #include @@ -53,6 +52,7 @@ struct crypto_ctx { OSSL_PROVIDER *provider; } g_crypto_ctx; #endif +#endif PPP_MD_CTX *PPP_MD_CTX_new() { @@ -200,6 +200,7 @@ int PPP_crypto_init() { int retval = 0; +#ifdef PPP_WITH_OPENSSL #if OPENSSL_VERSION_NUMBER >= 0x30000000L g_crypto_ctx.legacy = OSSL_PROVIDER_load(NULL, "legacy"); if (g_crypto_ctx.legacy == NULL) @@ -214,6 +215,7 @@ int PPP_crypto_init() PPP_crypto_error("Could not load default provider"); goto done; } +#endif #endif retval = 1; @@ -225,6 +227,7 @@ int PPP_crypto_init() int PPP_crypto_deinit() { +#ifdef PPP_WITH_OPENSSL #if OPENSSL_VERSION_NUMBER >= 0x30000000L if (g_crypto_ctx.legacy) { OSSL_PROVIDER_unload(g_crypto_ctx.legacy); @@ -239,6 +242,7 @@ int PPP_crypto_deinit() #if OPENSSL_VERSION_NUMBER < 0x10100000L ERR_free_strings(); +#endif #endif return 1; }