This module implements Base64 Decoder.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include "common/include/nm_common.h"
#include <string.h>
Enumerations | |
enum | tenuPEMEncType { PEM_TYPE_NONE, PEM_X509_CERT, PEM_PRIV_KEY, PEM_RSA_PRIV_KEY } |
Functions | |
sint8 | DecodeBase64File (uint8 *pu8B64File, uint32 u32FileSize, uint8 **ppu8Key, uint32 *pu32KeySize, tenuPEMEncType *penuPemType) |
sint8 | DecodeX509Certificate (uint8 *pu8X509File, uint32 u32X509FileSz, uint8 **ppu8X509Der, uint32 *pu32X509Size) |
enum tenuPEMEncType |
sint8 DecodeBase64File | ( | uint8 * | pu8B64File, |
uint32 | u32FileSize, | ||
uint8 ** | ppu8Key, | ||
uint32 * | pu32KeySize, | ||
tenuPEMEncType * | penuPemType | ||
) |
References tstrPemDecInfo::acBeginPhrase, tstrPemDecInfo::acEndPhrase, Base64_Decode(), tstrPemDecInfo::enuType, gastrPemTypes, M2M_ERR_FAIL, M2M_SUCCESS, NULL, PEM_TYPE_NONE, and ret.
Referenced by CryptoDecodeRsaPrivKey(), and DecodeX509Certificate().
sint8 DecodeX509Certificate | ( | uint8 * | pu8X509File, |
uint32 | u32X509FileSz, | ||
uint8 ** | ppu8X509Der, | ||
uint32 * | pu32X509Size | ||
) |
References DecodeBase64File().
Referenced by GetRootCertificate(), and WriteTlsServerKeyMaterial().