/*** Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: GenerateCertificate.hpp Date: 2022-11-18 Author: Reece ***/ #pragma once namespace Aurora::IO::TLS { struct ITLSPrivateKeyPair; } namespace Aurora::Crypto::X509 { struct CertRequest { // subject -- CertName name; // metadata -- Hashing::EHashType digest; AuUInt8 uVersion { 3 }; bool bIsCA {}; bool bSubjectKeyId {}; AuList usage; AuUInt8 uSerialRadix { 10 }; AuString sSerial { "69420" }; // validity -- AuSInt iIssuedDateMs {}; AuSInt iExpirationDateMs {}; // public key --- AuSPtr pRSAKey; AuSPtr pECCKey; // private key --- AuSPtr pSelfSigningRSAKey; AuSPtr pSelfSigningECCKey; // or AuSPtr pSigningChain; }; AUKN_SYM AuResult GenerateCertificate(const CertRequest &request); }