1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Fixed const correctness issues in programs and tests

(cherry picked from commit e0225e4d7f)

Conflicts:
	programs/ssl/ssl_client2.c
	programs/ssl/ssl_server2.c
	programs/test/ssl_test.c
	programs/x509/cert_app.c
This commit is contained in:
Paul Bakker
2013-06-24 13:01:08 +02:00
parent 3c2122ff9d
commit ef3f8c747e
21 changed files with 112 additions and 93 deletions

View File

@ -75,7 +75,7 @@ int main( int argc, char *argv[] )
{
int ret, len, server_fd;
unsigned char buf[1024];
char *pers = "ssl_client1";
const char *pers = "ssl_client1";
entropy_context entropy;
ctr_drbg_context ctr_drbg;
@ -96,7 +96,8 @@ int main( int argc, char *argv[] )
entropy_init( &entropy );
if( ( ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy,
(unsigned char *) pers, strlen( pers ) ) ) != 0 )
(const unsigned char *) pers,
strlen( pers ) ) ) != 0 )
{
printf( " failed\n ! ctr_drbg_init returned %d\n", ret );
goto exit;
@ -111,7 +112,7 @@ int main( int argc, char *argv[] )
fflush( stdout );
#if defined(POLARSSL_CERTS_C)
ret = x509parse_crt( &cacert, (unsigned char *) test_ca_crt,
ret = x509parse_crt( &cacert, (const unsigned char *) test_ca_crt,
strlen( test_ca_crt ) );
#else
ret = 1;