![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cX509Reader.h>
Public Member Functions | |
| cX509Reader (const BYTE *p=nullptr, size_t nLen=0) noexcept | |
| cX509Reader (const cASNBuf &b) | |
| HRESULT | ReadVersionInt (OUT int &rnVer) |
| HRESULT | ReadVersion (OUT int &rnVer) |
| HRESULT | ReadSerialNumber (OUT cASNBuf &serial) |
| HRESULT | ReadSignBuffer (OUT cASNBuf &sig) |
| HRESULT | ReadExtHeader (ASN_TYPE nTag, OUT cASNBuf &ext) |
| HRESULT | ReadCrtTimeRange (OUT cTimeUnits &from, OUT cTimeUnits &to) |
| HRESULT | ReadCrtUID (OUT cASNBuf &uid, ASN_t nTag2) |
| HRESULT | ReadCrlExt (OUT cASNBuf &ext) |
| HRESULT | ReadCrlEntryExt (OUT cASNBuf &ext) |
Public Member Functions inherited from GrayLib::cASNReader | |
| cASNReader (const BYTE *p=nullptr, size_t nSize=0) noexcept | |
| cASNReader (const cMemBlock &b) noexcept | |
| void | SetBlock (const BYTE *p, size_t nSize) |
| size_t | get_LenRead () const |
| size_t | get_LenLeft () const |
| bool | isEOF () const |
| bool | isEOFX () const |
| const BYTE * | get_InpCur () const noexcept |
| BYTE * | get_InpUnk () const |
| BYTE | get_InpByte () const |
| void | AddInpCur (size_t nSize) |
| void | AddInpCur (cMemBlock &r) |
| void | ResetReader () |
| HRESULT | ReadTagBlock (ASN_t nTagExpected, OUT cMemBlock &r) |
| HRESULT | ReadTagBuf (ASN_t nTagExpected, OUT cASNBuf &r) |
| HRESULT | ReadTagChild (ASN_t nTagExpected, OUT cASNReader &r) |
| HRESULT | ReadTagBoolean (OUT bool &rVal) |
| HRESULT | ReadTagInt (OUT int &riVal) |
| HRESULT | ReadTagArrayBits (OUT cASNBuf &bs) |
| HRESULT | ReadTagArrayBits0 (OUT size_t &rSizeData) |
| HRESULT | ReadTagBigInt (OUT cBitArray &X) |
| HRESULT | ReadTagTime (OUT cTimeUnits &time) |
| HRESULT | ReadTagSequence (ASN_TYPE tag, cASNSequence &head) |
| HRESULT | ReadTagSeqAlg (OUT cASNBuf &alg, OUT cASNBuf ¶ms) |
| HRESULT | ReadTagSeqAlgNull (OUT cASNBuf &alg) |
| HRESULT | ReadSets (OUT cASNSets &cur) |
Public Member Functions inherited from Gray::cMemBlock | |
| cMemBlock () noexcept | |
| cMemBlock (const void *pData, size_t nSize) noexcept | |
| cMemBlock (const cMemBlock &block) noexcept | |
| cMemBlock (const cMemBlock *pBlock) noexcept | |
| size_t | get_DataSize () const noexcept |
| void * | get_Data () const noexcept |
| BYTE * | get_DataBytes () const noexcept |
| char * | get_DataA () const noexcept |
| operator const BYTE * () const noexcept | |
| bool | isValidPtr () const noexcept |
| bool | IsValidIndex (size_t i) const noexcept |
| bool | IsValidIndex2 (size_t i) const noexcept |
| bool | IsValidPtr (const void *p) const noexcept |
| bool | IsValidPtr2 (const void *p) const noexcept |
| bool | IsZeros () const noexcept |
| bool | IsEqualData (const void *pData, size_t nSize) const noexcept |
| bool | IsEqualData (const cMemBlock *pData) const noexcept |
| bool | IsEqualData (const cMemBlock &data) const noexcept |
| BYTE * | GetOffset (size_t nOffset) const |
| const void * | get_DataEnd () const noexcept |
| void | put_DataPtr (void *pStart) noexcept |
| void | put_Size (size_t nSize) noexcept |
| void | SetBlock (void *pData, size_t nSize) noexcept |
| void | SetEmptyBlock () noexcept |
| void | InitZeros () noexcept |
| StrLen_t | ConvertToString (char *pszDst, StrLen_t iDstSizeMax) const |
Additional Inherited Members | |
Static Public Member Functions inherited from GrayLib::cASNReader | |
| static HRESULT | ReadInt (const BYTE *pData, size_t nSizeData, OUT int &riVal) |
| static HRESULT | ReadTime (const char *pData, size_t nSizeData, bool bGeneral, OUT cTimeUnits &time) |
Static Public Member Functions inherited from Gray::cMemBlock | |
| static COMPARE_t __stdcall | Compare (const void *pData1, size_t iLen1, const void *pData2, size_t iLen2) |
Protected Member Functions inherited from GrayLib::cASNReader | |
| HRESULT | ReadLengthCode (OUT size_t &rSize) |
| HRESULT | ReadTag (ASN_t nTagExpected, OUT size_t &rSizeData) |
Static Protected Member Functions inherited from GrayLib::cASNReader | |
| static HRESULT | ReadStrUInt (const char *pData, size_t nSizeData, OUT UINT32 &ruVal) |
Protected Attributes inherited from GrayLib::cASNReader | |
| const BYTE * | m_pInpCur |
| Current read position in cMemBlock. This Advances. More... | |
Protected Attributes inherited from Gray::cMemBlock | |
| size_t | m_nSize |
| size_t of m_pData in bytes. May be determined at runtime. More... | |
| void * | m_pData |
Common X509 reading stuff for CRL, CRT and CSR in DER/ASN format .
|
inlinenoexcept |
|
inline |
X.509 CRL v2 entry extensions (no extensions parsed yet.) OPTIONAL
X.509 CRL v2 extensions (no extensions parsed yet.) Get explicit tag
| HRESULT GrayLib::cX509Reader::ReadCrtTimeRange | ( | OUT cTimeUnits & | from, |
| OUT cTimeUnits & | to | ||
| ) |
Validity ::= SEQUENCE { notBefore Time, notAfter Time }
Read X.509 v2/v3 unique identifier (not parsed)
X.509 Extensions (No parsing of extensions, pointer should be either manually updated or extensions should be parsed! Just read header.
CertificateSerialNumber ::= INTEGER
| HRESULT GrayLib::cX509Reader::ReadVersion | ( | OUT int & | rnVer | ) |
Version ::= INTEGER { v1(0), v2(1), v3(2) } X509_CRT_VERSION_TYPE
| HRESULT GrayLib::cX509Reader::ReadVersionInt | ( | OUT int & | rnVer | ) |
read version as a single int. Version ::= INTEGER { v1(0), v2(1) }