mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Adapt x509parse_cert_info() for EC
This commit is contained in:
parent
674b2243eb
commit
360a583029
2 changed files with 38 additions and 2 deletions
|
|
@ -36,6 +36,27 @@
|
|||
#define POLARSSL_ERR_PK_MALLOC_FAILED -0x2F80 /**< Memory alloation failed. */
|
||||
#define POLARSSL_ERR_PK_TYPE_MISMATCH -0x2F00 /**< Type mismatch, eg attempt to use a RSA key as EC, or to modify key type */
|
||||
|
||||
#if defined(POLARSSL_RSA_C)
|
||||
/**
|
||||
* Quick access to an RSA context inside a PK context.
|
||||
*
|
||||
* \warning You must make sure the PK context actually holds an RSA context
|
||||
* before using this macro!
|
||||
*/
|
||||
#define pk_rsa( pk ) ( (rsa_context *) pk.data )
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_ECP_C)
|
||||
/**
|
||||
* Quick access to an EC context inside a PK context.
|
||||
*
|
||||
* \warning You must make sure the PK context actually holds an EC context
|
||||
* before using this macro!
|
||||
*/
|
||||
#define pk_ec( pk ) ( (ecp_keypair *) pk.data )
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue