Microchip® Advanced Software Framework

x509_cert.h File Reference

Interface for the X509 Certificate parsing module.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

Data Structures

struct  tstrMemPool
 
struct  tstrX509Cert
 
struct  tstrX520Name
 

Macros

#define X509_CERT_DECODE(x509Buf, x509Sz, Pool, x509Out, dumpFlag, ret)
 
#define X509_FAIL   -1
 
#define X509_NAME_MAX_SZ   (64)
 
#define X509_SERIAL_NO_MAX_SZ   (64)
 
#define X509_STATUS_DECODE_ERR   4
 
#define X509_STATUS_EXPIRED   1
 
#define X509_STATUS_REVOKED   2
 
#define X509_STATUS_VALID   0
 
#define X509_SUCCESS   0
 

Typedefs

typedef void *(* tpfMemPoolAllocFn )(void *pvHdl, uint32 u32AllocSz)
 

Functions

sint8 X509_DecodeEcdsaSignature (tstrAsn1Context *pstrX509Asn1Cxt, uint8 *pu8Sig, uint16 *pu16SigSz)
 
sint8 X509Cert_Decode (tstrTlsBuffer *pstrX509Buffer, uint32 u32CertSize, tstrMemPool *pstrPool, tstrX509Cert *pstrCert, uint8 bDumpX509)
 
void X509Cert_Dump (tstrX509Cert *pstrCert)
 

#define X509_CERT_DECODE (   x509Buf,
  x509Sz,
  Pool,
  x509Out,
  dumpFlag,
  ret 
)
Value:
do{\
M2M_MEMSET((x509Out), 0, sizeof(tstrX509Cert));\
OVLY_TLS_CLIENT_START; \
ret = X509Cert_Decode((x509Buf), (x509Sz), (Pool), (x509Out), dumpFlag); \
OVLY_TLS_CLIENT_END; \
}while(0)
Definition: x509_cert.h:148
TLS_CLIENT_API sint8 X509Cert_Decode(tstrTlsBuffer *pstrX509Buffer, uint32 u32CertSize, tstrMemPool *pstrPool, tstrX509Cert *pstrCert, uint8 bDumpX509)
Definition: x509_cert.c:1362
#define M2M_MEMSET
Definition: crypto_types.h:133
#define X509_NAME_MAX_SZ   (64)

Referenced by Cert_DecodeX520Name().

#define X509_SERIAL_NO_MAX_SZ   (64)
#define X509_STATUS_DECODE_ERR   4

Error decoding the certificate time.

Referenced by Cert_DecodeValidity().

#define X509_STATUS_EXPIRED   1

The X.509 certificate is expired.

Referenced by Cert_DecodeValidity().

#define X509_STATUS_REVOKED   2

The X.509 certificate is marked as revoked and should not be trusted.

#define X509_STATUS_VALID   0

The X.509 certificate is valid.

Referenced by Cert_DecodeValidity().

tpfMemPoolAllocFn

sint8 X509_DecodeEcdsaSignature ( tstrAsn1Context pstrX509Asn1Cxt,
uint8 pu8Sig,
uint16 pu16SigSz 
)