Merged additional tests and improved code coverage
Conflicts: ChangeLog
This commit is contained in:
commit
17b85cbd69
42 changed files with 1172 additions and 155 deletions
|
@ -621,12 +621,14 @@ int ecp_gen_keypair( ecp_group *grp, mpi *d, ecp_point *Q,
|
|||
int ecp_gen_key( ecp_group_id grp_id, ecp_keypair *key,
|
||||
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
|
||||
|
||||
#if defined(POLARSSL_SELF_TEST)
|
||||
/**
|
||||
* \brief Checkup routine
|
||||
*
|
||||
* \return 0 if successful, or 1 if the test failed
|
||||
* \return 0 if successful, or 1 if a test failed
|
||||
*/
|
||||
int ecp_self_test( int verbose );
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
* CAMELLIA 2 0x0024-0x0026
|
||||
* XTEA 1 0x0028-0x0028
|
||||
* BASE64 2 0x002A-0x002C
|
||||
* OID 1 0x002E-0x002E
|
||||
* OID 1 0x002E-0x002E 0x000B-0x000B
|
||||
* PADLOCK 1 0x0030-0x0030
|
||||
* DES 1 0x0032-0x0032
|
||||
* CTR_DBRG 4 0x0034-0x003A
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#endif
|
||||
|
||||
#define POLARSSL_ERR_OID_NOT_FOUND -0x002E /**< OID is not found. */
|
||||
#define POLARSSL_ERR_OID_BUF_TOO_SMALL -0x000B /**< output buffer is too small */
|
||||
|
||||
/*
|
||||
* Top level OID tuples
|
||||
|
@ -376,7 +377,8 @@ typedef struct {
|
|||
* \param size size of the buffer
|
||||
* \param oid OID to translate
|
||||
*
|
||||
* \return POLARSSL_ERR_DEBUG_BUF_TOO_SMALL or actual length used
|
||||
* \return Length of the string written (excluding final NULL) or
|
||||
* POLARSSL_ERR_OID_BUF_TO_SMALL in case of error
|
||||
*/
|
||||
int oid_get_numeric_string( char *buf, size_t size, const asn1_buf *oid );
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ int pk_init_ctx( pk_context *ctx, const pk_info_t *info );
|
|||
* \param key RSA key pointer
|
||||
* \param decrypt_func Decryption function
|
||||
* \param sign_func Signing function
|
||||
* \param key_len_func Function returning key length
|
||||
* \param key_len_func Function returning key length in bytes
|
||||
*
|
||||
* \return 0 on success, or POLARSSL_ERR_PK_BAD_INPUT_DATA if the
|
||||
* context wasn't already initialized as RSA_ALT.
|
||||
|
|
|
@ -74,6 +74,15 @@ void set_alarm( int seconds );
|
|||
*/
|
||||
void m_sleep( int milliseconds );
|
||||
|
||||
#if defined(POLARSSL_SELF_TEST)
|
||||
/**
|
||||
* \brief Checkup routine
|
||||
*
|
||||
* \return 0 if successful, or 1 if a test failed
|
||||
*/
|
||||
int timing_self_test( int verbose );
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -212,6 +212,8 @@ int x509_serial_gets( char *buf, size_t size, const x509_buf *serial );
|
|||
|
||||
/**
|
||||
* \brief Give an known OID, return its descriptive string.
|
||||
* (Deprecated. Use oid_get_extended_key_usage() instead.)
|
||||
* Warning: only works for extended_key_usage OIDs!
|
||||
*
|
||||
* \param oid buffer containing the oid
|
||||
*
|
||||
|
@ -228,8 +230,8 @@ const char *x509_oid_get_description( x509_buf *oid );
|
|||
* \param size Maximum size of buffer
|
||||
* \param oid Buffer containing the OID
|
||||
*
|
||||
* \return The amount of data written to the buffer, or -1 in
|
||||
* case of an error.
|
||||
* \return Length of the string written (exluding final NULL) or
|
||||
* POLARSSL_ERR_OID_BUF_TO_SMALL in case of error
|
||||
*/
|
||||
int x509_oid_get_numeric_string( char *buf, size_t size, x509_buf *oid );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue