Fixed const-correctness issues

This commit is contained in:
Paul Bakker 2013-10-11 09:36:52 +02:00
parent ddba8822d0
commit fcc172138c
4 changed files with 4 additions and 3 deletions

View file

@ -8,6 +8,7 @@ Bugfix
* Missing MSVC defines added * Missing MSVC defines added
* Compile errors with POLARSSL_RSA_NO_CRT * Compile errors with POLARSSL_RSA_NO_CRT
* Header files with 'polarssl/' * Header files with 'polarssl/'
* Const correctness
= PolarSSL-1.3.0 released on 2013-10-01 = PolarSSL-1.3.0 released on 2013-10-01
Features Features

View file

@ -112,7 +112,7 @@ typedef enum
typedef struct typedef struct
{ {
pk_debug_type type; pk_debug_type type;
char *name; const char *name;
void *value; void *value;
} pk_debug_item; } pk_debug_item;

View file

@ -312,7 +312,7 @@ int pk_write_key_pem( pk_context *key, unsigned char *buf, size_t size )
{ {
int ret; int ret;
unsigned char output_buf[4096]; unsigned char output_buf[4096];
char *begin, *end; const char *begin, *end;
size_t olen = 0; size_t olen = 0;
if( ( ret = pk_write_key_der( key, output_buf, sizeof(output_buf) ) ) < 0 ) if( ( ret = pk_write_key_der( key, output_buf, sizeof(output_buf) ) ) < 0 )

View file

@ -36,7 +36,7 @@ int x509_string_to_names( asn1_named_data **head, char *name )
int ret = 0; int ret = 0;
char *s = name, *c = s; char *s = name, *c = s;
char *end = s + strlen( s ); char *end = s + strlen( s );
char *oid = NULL; const char *oid = NULL;
int in_tag = 1; int in_tag = 1;
asn1_named_data *cur; asn1_named_data *cur;