Fixed const correctness issues in programs and tests
diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c
index ab05952..d8465ca 100644
--- a/programs/pkey/key_app_writer.c
+++ b/programs/pkey/key_app_writer.c
@@ -59,10 +59,10 @@
struct options
{
int mode; /* the mode to run the application in */
- char *filename; /* filename of the key file */
+ const char *filename; /* filename of the key file */
int debug_level; /* level of debugging */
int output_mode; /* the output mode to use */
- char *output_file; /* where to store the constructed key file */
+ const char *output_file; /* where to store the constructed key file */
} opt;
void my_debug( void *ctx, int level, const char *str )
@@ -74,7 +74,7 @@
}
}
-void write_public_key( rsa_context *rsa, char *output_file )
+void write_public_key( rsa_context *rsa, const char *output_file )
{
FILE *f;
unsigned char output_buf[16000];
@@ -111,7 +111,7 @@
fclose(f);
}
-void write_private_key( rsa_context *rsa, char *output_file )
+void write_private_key( rsa_context *rsa, const char *output_file )
{
FILE *f;
unsigned char output_buf[16000];