AuroraRuntime/Source/IO/TLS/TLSCertificateChain.hpp
Reece Wilson d9dd1182b9 [+] TLS pinning
[*] ISocket::Shutdown(*bool bNow*), allowing for flush of the send channel when false
[*] Fix StartRead and StartWrite after shutdown (NT)
[*] Amended dead-lock
2022-11-18 04:44:47 +00:00

30 lines
930 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: TLSCertificateChain.hpp
Date: 2022-8-27
Author: Reece
***/
#pragma once
namespace Aurora::IO::TLS
{
struct CertificateChain : ICertificateChain, AuEnableSharedFromThis<CertificateChain>
{
CertificateChain();
~CertificateChain();
virtual AuUInt32 GetCertificateCount() override;
virtual AuSPtr<AuMemoryViewRead> GetCertificate(AuUInt32 idx) override;
virtual Crypto::X509::DecodedCertificate GetCertificateDetails(AuUInt32 idx) override;
bool Init(const AuList<AuByteBuffer> &certs);
bool Init(const AuList<AuMemoryViewRead> &certs);
bool Init(const AuMemoryViewRead &cert);
bool Init(const mbedtls_x509_crt *pCert);
bool Precache();
mbedtls_x509_crt *pCertificate;
mbedtls_x509_crt ownCertificate;
};
}