CryptoAuthLib
Microchip CryptoAuthentication Library
|
Functions | |
int | atcacert_encode_pem (const uint8_t *der, size_t der_size, char *pem, size_t *pem_size, const char *header, const char *footer) |
Encode a DER data in PEM format. More... | |
int | atcacert_decode_pem (const char *pem, size_t pem_size, uint8_t *der, size_t *der_size, const char *header, const char *footer) |
Decode PEM data into DER format. More... | |
int | atcacert_encode_pem_cert (const uint8_t *der_cert, size_t der_cert_size, char *pem_cert, size_t *pem_cert_size) |
Encode a DER certificate in PEM format. More... | |
int | atcacert_encode_pem_csr (const uint8_t *der_csr, size_t der_csr_size, char *pem_csr, size_t *pem_csr_size) |
Encode a DER CSR in PEM format. More... | |
int | atcacert_decode_pem_cert (const char *pem_cert, size_t pem_cert_size, uint8_t *der_cert, size_t *der_cert_size) |
Decode a PEM certificate into DER format. More... | |
int | atcacert_decode_pem_csr (const char *pem_csr, size_t pem_csr_size, uint8_t *der_csr, size_t *der_csr_size) |
Extract the CSR certificate bytes from a PEM encoded CSR certificate. More... | |
int atcacert_decode_pem | ( | const char * | pem, |
size_t | pem_size, | ||
uint8_t * | der, | ||
size_t * | der_size, | ||
const char * | header, | ||
const char * | footer | ||
) |
Decode PEM data into DER format.
[in] | pem | PEM data to decode to DER. |
[in] | pem_size | PEM data size in bytes. |
[out] | der | DER data is returned here. |
[in,out] | der_size | As input, the size of the der buffer. As output, the size of the DER data. |
[in] | header | Header to find the beginning of the PEM data. |
[in] | footer | Footer to find the end of the PEM data. |
int atcacert_decode_pem_cert | ( | const char * | pem_cert, |
size_t | pem_cert_size, | ||
uint8_t * | der_cert, | ||
size_t * | der_cert_size | ||
) |
Decode a PEM certificate into DER format.
[in] | pem_cert | PEM certificate to decode to DER. |
[in] | pem_cert_size | PEM certificate size in bytes. |
[out] | der_cert | DER certificate is returned here. |
[in,out] | der_cert_size | As input, the size of the der_cert buffer. As output, the size of the DER certificate. |
int atcacert_decode_pem_csr | ( | const char * | pem_csr, |
size_t | pem_csr_size, | ||
uint8_t * | der_csr, | ||
size_t * | der_csr_size | ||
) |
Extract the CSR certificate bytes from a PEM encoded CSR certificate.
[in] | pem_csr | PEM CSR to decode to DER. |
[in] | pem_csr_size | PEM CSR size in bytes. |
[out] | der_csr | DER CSR is returned here. |
[in,out] | der_csr_size | As input, the size of the der_csr buffer. As output, the size of the DER CSR. |
int atcacert_encode_pem | ( | const uint8_t * | der, |
size_t | der_size, | ||
char * | pem, | ||
size_t * | pem_size, | ||
const char * | header, | ||
const char * | footer | ||
) |
Encode a DER data in PEM format.
[in] | der | DER data to be encoded as PEM. |
[out] | der_size | DER data size in bytes. |
[out] | pem | PEM encoded data is returned here. |
[in,out] | pem_size | As input, the size of the pem buffer. As output, the size of the PEM data. |
[in] | header | Header to place at the beginning of the PEM data. |
[in] | footer | Footer to place at the end of the PEM data. |
int atcacert_encode_pem_cert | ( | const uint8_t * | der_cert, |
size_t | der_cert_size, | ||
char * | pem_cert, | ||
size_t * | pem_cert_size | ||
) |
Encode a DER certificate in PEM format.
[in] | der_cert | DER certificate to be encoded as PEM. |
[out] | der_cert_size | DER certificate size in bytes. |
[out] | pem_cert | PEM encoded certificate is returned here. |
[in,out] | pem_cert_size | As input, the size of the pem_cert buffer. As output, the size of the PEM certificate. |
int atcacert_encode_pem_csr | ( | const uint8_t * | der_csr, |
size_t | der_csr_size, | ||
char * | pem_csr, | ||
size_t * | pem_csr_size | ||
) |
Encode a DER CSR in PEM format.
[in] | der_csr | DER CSR to be encoded as PEM. |
[out] | der_csr_size | DER CSR size in bytes. |
[out] | pem_csr | PEM encoded CSR is returned here. |
[in,out] | pem_csr_size | As input, the size of the pem_csr buffer. As output, the size of the PEM CSR. |