Azure / azure-c-shared-utility

Azure C SDKs common code
Other
111 stars 203 forks source link

Support OpenSSL-3.0 #565

Closed saulwold closed 2 years ago

saulwold commented 2 years ago

Currently when building the azure-c-shared-utility using OpenSSL 3.0 a number of errors occur during compliation:

adapters/x509_openssl.c:79:28: error: invalid use of incomplete typedef 'SSL_CTX' {aka 'struct ssl_ctx_st'} if (ssl_ctx->extra_certs != NULL) ^~ In file included from usr/include/openssl/ssl.h:31, from inc/azure_c_shared_utility/x509_openssl.h:7, from adapters/x509_openssl.c:4:

adapters/x509_openssl.c:148:9: error: 'SSL_CTX_use_RSAPrivateKey' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] if (SSL_CTX_use_RSAPrivateKey(ssl_ctx, privatekey) != 1) ^~ In file included from inc/azure_c_shared_utility/x509_openssl.h:7, from adapters/x509_openssl.c:4:

/usr/include/openssl/ssl.h:1798:12: note: declared here __owur int SSL_CTX_use_RSAPrivateKey(SSL_CTX ctx, RSA rsa); ^~~~~~~~~

adapters/x509_openssl.c:160:9: error: 'RSA_free' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] RSA_free(privatekey); ^~~~

danewalton commented 2 years ago

Yes at the moment we don't support OpenSSL 3.0. It is not currently on our roadmap but I will convert this to a discussion as a feature ask.