diff options
author | comex <comexk@gmail.com> | 2023-06-26 04:23:23 +0200 |
---|---|---|
committer | comex <comexk@gmail.com> | 2023-06-26 04:24:49 +0200 |
commit | d885dd5b642807d0587acad43668cfccfdf06d1e (patch) | |
tree | b3f4ac530883702313901f9d48453577ce060175 /src/core/hle/service/ssl/ssl_backend_openssl.cpp | |
parent | network.cpp: include expected.h (diff) | |
download | yuzu-d885dd5b642807d0587acad43668cfccfdf06d1e.tar yuzu-d885dd5b642807d0587acad43668cfccfdf06d1e.tar.gz yuzu-d885dd5b642807d0587acad43668cfccfdf06d1e.tar.bz2 yuzu-d885dd5b642807d0587acad43668cfccfdf06d1e.tar.lz yuzu-d885dd5b642807d0587acad43668cfccfdf06d1e.tar.xz yuzu-d885dd5b642807d0587acad43668cfccfdf06d1e.tar.zst yuzu-d885dd5b642807d0587acad43668cfccfdf06d1e.zip |
Diffstat (limited to 'src/core/hle/service/ssl/ssl_backend_openssl.cpp')
-rw-r--r-- | src/core/hle/service/ssl/ssl_backend_openssl.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/service/ssl/ssl_backend_openssl.cpp b/src/core/hle/service/ssl/ssl_backend_openssl.cpp index bc797b76b..e7d5801fd 100644 --- a/src/core/hle/service/ssl/ssl_backend_openssl.cpp +++ b/src/core/hle/service/ssl/ssl_backend_openssl.cpp @@ -90,15 +90,15 @@ public: Result DoHandshake() override { SSL_set_verify_result(ssl_, X509_V_OK); - int ret = SSL_do_handshake(ssl_); - long verify_result = SSL_get_verify_result(ssl_); + const int ret = SSL_do_handshake(ssl_); + const long verify_result = SSL_get_verify_result(ssl_); if (verify_result != X509_V_OK) { LOG_ERROR(Service_SSL, "SSL cert verification failed because: {}", X509_verify_cert_error_string(verify_result)); return CheckOpenSSLErrors(); } if (ret <= 0) { - int ssl_err = SSL_get_error(ssl_, ret); + const int ssl_err = SSL_get_error(ssl_, ret); if (ssl_err == SSL_ERROR_ZERO_RETURN || (ssl_err == SSL_ERROR_SYSCALL && got_read_eof_)) { LOG_ERROR(Service_SSL, "SSL handshake failed because server hung up"); @@ -110,18 +110,18 @@ public: ResultVal<size_t> Read(std::span<u8> data) override { size_t actual; - int ret = SSL_read_ex(ssl_, data.data(), data.size(), &actual); + const int ret = SSL_read_ex(ssl_, data.data(), data.size(), &actual); return HandleReturn("SSL_read_ex", actual, ret); } ResultVal<size_t> Write(std::span<const u8> data) override { size_t actual; - int ret = SSL_write_ex(ssl_, data.data(), data.size(), &actual); + const int ret = SSL_write_ex(ssl_, data.data(), data.size(), &actual); return HandleReturn("SSL_write_ex", actual, ret); } ResultVal<size_t> HandleReturn(const char* what, size_t actual, int ret) { - int ssl_err = SSL_get_error(ssl_, ret); + const int ssl_err = SSL_get_error(ssl_, ret); CheckOpenSSLErrors(); switch (ssl_err) { case SSL_ERROR_NONE: @@ -255,7 +255,7 @@ public: ResultVal<std::unique_ptr<SSLConnectionBackend>> CreateSSLConnectionBackend() { auto conn = std::make_unique<SSLConnectionBackendOpenSSL>(); - Result res = conn->Init(); + const Result res = conn->Init(); if (res.IsFailure()) { return res; } |