[+] TLSErrorToString
[*] Send break should always perserve writeptr
This commit is contained in:
parent
2b72228b9e
commit
f1ac21a379
@ -14,6 +14,7 @@
|
||||
#include <mbedtls/ctr_drbg.h>
|
||||
#include <mbedtls/ssl.h>
|
||||
#include <mbedtls/x509.h>
|
||||
#include <mbedtls/error.h>
|
||||
|
||||
namespace Aurora::IO::TLS
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ namespace Aurora::IO::TLS
|
||||
|
||||
if (gSupportedSuites.empty())
|
||||
{
|
||||
auto iItr = mbedtls_ssl_list_ciphersuites();
|
||||
auto iItr = ::mbedtls_ssl_list_ciphersuites();
|
||||
|
||||
while (auto cipher = *(iItr++))
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace Aurora::IO::TLS
|
||||
|
||||
AUKN_SYM AuUInt16 CipherSuiteFromString(const AuString &string)
|
||||
{
|
||||
auto pSuite = mbedtls_ssl_ciphersuite_from_string(string.c_str());
|
||||
auto pSuite = ::mbedtls_ssl_ciphersuite_from_string(string.c_str());
|
||||
if (!pSuite)
|
||||
{
|
||||
SysPushErrorCrypt("Unknown ciphersuite: {}", string);
|
||||
@ -60,7 +60,7 @@ namespace Aurora::IO::TLS
|
||||
|
||||
AUKN_SYM AuString CipherSuiteToString(AuUInt16 uCipherSuite)
|
||||
{
|
||||
auto pSuite = mbedtls_ssl_ciphersuite_from_id(uCipherSuite);
|
||||
auto pSuite = ::mbedtls_ssl_ciphersuite_from_id(uCipherSuite);
|
||||
if (!pSuite)
|
||||
{
|
||||
SysPushErrorCrypt("Unknown ciphersuite: {} ({:02x})", uCipherSuite, uCipherSuite);
|
||||
|
@ -19,7 +19,9 @@ namespace Aurora::IO::TLS
|
||||
|
||||
AuString TLSErrorToString(int iError)
|
||||
{
|
||||
return {};
|
||||
char description[1024];
|
||||
::mbedtls_strerror(iError, description, AuArraySize(description));
|
||||
return description;
|
||||
}
|
||||
|
||||
void TLSInit()
|
||||
|
@ -126,7 +126,7 @@ namespace Aurora::IO::TLS
|
||||
// ...
|
||||
if (!uCount)
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// mbedtls tick
|
||||
|
Loading…
Reference in New Issue
Block a user