- Add missing virtual destructor on `SSLBackend`.

- On Windows, filter out `POLLWRBAND` (one of the new flags added) when
  calling `WSAPoll`, because despite the constant being defined on
  Windows, passing it calls `WSAPoll` to yield `EINVAL`.

- Reduce OpenSSL version requirement to satisfy CI; I haven't tested
  whether it actually builds (or runs) against 1.1.1, but if not, I'll
  figure it out.

- Change an instance of memcpy to memmove, even though the arguments
  cannot overlap, to avoid a [strange GCC
  error](https://github.com/yuzu-emu/yuzu/pull/10912#issuecomment-1606283351).
This commit is contained in:
comex 2023-06-25 14:57:34 -07:00
parent 8905142f43
commit 4a35569921
4 changed files with 12 additions and 4 deletions

View file

@ -96,7 +96,7 @@ static void Append(std::vector<u8>& vec, T t) {
static void AppendNulTerminated(std::vector<u8>& vec, std::string_view str) {
size_t off = vec.size();
vec.resize(off + str.size() + 1);
std::memcpy(vec.data() + off, str.data(), str.size());
std::memmove(vec.data() + off, str.data(), str.size());
}
// We implement gethostbyname using the host's getaddrinfo rather than the

View file

@ -31,6 +31,7 @@ constexpr Result ResultWouldBlock{ErrorModule::SSLSrv, 204};
class SSLConnectionBackend {
public:
virtual ~SSLConnectionBackend() {}
virtual void SetSocket(std::shared_ptr<Network::SocketBase> socket) = 0;
virtual Result SetHostName(const std::string& hostname) = 0;
virtual Result DoHandshake() = 0;