1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

oid_get_oid_by_*() now give back oid length as well

This commit is contained in:
Paul Bakker
2013-09-10 11:43:44 +02:00
parent b2d7f23592
commit 1c3853b953
4 changed files with 25 additions and 14 deletions

View File

@ -409,11 +409,12 @@ int oid_get_sig_alg_desc( const asn1_buf *oid, const char **desc );
* \param md_alg message digest algorithm
* \param pk_alg public key algorithm
* \param oid place to store ASN.1 OID string pointer
* \param olen length of the OID
*
* \return 0 if successful, or POLARSSL_ERR_OID_NOT_FOUND
*/
int oid_get_oid_by_sig_alg( pk_type_t pk_alg, md_type_t md_alg,
const char **oid_str );
const char **oid, size_t *olen );
/**
* \brief Translate hash algorithm OID into md_type
@ -441,10 +442,11 @@ int oid_get_extended_key_usage( const asn1_buf *oid, const char **desc );
*
* \param md_alg message digest algorithm
* \param oid place to store ASN.1 OID string pointer
* \param olen length of the OID
*
* \return 0 if successful, or POLARSSL_ERR_OID_NOT_FOUND
*/
int oid_get_oid_by_md( md_type_t md_alg, const char **oid_str );
int oid_get_oid_by_md( md_type_t md_alg, const char **oid, size_t *olen );
#if defined(POLARSSL_CIPHER_C)
/**