Cleanup up non-prototyped functions (static) and const-correctness

More fixes based on the compiler directives -Wcast-qual -Wwrite-strings
-Wmissing-prototypes -Wmissing-declarations. Not everything with regards
to -Wcast-qual has been fixed as some have unwanted consequences for the
rest of the code.
This commit is contained in:
Paul Bakker 2013-06-25 16:25:17 +02:00
parent 169b7f4a13
commit b6c5d2e1a6
16 changed files with 98 additions and 93 deletions

View file

@ -86,7 +86,7 @@ void pem_init( pem_context *ctx );
*
* \return 0 on success, ior a specific PEM error code
*/
int pem_read_buffer( pem_context *ctx, char *header, char *footer,
int pem_read_buffer( pem_context *ctx, const char *header, const char *footer,
const unsigned char *data,
const unsigned char *pwd,
size_t pwdlen, size_t *use_len );

View file

@ -383,11 +383,11 @@ struct _ssl_handshake_params
sha2_context fin_sha2;
sha4_context fin_sha4;
void (*update_checksum)(ssl_context *, unsigned char *, size_t);
void (*update_checksum)(ssl_context *, const unsigned char *, size_t);
void (*calc_verify)(ssl_context *, unsigned char *);
void (*calc_finished)(ssl_context *, unsigned char *, int);
int (*tls_prf)(unsigned char *, size_t, char *,
unsigned char *, size_t,
int (*tls_prf)(const unsigned char *, size_t, const char *,
const unsigned char *, size_t,
unsigned char *, size_t);
size_t pmslen; /*!< premaster length */

View file

@ -66,7 +66,7 @@ extern "C" {
* \param ctx XTEA context to be initialized
* \param key the secret key
*/
void xtea_setup( xtea_context *ctx, unsigned char key[16] );
void xtea_setup( xtea_context *ctx, const unsigned char key[16] );
/**
* \brief XTEA cipher function
@ -80,7 +80,7 @@ void xtea_setup( xtea_context *ctx, unsigned char key[16] );
*/
int xtea_crypt_ecb( xtea_context *ctx,
int mode,
unsigned char input[8],
const unsigned char input[8],
unsigned char output[8] );
/**
@ -100,7 +100,7 @@ int xtea_crypt_cbc( xtea_context *ctx,
int mode,
size_t length,
unsigned char iv[8],
unsigned char *input,
const unsigned char *input,
unsigned char *output);
#ifdef __cplusplus