More SSL stuff (still doesn't work :/).

This commit is contained in:
2024-08-27 19:52:08 +02:00
parent 0be34a845a
commit a43f92fb58
7 changed files with 156 additions and 28 deletions

View File

@@ -257,6 +257,34 @@ public:
return result;
}
[[nodiscard]]
int getReadRequest() const noexcept
{
return BIO_get_read_request(handle_);
}
[[nodiscard]]
int getWriteGuarantee() const noexcept
{
return BIO_get_write_guarantee(handle_);
}
[[nodiscard]]
int getWritePending() const noexcept
{
return BIO_wpending(handle_);
}
Error flush() const noexcept
{
ERR_clear_error();
if (!BIO_flush(handle_))
{
return Error::current();
}
return {};
}
static void upReferences(BIO* handle) noexcept
{
BIO_up_ref(handle);
@@ -371,6 +399,12 @@ public:
return result;
}
[[nodiscard]]
int pending() const noexcept
{
return SSL_pending(handle_);
}
static void upReferences(SSL* handle) noexcept
{
SSL_up_ref(handle);