From a650a4adf5b4c16b1ecc6d90ab18d9d6ea960c1c Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 19 Sep 2011 00:34:31 +0000 Subject: [PATCH] Fix pkinit warnings git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25185 dc483132-0cff-0310-8789-dd5450dbe970 --- src/plugins/preauth/pkinit/pkinit.h | 2 +- src/plugins/preauth/pkinit/pkinit_crypto_openssl.c | 6 +++--- src/plugins/preauth/pkinit/pkinit_lib.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/preauth/pkinit/pkinit.h b/src/plugins/preauth/pkinit/pkinit.h index b7246a99f..6ba399de1 100644 --- a/src/plugins/preauth/pkinit/pkinit.h +++ b/src/plugins/preauth/pkinit/pkinit.h @@ -357,7 +357,7 @@ krb5_error_code pkinit_libdefault_integer /* * debugging functions */ -void print_buffer(unsigned char *, unsigned int); +void print_buffer(const unsigned char *, unsigned int); void print_buffer_bin(unsigned char *, unsigned int, char *); /* diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c index 0090b5dbc..56fc3fe8f 100644 --- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c @@ -3944,7 +3944,7 @@ pkinit_get_certs_pkcs12(krb5_context context, r = snprintf(prompt_string, sizeof(prompt_string), "%s %s", prompt_prefix, idopts->cert_filename); - if (r >= sizeof(prompt_string)) { + if (r >= (int) sizeof(prompt_string)) { pkiDebug("Prompt string, '%s %s', is too long!\n", prompt_prefix, idopts->cert_filename); goto cleanup; @@ -4655,7 +4655,7 @@ X509_NAME_oneline_ex(X509_NAME * a, out = BIO_new(BIO_s_mem ()); if (X509_NAME_print_ex(out, a, 0, flag) > 0) { - if (buf != NULL && (int)(*size) > BIO_number_written(out)) { + if (buf != NULL && (*size) > (unsigned int) BIO_number_written(out)) { memset(buf, 0, *size); BIO_read(out, buf, (int) BIO_number_written(out)); } @@ -5663,7 +5663,7 @@ pkcs7_dataDecode(krb5_context context, if (EVP_CIPHER_asn1_to_param(evp_ctx,enc_alg->parameter) < 0) goto cleanup; - if ((unsigned) jj != EVP_CIPHER_CTX_key_length(evp_ctx)) { + if (jj != (unsigned) EVP_CIPHER_CTX_key_length(evp_ctx)) { /* Some S/MIME clients don't use the same key * and effective key length. The key length is * determined by the size of the decrypted RSA key. diff --git a/src/plugins/preauth/pkinit/pkinit_lib.c b/src/plugins/preauth/pkinit/pkinit_lib.c index a6d7762fb..fd4c0b528 100644 --- a/src/plugins/preauth/pkinit/pkinit_lib.c +++ b/src/plugins/preauth/pkinit/pkinit_lib.c @@ -422,7 +422,7 @@ pkinit_copy_krb5_octet_data(krb5_octet_data *dst, const krb5_octet_data *src) /* debugging functions */ void -print_buffer(unsigned char *buf, unsigned int len) +print_buffer(const unsigned char *buf, unsigned int len) { unsigned i = 0; if (len <= 0) -- 2.26.2