2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: CA.hpp
|
|
|
|
Date: 2021-6-11
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
2021-07-01 09:32:52 +00:00
|
|
|
namespace Aurora::Crypto::RSA
|
|
|
|
{
|
2022-02-18 10:46:51 +00:00
|
|
|
struct IRSAPublic;
|
2021-07-01 09:32:52 +00:00
|
|
|
}
|
|
|
|
|
2021-06-27 21:25:29 +00:00
|
|
|
namespace Aurora::Crypto::CA
|
|
|
|
{
|
|
|
|
class ICertificateStore
|
|
|
|
{
|
|
|
|
public:
|
2021-09-18 20:10:25 +00:00
|
|
|
virtual void AddSignature(const AuSPtr<RSA::IRSAPublic> &CA,
|
2022-01-20 16:04:53 +00:00
|
|
|
const Memory::ByteBuffer &sig,
|
2022-09-25 09:56:03 +00:00
|
|
|
Aurora::Hashing::EHashType method,
|
2021-09-14 23:56:26 +00:00
|
|
|
EPaddingType type) = 0;
|
|
|
|
|
2021-09-18 20:10:25 +00:00
|
|
|
virtual void AddPublicCert(const X509::Certificate &cert) = 0;
|
2021-06-27 21:25:29 +00:00
|
|
|
|
|
|
|
/// For future support of http gets of the CA list
|
|
|
|
virtual bool& AllowHTTPTree() = 0;
|
|
|
|
|
2021-09-18 20:10:25 +00:00
|
|
|
virtual bool CheckKey(const AuSPtr<RSA::IRSAPublic> &pub) = 0;
|
|
|
|
virtual bool CheckCert(const X509::Certificate &cert) = 0;
|
2021-06-27 21:25:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
AUKN_SHARED_API(NewCA, ICertificateStore);
|
|
|
|
}
|