Sequoia crashes on call to SSL_CTX_new()

Code I have used for years on Macs now crashes after updating OS:

SSL_CTX *sslctx = SSL_CTX_new(SSLv23_client_method());

Reading the posts about TLS changes, I change it to this:

SSL_CTX *sslctx = SSL_CTX_new(TLS_client_method());

In fact any method I give results in crash.. Is this a known issue? Is there something I now need to call before calling SSL_CTX_new()?

Answered by DTS Engineer in 805647022

It looks like your calling OpenSSL directly. macOS has a built-in copy of OpenSSL, but that’s not been a supported public API for… well… for more than a decade [1].

I see two possibilities here:

  • You’re using your own copy of OpenSSL, one that you built from source.

  • You’ve been using macOS’s copy for all those years.

If it’s the first, it’s not something I can help you with. From my perspective, OpenSSL is like any other open source library you use: You either have to take ownership of the code and debug such problems yourself, or seek help via the library’s support channel.

OTOH, if you’re using macOS’s OpenSSL, I think this is the universe telling you that it’s time to stop (-:

In that case, you might want to look at Network framework. It has a modern, full-featured TLS implementation built in.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] IIRC we officially deprecated it in macOS 10.7, announcing that at WWDC 2010!

It looks like your calling OpenSSL directly. macOS has a built-in copy of OpenSSL, but that’s not been a supported public API for… well… for more than a decade [1].

I see two possibilities here:

  • You’re using your own copy of OpenSSL, one that you built from source.

  • You’ve been using macOS’s copy for all those years.

If it’s the first, it’s not something I can help you with. From my perspective, OpenSSL is like any other open source library you use: You either have to take ownership of the code and debug such problems yourself, or seek help via the library’s support channel.

OTOH, if you’re using macOS’s OpenSSL, I think this is the universe telling you that it’s time to stop (-:

In that case, you might want to look at Network framework. It has a modern, full-featured TLS implementation built in.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] IIRC we officially deprecated it in macOS 10.7, announcing that at WWDC 2010!

Sequoia crashes on call to SSL_CTX_new()
 
 
Q