mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Make RSA_ALT support optionnal
This commit is contained in:
@ -112,6 +112,7 @@ int pk_init_ctx( pk_context *ctx, const pk_info_t *info )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_PK_RSA_ALT_SUPPORT)
|
||||
/*
|
||||
* Initialize an RSA-alt context
|
||||
*/
|
||||
@ -140,6 +141,7 @@ int pk_init_ctx_rsa_alt( pk_context *ctx, void * key,
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
#endif /* POLARSSL_PK_RSA_ALT_SUPPORT */
|
||||
|
||||
/*
|
||||
* Tell if a PK can do the operations of the given type
|
||||
|
@ -50,10 +50,12 @@
|
||||
#define polarssl_free free
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_PK_RSA_ALT_SUPPORT)
|
||||
/* Implementation that should never be optimized out by the compiler */
|
||||
static void polarssl_zeroize( void *v, size_t n ) {
|
||||
volatile unsigned char *p = v; while( n-- ) *p++ = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_RSA_C)
|
||||
static int rsa_can_do( pk_type_t type )
|
||||
@ -377,6 +379,7 @@ const pk_info_t ecdsa_info = {
|
||||
};
|
||||
#endif /* POLARSSL_ECDSA_C */
|
||||
|
||||
#if defined(POLARSSL_PK_RSA_ALT_SUPPORT)
|
||||
/*
|
||||
* Support for alternative RSA-private implementations
|
||||
*/
|
||||
@ -488,4 +491,6 @@ const pk_info_t rsa_alt_info = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
#endif /* POLARSSL_PK_RSA_ALT_SUPPORT */
|
||||
|
||||
#endif /* POLARSSL_PK_C */
|
||||
|
Reference in New Issue
Block a user