diff --git a/include/polarssl/pkcs11.h b/include/polarssl/pkcs11.h index efe7f14be..5087e1951 100644 --- a/include/polarssl/pkcs11.h +++ b/include/polarssl/pkcs11.h @@ -97,7 +97,7 @@ int pkcs11_decrypt( pkcs11_context *ctx, int mode, int *olen, const unsigned char *input, unsigned char *output, - int output_max_len ); + unsigned int output_max_len ); /** * \brief Do a private RSA to sign a message digest diff --git a/library/cipher.c b/library/cipher.c index 545b2dac0..345e2fee1 100644 --- a/library/cipher.c +++ b/library/cipher.c @@ -366,6 +366,8 @@ int cipher_finish( cipher_context_t *ctx, unsigned char *output, int *olen) int cipher_self_test( int verbose ) { + ((void) verbose); + return( 0 ); } diff --git a/library/cipher_wrap.c b/library/cipher_wrap.c index b5cce5a90..dd41a353b 100644 --- a/library/cipher_wrap.c +++ b/library/cipher_wrap.c @@ -203,31 +203,43 @@ int des3_crypt_cbc_wrap( void *ctx, operation_t operation, int length, int des_setkey_dec_wrap( void *ctx, const unsigned char *key, int key_length ) { + ((void) key_length); + return des_setkey_dec( (des_context *) ctx, key ); } int des_setkey_enc_wrap( void *ctx, const unsigned char *key, int key_length ) { + ((void) key_length); + return des_setkey_enc( (des_context *) ctx, key ); } int des3_set2key_dec_wrap( void *ctx, const unsigned char *key, int key_length ) { + ((void) key_length); + return des3_set2key_dec( (des3_context *) ctx, key ); } int des3_set2key_enc_wrap( void *ctx, const unsigned char *key, int key_length ) { + ((void) key_length); + return des3_set2key_enc( (des3_context *) ctx, key ); } int des3_set3key_dec_wrap( void *ctx, const unsigned char *key, int key_length ) { + ((void) key_length); + return des3_set3key_dec( (des3_context *) ctx, key ); } int des3_set3key_enc_wrap( void *ctx, const unsigned char *key, int key_length ) { + ((void) key_length); + return des3_set3key_enc( (des3_context *) ctx, key ); } diff --git a/library/pkcs11.c b/library/pkcs11.c index 172ffc1f6..b4f478763 100644 --- a/library/pkcs11.c +++ b/library/pkcs11.c @@ -116,7 +116,7 @@ int pkcs11_decrypt( pkcs11_context *ctx, int mode, int *olen, const unsigned char *input, unsigned char *output, - int output_max_len ) + unsigned int output_max_len ) { size_t input_len, output_len; diff --git a/library/x509parse.c b/library/x509parse.c index 378f0a956..0e410f4ac 100644 --- a/library/x509parse.c +++ b/library/x509parse.c @@ -776,7 +776,7 @@ static int x509_get_ns_cert_type( unsigned char **p, unsigned char *ns_cert_type) { int ret; - x509_bitstring bs = {0}; + x509_bitstring bs = { 0, 0, NULL }; if( ( ret = asn1_get_bitstring( p, end, &bs ) ) != 0 ) return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS | ret ); @@ -795,7 +795,7 @@ static int x509_get_key_usage( unsigned char **p, unsigned char *key_usage) { int ret; - x509_bitstring bs = {0}; + x509_bitstring bs = { 0, 0, NULL }; if( ( ret = asn1_get_bitstring( p, end, &bs ) ) != 0 ) return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS | ret );