Certificate Deecoder/parser.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include "crypto.h"
#include "tls_buffer_manager.h"
#include <string.h>
#include <stdlib.h>
#include "root_tls_cert/x509/x509_cert.h"
#include "crypto_api.h"
Data Structures | |
struct | __tstrCryptoMemHdr |
Typedefs | |
typedef struct __tstrCryptoMemHdr | tstrCryptoMemHdr |
Functions | |
void * | CryptoInternalMalloc (void *hdl, uint32 u32AllocSz) |
sint8 | CryptoX509CertDecode (uint8 *pu8X509CertBuf, uint16 u16X509CertBuffer, txtrX509CertInfo *pstrCert, uint8 bDumpCert) |
void | CryptoX509DeleteContext (txtrX509CertInfo *pstrCert) |
typedef struct __tstrCryptoMemHdr tstrCryptoMemHdr |
void * CryptoInternalMalloc | ( | void * | hdl, |
uint32 | u32AllocSz | ||
) |
References NULL, __tstrCryptoMemHdr::pstrNext, txtrX509CertInfo::pvPrivate, and WORD_ALIGN.
Referenced by CryptoX509CertDecode().
sint8 CryptoX509CertDecode | ( | uint8 * | pu8X509CertBuf, |
uint16 | u16X509CertBuffer, | ||
txtrX509CertInfo * | pstrCert, | ||
uint8 | bDumpCert | ||
) |
References tstrECDSAPubKey::au8EcPoint, txtrX509CertInfo::au8SerialNo, tstrX509Cert::au8SerialNo, CryptoInternalMalloc(), tstrX509CertPublicKey::enuCertKeyType, tstrEllipticCurve::enuType, tstrPublicKey::enuType, tstrMemPool::fpAlloc, M2M_ERR_FAIL, M2M_SUCCESS, NULL, tstrECPublicKey::pstrCurve, tstrTlsBuffer::pu8Buff, PUBKEY_ALG_ECC, PUBKEY_ALG_RSA, tstrMemPool::pvPoolHandle, txtrX509CertInfo::pvPrivate, ret, tstrPublicKey::strEccKey, tstrX509CertPublicKey::strEcdsaPub, txtrX509CertInfo::strExpiryDate, tstrX509Cert::strExpiryDate, txtrX509CertInfo::strIssuer, tstrX509Cert::strIssuer, txtrX509CertInfo::strPubKey, tstrX509Cert::strPubKey, tstrECPublicKey::strQ, tstrPublicKey::strRSAKey, tstrX509CertPublicKey::strRsaPub, txtrX509CertInfo::strStartDate, tstrX509Cert::strStartDate, txtrX509CertInfo::strSubject, tstrX509Cert::strSubject, tstrTlsBuffer::u16BuffSz, tstrECDSAPubKey::u16CurveID, tstrECDSAPubKey::u16EcPointSz, tstrTlsBuffer::u16ReadOffset, txtrX509CertInfo::u8SerialNumberLength, tstrX509Cert::u8SerialNumberLength, X509_CERT_PUBKEY_ECDSA, X509_CERT_PUBKEY_RSA, X509_SUCCESS, and X509Cert_Decode().
Referenced by GetRootCertificate(), and ReadServerX509Chain().
void CryptoX509DeleteContext | ( | txtrX509CertInfo * | pstrCert | ) |
References NULL, __tstrCryptoMemHdr::pstrNext, and txtrX509CertInfo::pvPrivate.
Referenced by ReadServerX509Chain(), WriteRootCertificate(), and WriteTlsServerKeyMaterial().