From 37de6bec163db693004257b5c5edd854030d825d Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Sun, 7 Apr 2013 13:11:31 +0200 Subject: [PATCH] Const correctness added for asn1write functions --- include/polarssl/asn1write.h | 4 ++-- library/asn1write.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/polarssl/asn1write.h b/include/polarssl/asn1write.h index 52b9baa96..6bac6c4fa 100644 --- a/include/polarssl/asn1write.h +++ b/include/polarssl/asn1write.h @@ -35,8 +35,8 @@ int asn1_write_len( unsigned char **p, unsigned char *start, size_t len ); int asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag ); int asn1_write_mpi( unsigned char **p, unsigned char *start, mpi *X ); int asn1_write_null( unsigned char **p, unsigned char *start ); -int asn1_write_oid( unsigned char **p, unsigned char *start, char *oid ); -int asn1_write_algorithm_identifier( unsigned char **p, unsigned char *start, char *algorithm_oid ); +int asn1_write_oid( unsigned char **p, unsigned char *start, const char *oid ); +int asn1_write_algorithm_identifier( unsigned char **p, unsigned char *start, const char *algorithm_oid ); int asn1_write_int( unsigned char **p, unsigned char *start, int val ); int asn1_write_printable_string( unsigned char **p, unsigned char *start, char *text ); diff --git a/library/asn1write.c b/library/asn1write.c index e50c17c58..4ea8a46a3 100644 --- a/library/asn1write.c +++ b/library/asn1write.c @@ -118,7 +118,7 @@ int asn1_write_null( unsigned char **p, unsigned char *start ) return( len ); } -int asn1_write_oid( unsigned char **p, unsigned char *start, char *oid ) +int asn1_write_oid( unsigned char **p, unsigned char *start, const char *oid ) { int ret; size_t len = 0; @@ -140,7 +140,7 @@ int asn1_write_oid( unsigned char **p, unsigned char *start, char *oid ) } int asn1_write_algorithm_identifier( unsigned char **p, unsigned char *start, - char *algorithm_oid ) + const char *algorithm_oid ) { int ret; size_t null_len = 0;