Fixed const correctness issues that have no impact on the ABI
diff --git a/library/x509parse.c b/library/x509parse.c
index bac0e93..131fccf 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -1433,7 +1433,7 @@
* one or more PEM certificates.
*/
#if defined(POLARSSL_PEM_C)
- if( strstr( (char *) buf, "-----BEGIN CERTIFICATE-----" ) != NULL )
+ if( strstr( (const char *) buf, "-----BEGIN CERTIFICATE-----" ) != NULL )
buf_format = X509_FORMAT_PEM;
#endif
@@ -3563,7 +3563,7 @@
memset( &clicert, 0, sizeof( x509_cert ) );
- ret = x509parse_crt( &clicert, (unsigned char *) test_cli_crt,
+ ret = x509parse_crt( &clicert, (const unsigned char *) test_cli_crt,
strlen( test_cli_crt ) );
if( ret != 0 )
{
@@ -3575,7 +3575,7 @@
memset( &cacert, 0, sizeof( x509_cert ) );
- ret = x509parse_crt( &cacert, (unsigned char *) test_ca_crt,
+ ret = x509parse_crt( &cacert, (const unsigned char *) test_ca_crt,
strlen( test_ca_crt ) );
if( ret != 0 )
{
@@ -3594,8 +3594,8 @@
rsa_init( &rsa, RSA_PKCS_V15, 0 );
if( ( ret = x509parse_key( &rsa,
- (unsigned char *) test_ca_key, i,
- (unsigned char *) test_ca_pwd, j ) ) != 0 )
+ (const unsigned char *) test_ca_key, i,
+ (const unsigned char *) test_ca_pwd, j ) ) != 0 )
{
if( verbose != 0 )
printf( "failed\n" );
@@ -3623,7 +3623,7 @@
i = strlen( test_dhm_params );
j = strlen( test_ca_pwd );
- if( ( ret = x509parse_dhm( &dhm, (unsigned char *) test_dhm_params, i ) ) != 0 )
+ if( ( ret = x509parse_dhm( &dhm, (const unsigned char *) test_dhm_params, i ) ) != 0 )
{
if( verbose != 0 )
printf( "failed\n" );