mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 00:05:35 +00:00
Merge pull request #4063 from mstarzyk-mobica/const_asn1
Add missing const attribute to asn1 api
This commit is contained in:
commit
de6cb2605e
|
@ -578,7 +578,7 @@ int mbedtls_asn1_get_alg_null( unsigned char **p,
|
|||
*
|
||||
* \return NULL if not found, or a pointer to the existing entry.
|
||||
*/
|
||||
mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *list,
|
||||
const mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( const mbedtls_asn1_named_data *list,
|
||||
const char *oid, size_t len );
|
||||
|
||||
/**
|
||||
|
|
|
@ -461,7 +461,7 @@ void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head )
|
|||
}
|
||||
}
|
||||
|
||||
mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *list,
|
||||
const mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( const mbedtls_asn1_named_data *list,
|
||||
const char *oid, size_t len )
|
||||
{
|
||||
while( list != NULL )
|
||||
|
|
|
@ -718,7 +718,7 @@ void find_named_data( data_t *oid0, data_t *oid1, data_t *oid2, data_t *oid3,
|
|||
};
|
||||
mbedtls_asn1_named_data *pointers[ARRAY_LENGTH( nd ) + 1];
|
||||
size_t i;
|
||||
mbedtls_asn1_named_data *found;
|
||||
const mbedtls_asn1_named_data *found;
|
||||
|
||||
for( i = 0; i < ARRAY_LENGTH( nd ); i++ )
|
||||
pointers[i] = &nd[i];
|
||||
|
@ -726,7 +726,7 @@ void find_named_data( data_t *oid0, data_t *oid1, data_t *oid2, data_t *oid3,
|
|||
for( i = 0; i < ARRAY_LENGTH( nd ); i++ )
|
||||
nd[i].next = pointers[i+1];
|
||||
|
||||
found = mbedtls_asn1_find_named_data( pointers[from],
|
||||
found = mbedtls_asn1_find_named_data( (const mbedtls_asn1_named_data*) pointers[from],
|
||||
(const char *) needle->x,
|
||||
needle->len );
|
||||
TEST_ASSERT( found == pointers[position] );
|
||||
|
|
Loading…
Reference in a new issue