Header file for cryptographic algorithms.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | tstrASN1RSAPrivateKey |
struct | tstrECDSAPubKey |
struct | tstrRsaPrivateKey |
struct | tstrRSAPubKey |
struct | tstrX509CertPublicKey |
struct | tstrX509Name |
struct | txtrX509CertInfo |
Macros | |
#define | CRYPTO_SHA1_DIGEST_SIZE (20) |
#define | ECC_POINT_MAX (72) |
Enumerations | |
enum | tenuCertPubKeyType { X509_CERT_PUBKEY_RSA = 1, X509_CERT_PUBKEY_ECDSA = 2 } |
Functions | |
sint8 | CryptoDecodeRsaPrivKey (uint8 *pu8RsaKeyFile, uint32 u32KeySize, tstrASN1RSAPrivateKey *pstrRsaPrivKey) |
sint8 | CryptoX509CertDecode (uint8 *pu8X509CertBuf, uint16 u16X509CertBuffer, txtrX509CertInfo *pstrCert, uint8 bDumpCert) |
void | CryptoX509DeleteContext (txtrX509CertInfo *pstrCert) |
#define CRYPTO_SHA1_DIGEST_SIZE (20) |
Referenced by ReadServerX509Chain(), and writeRootCertEntry().
#define ECC_POINT_MAX (72) |
enum tenuCertPubKeyType |
sint8 CryptoDecodeRsaPrivKey | ( | uint8 * | pu8RsaKeyFile, |
uint32 | u32KeySize, | ||
tstrASN1RSAPrivateKey * | pstrRsaPrivKey | ||
) |
References DecodeBase64File(), M2M_ERR_FAIL, M2M_SUCCESS, NULL, ParsePrivKey(), ParseRsaPrivKey(), PEM_PRIV_KEY, and PEM_RSA_PRIV_KEY.
Referenced by WriteTlsServerKeyMaterial().
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, 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().