]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix pkinit warnings
authorSam Hartman <hartmans@mit.edu>
Mon, 19 Sep 2011 00:34:31 +0000 (00:34 +0000)
committerSam Hartman <hartmans@mit.edu>
Mon, 19 Sep 2011 00:34:31 +0000 (00:34 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25185 dc483132-0cff-0310-8789-dd5450dbe970

src/plugins/preauth/pkinit/pkinit.h
src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
src/plugins/preauth/pkinit/pkinit_lib.c

index b7246a99f9ee6fcc9e08bb24e276e19c322f7448..6ba399de18f2f69927339889b237c3340eced926 100644 (file)
@@ -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 *);
 
 /*
index 0090b5dbc0d8530c7ffb269d44e8203a0406e68b..56fc3fe8f7fc67c78184a745877cfeff72d42e65 100644 (file)
@@ -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.
index a6d7762fbb9ea819f9c4ca31cc24cd79107c4af0..fd4c0b52868e735dc0aea42f6ffb588abf9245c5 100644 (file)
@@ -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)