summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/crypto')
-rw-r--r--src/lib/crypto/builtin/yhash.h2
-rw-r--r--src/lib/crypto/krb/yarrow/yarrow.c5
-rw-r--r--src/lib/crypto/krb/yarrow/yarrow.h4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/crypto/builtin/yhash.h b/src/lib/crypto/builtin/yhash.h
index ee4f03eb2..ce78c56f8 100644
--- a/src/lib/crypto/builtin/yhash.h
+++ b/src/lib/crypto/builtin/yhash.h
@@ -15,7 +15,7 @@
#define HASH_Init(x) shsInit(x)
#define HASH_Update(x, buf, sz) shsUpdate(x, (const void*)buf, sz)
#define HASH_Final(x, tdigest) do { \
- int loopvar; \
+ size_t loopvar; \
unsigned char *out2 = (void *)(tdigest); \
HASH_CTX *ctx = (x); \
shsFinal(ctx); \
diff --git a/src/lib/crypto/krb/yarrow/yarrow.c b/src/lib/crypto/krb/yarrow/yarrow.c
index 4b1fcf1dc..66a5fe45a 100644
--- a/src/lib/crypto/krb/yarrow/yarrow.c
+++ b/src/lib/crypto/krb/yarrow/yarrow.c
@@ -462,7 +462,7 @@ int krb5int_yarrow_status( Yarrow_CTX* y, int *num_sources, unsigned *source_id,
EXCEP_DECL;
int num = y->slow_k_of_n_thresh;
int source = -1;
- int emax = y->slow_thresh;
+ size_t emax = y->slow_thresh;
size_t entropy = 0;
unsigned i;
@@ -929,7 +929,8 @@ YARROW_DLL
const char* krb5int_yarrow_str_error( int err )
{
err = 1-err;
- if ( err < 0 || err >= sizeof( yarrow_str_error ) / sizeof( char* ) )
+ if ( err < 0 ||
+ (unsigned int) err >= sizeof( yarrow_str_error ) / sizeof( char* ) )
{
err = 1-YARROW_FAIL;
}
diff --git a/src/lib/crypto/krb/yarrow/yarrow.h b/src/lib/crypto/krb/yarrow/yarrow.h
index 081a06ba5..3cf50fdea 100644
--- a/src/lib/crypto/krb/yarrow/yarrow.h
+++ b/src/lib/crypto/krb/yarrow/yarrow.h
@@ -121,8 +121,8 @@ typedef struct
int slow_k_of_n;
/* current thresholds */
- int slow_thresh;
- int fast_thresh;
+ size_t slow_thresh;
+ size_t fast_thresh;
int slow_k_of_n_thresh;
} Yarrow_CTX;