mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
The Great Renaming
A simple execution of tmp/invoke-rename.pl
This commit is contained in:
parent
b5904d25ef
commit
2cf5a7c98e
291 changed files with 36012 additions and 36012 deletions
|
|
@ -5,14 +5,14 @@
|
|||
/* END_HEADER */
|
||||
|
||||
/* BEGIN_DEPENDENCIES
|
||||
* depends_on:POLARSSL_PK_WRITE_C:POLARSSL_BIGNUM_C:POLARSSL_FS_IO
|
||||
* depends_on:MBEDTLS_PK_WRITE_C:MBEDTLS_BIGNUM_C:MBEDTLS_FS_IO
|
||||
* END_DEPENDENCIES
|
||||
*/
|
||||
|
||||
/* BEGIN_CASE depends_on:POLARSSL_PEM_WRITE_C */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PEM_WRITE_C */
|
||||
void pk_write_pubkey_check( char *key_file )
|
||||
{
|
||||
pk_context key;
|
||||
mbedtls_pk_context key;
|
||||
unsigned char buf[5000];
|
||||
unsigned char check_buf[5000];
|
||||
int ret;
|
||||
|
|
@ -22,10 +22,10 @@ void pk_write_pubkey_check( char *key_file )
|
|||
memset( buf, 0, sizeof( buf ) );
|
||||
memset( check_buf, 0, sizeof( check_buf ) );
|
||||
|
||||
pk_init( &key );
|
||||
TEST_ASSERT( pk_parse_public_keyfile( &key, key_file ) == 0 );
|
||||
mbedtls_pk_init( &key );
|
||||
TEST_ASSERT( mbedtls_pk_parse_public_keyfile( &key, key_file ) == 0 );
|
||||
|
||||
ret = pk_write_pubkey_pem( &key, buf, sizeof( buf ) - 1);
|
||||
ret = mbedtls_pk_write_pubkey_pem( &key, buf, sizeof( buf ) - 1);
|
||||
TEST_ASSERT( ret >= 0 );
|
||||
|
||||
f = fopen( key_file, "r" );
|
||||
|
|
@ -37,14 +37,14 @@ void pk_write_pubkey_check( char *key_file )
|
|||
TEST_ASSERT( strncmp( (char *) buf, (char *) check_buf, sizeof( buf ) ) == 0 );
|
||||
|
||||
exit:
|
||||
pk_free( &key );
|
||||
mbedtls_pk_free( &key );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:POLARSSL_PEM_WRITE_C */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PEM_WRITE_C */
|
||||
void pk_write_key_check( char *key_file )
|
||||
{
|
||||
pk_context key;
|
||||
mbedtls_pk_context key;
|
||||
unsigned char buf[5000];
|
||||
unsigned char check_buf[5000];
|
||||
int ret;
|
||||
|
|
@ -54,10 +54,10 @@ void pk_write_key_check( char *key_file )
|
|||
memset( buf, 0, sizeof( buf ) );
|
||||
memset( check_buf, 0, sizeof( check_buf ) );
|
||||
|
||||
pk_init( &key );
|
||||
TEST_ASSERT( pk_parse_keyfile( &key, key_file, NULL ) == 0 );
|
||||
mbedtls_pk_init( &key );
|
||||
TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL ) == 0 );
|
||||
|
||||
ret = pk_write_key_pem( &key, buf, sizeof( buf ) - 1);
|
||||
ret = mbedtls_pk_write_key_pem( &key, buf, sizeof( buf ) - 1);
|
||||
TEST_ASSERT( ret >= 0 );
|
||||
|
||||
f = fopen( key_file, "r" );
|
||||
|
|
@ -69,6 +69,6 @@ void pk_write_key_check( char *key_file )
|
|||
TEST_ASSERT( strncmp( (char *) buf, (char *) check_buf, sizeof( buf ) ) == 0 );
|
||||
|
||||
exit:
|
||||
pk_free( &key );
|
||||
mbedtls_pk_free( &key );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue