35 #define MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT -0x1080 36 #define MBEDTLS_ERR_PEM_INVALID_DATA -0x1100 37 #define MBEDTLS_ERR_PEM_ALLOC_FAILED -0x1180 38 #define MBEDTLS_ERR_PEM_INVALID_ENC_IV -0x1200 39 #define MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG -0x1280 40 #define MBEDTLS_ERR_PEM_PASSWORD_REQUIRED -0x1300 41 #define MBEDTLS_ERR_PEM_PASSWORD_MISMATCH -0x1380 42 #define MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE -0x1400 43 #define MBEDTLS_ERR_PEM_BAD_INPUT_DATA -0x1480 50 #if defined(MBEDTLS_PEM_PARSE_C) 54 typedef struct mbedtls_pem_context
67 void mbedtls_pem_init( mbedtls_pem_context *ctx );
91 int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx,
const char *header,
const char *footer,
92 const unsigned char *data,
93 const unsigned char *pwd,
94 size_t pwdlen,
size_t *use_len );
101 void mbedtls_pem_free( mbedtls_pem_context *ctx );
104 #if defined(MBEDTLS_PEM_WRITE_C) 121 int mbedtls_pem_write_buffer(
const char *header,
const char *footer,
122 const unsigned char *der_data,
size_t der_len,
123 unsigned char *buf,
size_t buf_len,
size_t *olen );