mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-02 04:35:43 +01:00
Get rid of pk_wrap_rsa()
This commit is contained in:
parent
f8c948a674
commit
3053f5bcb4
5 changed files with 94 additions and 44 deletions
|
|
@ -112,7 +112,6 @@ typedef struct
|
|||
const pk_info_t * info; /**< Public key informations */
|
||||
pk_type_t type; /**< Public key type (temporary) */
|
||||
void * data; /**< Public key data */
|
||||
int dont_free; /**< True if data must not be freed */
|
||||
} pk_context;
|
||||
|
||||
/**
|
||||
|
|
@ -140,21 +139,6 @@ void pk_free( pk_context *ctx );
|
|||
*/
|
||||
int pk_set_type( pk_context *ctx, pk_type_t type );
|
||||
|
||||
#if defined(POLARSSL_RSA_C)
|
||||
/**
|
||||
* \brief Wrap a RSA context in a PK context
|
||||
*
|
||||
* \param ctx PK context to initiliaze
|
||||
* \param rsa RSA context to use
|
||||
*
|
||||
* \note The PK context must be freshly initialized.
|
||||
*
|
||||
* \return O on success,
|
||||
* POLARSSL_ERR_PK_TYPE_MISMATCH if ctx was not empty.
|
||||
*/
|
||||
int pk_wrap_rsa( pk_context *ctx, const rsa_context *rsa);
|
||||
#endif /* POLARSSL_RSA_C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -506,6 +506,17 @@ int rsa_rsassa_pss_verify( rsa_context *ctx,
|
|||
const unsigned char *hash,
|
||||
const unsigned char *sig );
|
||||
|
||||
/**
|
||||
* \brief Copy the components of an RSA context
|
||||
*
|
||||
* \param dst Destination context
|
||||
* \param src Source context
|
||||
*
|
||||
* \return O on success,
|
||||
* POLARSSL_ERR_MPI_MALLOC_FAILED on memory allocation failure
|
||||
*/
|
||||
int rsa_copy( rsa_context *dst, const rsa_context *src );
|
||||
|
||||
/**
|
||||
* \brief Free the components of an RSA key
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue