Fixed const-correctness issues
diff --git a/ChangeLog b/ChangeLog
index 6f194f7..5b32ef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
* Missing MSVC defines added
* Compile errors with POLARSSL_RSA_NO_CRT
* Header files with 'polarssl/'
+ * Const correctness
= PolarSSL-1.3.0 released on 2013-10-01
Features
diff --git a/include/polarssl/pk.h b/include/polarssl/pk.h
index b08f5e3..251c690 100644
--- a/include/polarssl/pk.h
+++ b/include/polarssl/pk.h
@@ -112,7 +112,7 @@
typedef struct
{
pk_debug_type type;
- char *name;
+ const char *name;
void *value;
} pk_debug_item;
diff --git a/library/pkwrite.c b/library/pkwrite.c
index a3e9c57..fcebd48 100644
--- a/library/pkwrite.c
+++ b/library/pkwrite.c
@@ -312,7 +312,7 @@
{
int ret;
unsigned char output_buf[4096];
- char *begin, *end;
+ const char *begin, *end;
size_t olen = 0;
if( ( ret = pk_write_key_der( key, output_buf, sizeof(output_buf) ) ) < 0 )
diff --git a/library/x509_create.c b/library/x509_create.c
index d7a1fee..d3d5851 100644
--- a/library/x509_create.c
+++ b/library/x509_create.c
@@ -36,7 +36,7 @@
int ret = 0;
char *s = name, *c = s;
char *end = s + strlen( s );
- char *oid = NULL;
+ const char *oid = NULL;
int in_tag = 1;
asn1_named_data *cur;