Use "const char *" instead of "char *" for filenames passed to functions.

Submitted by:
Reviewed by:
PR:
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
index 6bcd3a3..734e39a 100644
--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -75,7 +75,8 @@
 	int num_dirs_alloced;
 	} BY_DIR;
 
-static int dir_ctrl(X509_LOOKUP *ctx,int cmd,char *argp,long argl,char **ret);
+static int dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
+	char **ret);
 static int new_dir(X509_LOOKUP *lu);
 static void free_dir(X509_LOOKUP *lu);
 static int add_cert_dir(BY_DIR *ctx,const char *dir,int type);
@@ -100,7 +101,7 @@
 	return(&x509_dir_lookup);
 	}
 
-static int dir_ctrl(X509_LOOKUP *ctx, int cmd, char *argp, long argl,
+static int dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
 	     char **retp)
 	{
 	int ret=0;
diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c
index d42d7e5..8b2d591 100644
--- a/crypto/x509/by_file.c
+++ b/crypto/x509/by_file.c
@@ -70,8 +70,8 @@
 
 #ifndef NO_STDIO
 
-static int by_file_ctrl(X509_LOOKUP *ctx,int cmd,char *argc,
-	long argl,char **ret);
+static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
+	long argl, char **ret);
 X509_LOOKUP_METHOD x509_file_lookup=
 	{
 	"Load file into cache",
@@ -91,7 +91,7 @@
 	return(&x509_file_lookup);
 	}
 
-static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, char *argp, long argl,
+static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
 	     char **ret)
 	{
 	int ok=0,ok2=0;
diff --git a/crypto/x509/x509_d2.c b/crypto/x509/x509_d2.c
index f8f1aa6..3e7ec5b 100644
--- a/crypto/x509/x509_d2.c
+++ b/crypto/x509/x509_d2.c
@@ -82,7 +82,8 @@
 	return(1);
 	}
 
-int X509_STORE_load_locations(X509_STORE *ctx, char *file, char *path)
+int X509_STORE_load_locations(X509_STORE *ctx, const char *file,
+		const char *path)
 	{
 	X509_LOOKUP *lookup;
 
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c
index d86e437..a7536f0 100644
--- a/crypto/x509/x509_lu.c
+++ b/crypto/x509/x509_lu.c
@@ -111,7 +111,7 @@
 		return(1);
 	}
 
-int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, char *argc, long argl,
+int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
 	     char **ret)
 	{
 	if (ctx->method == NULL) return(-1);
diff --git a/crypto/x509/x509_vfy.h b/crypto/x509/x509_vfy.h
index 1f89bf0..faacb01 100644
--- a/crypto/x509/x509_vfy.h
+++ b/crypto/x509/x509_vfy.h
@@ -135,7 +135,8 @@
 	void (*free)(X509_LOOKUP *ctx);
 	int (*init)(X509_LOOKUP *ctx);
 	int (*shutdown)(X509_LOOKUP *ctx);
-	int (*ctrl)(X509_LOOKUP *ctx,int cmd,char *argc,long argl,char **ret);
+	int (*ctrl)(X509_LOOKUP *ctx,int cmd,const char *argc,long argl,
+			char **ret);
 	int (*get_by_subject)(X509_LOOKUP *ctx,int type,X509_NAME *name,
 			      X509_OBJECT *ret);
 	int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name,
@@ -281,7 +282,8 @@
 int X509_STORE_get_by_subject(X509_STORE_CTX *vs,int type,X509_NAME *name,
 	X509_OBJECT *ret);
 
-int X509_LOOKUP_ctrl(X509_LOOKUP *ctx,int cmd,char *argc,long argl,char **ret);
+int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
+	long argl, char **ret);
 
 #ifndef NO_STDIO
 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
@@ -304,7 +306,7 @@
 
 #ifndef NO_STDIO
 int	X509_STORE_load_locations (X509_STORE *ctx,
-		char *file, char *dir);
+		const char *file, const char *dir);
 int	X509_STORE_set_default_paths(X509_STORE *ctx);
 #endif
 
diff --git a/ssl/ssl.h b/ssl/ssl.h
index e93debc..c494ed1 100644
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -868,12 +868,12 @@
 int	SSL_use_certificate_ASN1(SSL *ssl, unsigned char *d, int len);
 
 #ifndef NO_STDIO
-int	SSL_use_RSAPrivateKey_file(SSL *ssl, char *file, int type);
-int	SSL_use_PrivateKey_file(SSL *ssl, char *file, int type);
-int	SSL_use_certificate_file(SSL *ssl, char *file, int type);
-int	SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, char *file, int type);
-int	SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, char *file, int type);
-int	SSL_CTX_use_certificate_file(SSL_CTX *ctx, char *file, int type);
+int	SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
+int	SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
+int	SSL_use_certificate_file(SSL *ssl, const char *file, int type);
+int	SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
+int	SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
+int	SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
 int	SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */
 STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
 int	SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
@@ -1018,7 +1018,8 @@
 int SSL_get_shutdown(SSL *ssl);
 int SSL_version(SSL *ssl);
 int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
-int SSL_CTX_load_verify_locations(SSL_CTX *ctx,char *CAfile,char *CApath);
+int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
+	const char *CApath);
 SSL_SESSION *SSL_get_session(SSL *ssl);
 SSL_CTX *SSL_get_SSL_CTX(SSL *ssl);
 void SSL_set_info_callback(SSL *ssl,void (*cb)());
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 6a80fbe..5ed626f 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1704,7 +1704,8 @@
 	return(X509_STORE_set_default_paths(ctx->cert_store));
 	}
 
-int SSL_CTX_load_verify_locations(SSL_CTX *ctx,char *CAfile,char *CApath)
+int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
+		const char *CApath)
 	{
 	return(X509_STORE_load_locations(ctx->cert_store,CAfile,CApath));
 	}
diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c
index 0f87752..ba0c7f5 100644
--- a/ssl/ssl_rsa.c
+++ b/ssl/ssl_rsa.c
@@ -82,7 +82,7 @@
 	}
 
 #ifndef NO_STDIO
-int SSL_use_certificate_file(SSL *ssl, char *file, int type)
+int SSL_use_certificate_file(SSL *ssl, const char *file, int type)
 	{
 	int j;
 	BIO *in;
@@ -253,7 +253,7 @@
 
 #ifndef NO_RSA
 #ifndef NO_STDIO
-int SSL_use_RSAPrivateKey_file(SSL *ssl, char *file, int type)
+int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
 	{
 	int j,ret=0;
 	BIO *in;
@@ -338,7 +338,7 @@
 	}
 
 #ifndef NO_STDIO
-int SSL_use_PrivateKey_file(SSL *ssl, char *file, int type)
+int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type)
 	{
 	int j,ret=0;
 	BIO *in;
@@ -494,7 +494,7 @@
 	}
 
 #ifndef NO_STDIO
-int SSL_CTX_use_certificate_file(SSL_CTX *ctx, char *file, int type)
+int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
 	{
 	int j;
 	BIO *in;
@@ -591,7 +591,7 @@
 	}
 
 #ifndef NO_STDIO
-int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, char *file, int type)
+int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
 	{
 	int j,ret=0;
 	BIO *in;
@@ -673,7 +673,7 @@
 	}
 
 #ifndef NO_STDIO
-int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, char *file, int type)
+int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
 	{
 	int j,ret=0;
 	BIO *in;