diff options
| author | 2023-06-25 16:09:16 -0700 | |
|---|---|---|
| committer | 2023-06-25 16:09:16 -0700 | |
| commit | 42015de49b578108a1a82b8df947397d2d123ad4 (patch) | |
| tree | cc29a637a972783195779ff69bf0e260837bc58f /src | |
| parent | Fixes: (diff) | |
| download | yuzu-42015de49b578108a1a82b8df947397d2d123ad4.tar.gz yuzu-42015de49b578108a1a82b8df947397d2d123ad4.tar.xz yuzu-42015de49b578108a1a82b8df947397d2d123ad4.zip | |
ssl: fix compatibility with OpenSSL 1.1.1
Turns out changes were needed after all.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/ssl/ssl_backend_openssl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/hle/service/ssl/ssl_backend_openssl.cpp b/src/core/hle/service/ssl/ssl_backend_openssl.cpp index edbf0ad3e..bc797b76b 100644 --- a/src/core/hle/service/ssl/ssl_backend_openssl.cpp +++ b/src/core/hle/service/ssl/ssl_backend_openssl.cpp | |||
| @@ -233,8 +233,10 @@ public: | |||
| 233 | return 1; | 233 | return 1; |
| 234 | case BIO_CTRL_PUSH: | 234 | case BIO_CTRL_PUSH: |
| 235 | case BIO_CTRL_POP: | 235 | case BIO_CTRL_POP: |
| 236 | #ifdef BIO_CTRL_GET_KTLS_SEND | ||
| 236 | case BIO_CTRL_GET_KTLS_SEND: | 237 | case BIO_CTRL_GET_KTLS_SEND: |
| 237 | case BIO_CTRL_GET_KTLS_RECV: | 238 | case BIO_CTRL_GET_KTLS_RECV: |
| 239 | #endif | ||
| 238 | // We don't support these operations, but don't bother logging them | 240 | // We don't support these operations, but don't bother logging them |
| 239 | // as they're nothing unusual. | 241 | // as they're nothing unusual. |
| 240 | return 0; | 242 | return 0; |
| @@ -269,7 +271,14 @@ Result CheckOpenSSLErrors() { | |||
| 269 | const char* func; | 271 | const char* func; |
| 270 | const char* data; | 272 | const char* data; |
| 271 | int flags; | 273 | int flags; |
| 272 | while ((rc = ERR_get_error_all(&file, &line, &func, &data, &flags))) { | 274 | #if OPENSSL_VERSION_NUMBER >= 0x30000000L |
| 275 | while ((rc = ERR_get_error_all(&file, &line, &func, &data, &flags))) | ||
| 276 | #else | ||
| 277 | // Can't get function names from OpenSSL on this version, so use mine: | ||
| 278 | func = __func__; | ||
| 279 | while ((rc = ERR_get_error_line_data(&file, &line, &data, &flags))) | ||
| 280 | #endif | ||
| 281 | { | ||
| 273 | std::string msg; | 282 | std::string msg; |
| 274 | msg.resize(1024, '\0'); | 283 | msg.resize(1024, '\0'); |
| 275 | ERR_error_string_n(rc, msg.data(), msg.size()); | 284 | ERR_error_string_n(rc, msg.data(), msg.size()); |