![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cX509Common.h>
Public Member Functions | |
cX509Common () noexcept | |
virtual | ~cX509Common () |
bool | isEmptyX () const noexcept |
virtual void | SetEmptyX () |
HRESULT | ReadSigAlg (cASNReader &r1, cASNBuf &sig_params) |
HRESULT | GetSigAlgStr (StrBuilder &s) const |
virtual HRESULT | GetDescription (StrBuilder &s, const char *prefix) const =0 |
virtual HRESULT | ReadFromDer1 (const BYTE *buf, size_t buflen)=0 |
virtual HRESULT | ReadFromDER (const BYTE *buf, size_t buflen)=0 |
virtual HRESULT | ReadFromUnk (const BYTE *buf, size_t buflen)=0 |
HRESULT | ReadFromFile (const FILECHAR_t *pszFilePath) |
UNITTEST_FRIEND (cX509Common) | |
![]() | |
cRefBase (int iRefCount=0) noexcept | |
virtual | ~cRefBase () |
int | get_RefCount () const noexcept |
HASHCODE_t | get_HashCode () const noexcept |
STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept | |
virtual void | onFinalRelease () |
bool | isValidObj () const noexcept |
STDMETHOD_ (ULONG, AddRef)(void) override | |
STDMETHOD_ (ULONG, Release)(void) override | |
STDMETHOD() | QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override |
void | IncRefCount () |
void | DecRefCount () |
bool | isStaticConstruct () const noexcept |
void | StaticConstruct () |
void | StaticDestruct () |
bool | isDestructing () noexcept |
void | SetDestructing () |
Static Public Member Functions | |
static HRESULT | ReturnError (HRESULT hRes) noexcept |
static X509_Verify_t | X509_VerifySet (X509_Verify_t f1, X509_Verify_t f2) noexcept |
static StrLen_t GRAYCALL | GetSerialStr (StrBuilder &s, const cASNBuf &serial) |
Public Attributes | |
cHeapBlock | m_raw |
The raw certificate data (ReadFromDer1). cASNBuf pointers can point into this. More... | |
cASNBuf | m_RawSigned |
The raw certificate body (in m_raw)(ReadFromDer1). The part that is To Be Signed. Precedes m_nVersion. More... | |
int | m_nVersion |
1,2,3. 0 = unused. X509_CRT_VERSION_TYPE or CRL version More... | |
cASNBuf | m_SignOID1 |
Signature algorithm OID, e.g. "sha1RSA" for ReadSigAlg() More... | |
cKeySigAlg | m_SigAlg |
How to sign with m_SignOID1. More... | |
cASNBuf | m_SignBuffer |
cNewPtr< cKeyRSASignOptions > | m_pRSASignOptions |
Signature options to be passed to VerifySignatureExt(), e.g. for RSASSA-PSS SSL_Key_RSASSA_PSS. More... | |
Static Public Attributes | |
static const int | k_MAX_INTERMEDIATE_CA = 8 |
Abstract base class for: cX509Csr, cX509Crl, cX509Crt.
The ITU-T X.509 standard defines a certificate format for PKI.
http://www.ietf.org/rfc/rfc5280.txt (Certificates and CRLs) http://www.ietf.org/rfc/rfc3279.txt (Alg IDs for CRLs) http://www.ietf.org/rfc/rfc2986.txt (CSRs, aka PKCS#10)
http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
|
inlinenoexcept |
|
inlinevirtual |
ASSUME SetEmptyX() called by my override.
|
pure virtual |
Implemented in GrayLib::cX509Crl, GrayLib::cX509Csr, and GrayLib::cX509Crt.
|
static |
Get the certificate serial in printable form into StrBuilder; no more than nSizeMax characters will be written.
HRESULT GrayLib::cX509Common::GetSigAlgStr | ( | StrBuilder & | s | ) | const |
Helper for writing signature algorithms
|
inlinenoexcept |
Not loaded?
|
pure virtual |
Implemented in GrayLib::cX509Crl, GrayLib::cX509Crt, and GrayLib::cX509Csr.
|
pure virtual |
Implemented in GrayLib::cX509Crl, and GrayLib::cX509Csr.
HRESULT GrayLib::cX509Common::ReadFromFile | ( | const FILECHAR_t * | pszFilePath | ) |
Load one or more CRT,CRLs and add them to the chained list or Load a CSR into the structure
|
pure virtual |
Implemented in GrayLib::cX509Crl, GrayLib::cX509Crt, and GrayLib::cX509Csr.
HRESULT GrayLib::cX509Common::ReadSigAlg | ( | cASNReader & | r1, |
cASNBuf & | sig_params | ||
) |
Get signature algorithm from m_SignOID1 and optional parameters
|
virtual |
Reimplemented in GrayLib::cX509Csr, GrayLib::cX509Crt, and GrayLib::cX509Crl.
GrayLib::cX509Common::UNITTEST_FRIEND | ( | cX509Common | ) |
|
inlinestaticnoexcept |
Add flags to the flags.
|
static |
int GrayLib::cX509Common::m_nVersion |
1,2,3. 0 = unused. X509_CRT_VERSION_TYPE or CRL version
cNewPtr<cKeyRSASignOptions> GrayLib::cX509Common::m_pRSASignOptions |
Signature options to be passed to VerifySignatureExt(), e.g. for RSASSA-PSS SSL_Key_RSASSA_PSS.
cHeapBlock GrayLib::cX509Common::m_raw |
The raw certificate data (ReadFromDer1). cASNBuf pointers can point into this.
cASNBuf GrayLib::cX509Common::m_RawSigned |
The raw certificate body (in m_raw)(ReadFromDer1). The part that is To Be Signed. Precedes m_nVersion.
cKeySigAlg GrayLib::cX509Common::m_SigAlg |
How to sign with m_SignOID1.
cASNBuf GrayLib::cX509Common::m_SignBuffer |
cASNBuf GrayLib::cX509Common::m_SignOID1 |
Signature algorithm OID, e.g. "sha1RSA" for ReadSigAlg()