49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
|
/***
|
||
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
||
|
|
||
|
File: CertificateRequest.hpp
|
||
|
File: GenerateCertificate.hpp
|
||
|
Date: 2022-11-18
|
||
|
Author: Reece
|
||
|
***/
|
||
|
#pragma once
|
||
|
|
||
|
namespace Aurora::Crypto::KeyPair
|
||
|
{
|
||
|
struct IPrivateKeyPair;
|
||
|
}
|
||
|
|
||
|
namespace Aurora::Crypto::X509
|
||
|
{
|
||
|
struct CertificateRequest
|
||
|
{
|
||
|
// subject --
|
||
|
CertificateName name;
|
||
|
|
||
|
// metadata --
|
||
|
Hashing::EHashType digest;
|
||
|
AuUInt8 uVersion { 3 };
|
||
|
bool bIsCA { };
|
||
|
AuInt8 iMaxPathLength { -1 };
|
||
|
bool bSubjectKeyId { };
|
||
|
AuList<EExtendedUsage> usage;
|
||
|
AuUInt8 uSerialRadix { 10 };
|
||
|
AuString sSerial { "69420" };
|
||
|
|
||
|
// validity --
|
||
|
AuSInt iIssuedDateMs {};
|
||
|
AuSInt iExpirationDateMs {};
|
||
|
|
||
|
// public key ---
|
||
|
AuSPtr<RSA::IRSAPublic> pRSAKey;
|
||
|
AuSPtr<ECC::IECCPublic> pECCKey;
|
||
|
|
||
|
// private key ---
|
||
|
AuSPtr<RSA::IRSAPrivate> pSelfSigningRSAKey;
|
||
|
AuSPtr<ECC::IECCPrivate> pSelfSigningECCKey;
|
||
|
|
||
|
// or
|
||
|
|
||
|
AuSPtr<KeyPair::IPrivateKeyPair> pSigningChain;
|
||
|
};
|
||
|
}
|