mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-09 13:15:31 +00:00
Add missing const attribute to asn1 api
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
parent
a120146afe
commit
59961cfc73
|
@ -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.
|
* \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 );
|
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 )
|
const char *oid, size_t len )
|
||||||
{
|
{
|
||||||
while( list != NULL )
|
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];
|
mbedtls_asn1_named_data *pointers[ARRAY_LENGTH( nd ) + 1];
|
||||||
size_t i;
|
size_t i;
|
||||||
mbedtls_asn1_named_data *found;
|
const mbedtls_asn1_named_data *found;
|
||||||
|
|
||||||
for( i = 0; i < ARRAY_LENGTH( nd ); i++ )
|
for( i = 0; i < ARRAY_LENGTH( nd ); i++ )
|
||||||
pointers[i] = &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++ )
|
for( i = 0; i < ARRAY_LENGTH( nd ); i++ )
|
||||||
nd[i].next = pointers[i+1];
|
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,
|
(const char *) needle->x,
|
||||||
needle->len );
|
needle->len );
|
||||||
TEST_ASSERT( found == pointers[position] );
|
TEST_ASSERT( found == pointers[position] );
|
||||||
|
|
Loading…
Reference in a new issue