Const correctness
diff --git a/include/polarssl/x509.h b/include/polarssl/x509.h
index e7472c4..a456537 100644
--- a/include/polarssl/x509.h
+++ b/include/polarssl/x509.h
@@ -265,7 +265,7 @@
x509_buf *ext, int tag );
int x509_load_file( const char *path, unsigned char **buf, size_t *n );
int x509_key_size_helper( char *buf, size_t size, const char *name );
-int x509_string_to_names( asn1_named_data **head, char *name );
+int x509_string_to_names( asn1_named_data **head, const char *name );
int x509_set_extension( asn1_named_data **head, const char *oid, size_t oid_len, int critical, const unsigned char *val, size_t val_len );
int x509_write_extensions( unsigned char **p, unsigned char *start,
asn1_named_data *first );
diff --git a/include/polarssl/x509_crt.h b/include/polarssl/x509_crt.h
index a556676..a5ab178 100644
--- a/include/polarssl/x509_crt.h
+++ b/include/polarssl/x509_crt.h
@@ -312,8 +312,8 @@
* \return 0 if timestamp was parsed successfully, or
* a specific error code
*/
-int x509write_crt_set_validity( x509write_cert *ctx, char *not_before,
- char *not_after );
+int x509write_crt_set_validity( x509write_cert *ctx, const char *not_before,
+ const char *not_after );
/**
* \brief Set the issuer name for a Certificate
@@ -327,7 +327,8 @@
* \return 0 if issuer name was parsed successfully, or
* a specific error code
*/
-int x509write_crt_set_issuer_name( x509write_cert *ctx, char *issuer_name );
+int x509write_crt_set_issuer_name( x509write_cert *ctx,
+ const char *issuer_name );
/**
* \brief Set the subject name for a Certificate
@@ -341,7 +342,8 @@
* \return 0 if subject name was parsed successfully, or
* a specific error code
*/
-int x509write_crt_set_subject_name( x509write_cert *ctx, char *subject_name );
+int x509write_crt_set_subject_name( x509write_cert *ctx,
+ const char *subject_name );
/**
* \brief Set the subject public key for the certificate
diff --git a/include/polarssl/x509_csr.h b/include/polarssl/x509_csr.h
index 30ef7c5..7e38300 100644
--- a/include/polarssl/x509_csr.h
+++ b/include/polarssl/x509_csr.h
@@ -155,7 +155,8 @@
* \return 0 if subject name was parsed successfully, or
* a specific error code
*/
-int x509write_csr_set_subject_name( x509write_csr *ctx, char *subject_name );
+int x509write_csr_set_subject_name( x509write_csr *ctx,
+ const char *subject_name );
/**
* \brief Set the key for a CSR (public key will be included,