Fixed const correctness issues in programs and tests
(cherry picked from commit e0225e4d7f18f4565224f4997af537533d06a80d)
Conflicts:
programs/ssl/ssl_client2.c
programs/ssl/ssl_server2.c
programs/test/ssl_test.c
programs/x509/cert_app.c
diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c
index 504426a..2c8a88d 100644
--- a/programs/x509/cert_app.c
+++ b/programs/x509/cert_app.c
@@ -58,10 +58,10 @@
struct options
{
int mode; /* the mode to run the application in */
- char *filename; /* filename of the certificate file */
- char *ca_file; /* the file with the CA certificate(s) */
- char *ca_path; /* the path with the CA certificate(s) reside */
- char *server_name; /* hostname of the server (client only) */
+ const char *filename; /* filename of the certificate file */
+ const char *ca_file; /* the file with the CA certificate(s) */
+ const char *ca_path; /* the path with the CA certificate(s) reside */
+ const char *server_name; /* hostname of the server (client only) */
int server_port; /* port on which the ssl service runs */
int debug_level; /* level of debugging */
int permissive; /* permissive parsing */
@@ -161,7 +161,7 @@
int i, j, n;
int flags, verify = 0;
char *p, *q;
- char *pers = "cert_app";
+ const char *pers = "cert_app";
/*
* Set to sane values
@@ -357,7 +357,8 @@
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;