got rid of warning about signed vs unsigned
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@897 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -82,7 +82,7 @@ otp_get (void *v, OtpContext *ctx)
|
||||
{
|
||||
DBM *dbm = (DBM *)v;
|
||||
datum dat, key;
|
||||
unsigned char *p;
|
||||
char *p;
|
||||
time_t now, then;
|
||||
|
||||
key.dsize = strlen(ctx->user);
|
||||
@@ -120,7 +120,7 @@ otp_put (void *v, OtpContext *ctx)
|
||||
{
|
||||
DBM *dbm = (DBM *)v;
|
||||
datum dat, key;
|
||||
unsigned char buf[1024], *p;
|
||||
char buf[1024], *p;
|
||||
time_t zero = 0;
|
||||
|
||||
key.dsize = strlen(ctx->user);
|
||||
|
@@ -72,10 +72,10 @@ otp_md_init (OtpKey key,
|
||||
char *pwd,
|
||||
char *seed,
|
||||
void (*init)(void *),
|
||||
void (*update)(void *, u_char *, size_t),
|
||||
void (*finito)(void *, char *),
|
||||
void (*update)(void *, void *, size_t),
|
||||
void (*finito)(void *, void *),
|
||||
void *arg,
|
||||
char *res,
|
||||
unsigned char *res,
|
||||
size_t ressz)
|
||||
{
|
||||
char *p;
|
||||
@@ -98,10 +98,10 @@ otp_md_init (OtpKey key,
|
||||
static int
|
||||
otp_md_next (OtpKey key,
|
||||
void (*init)(void *),
|
||||
void (*update)(void *, u_char *, size_t),
|
||||
void (*finito)(void *, char *),
|
||||
void (*update)(void *, void *, size_t),
|
||||
void (*finito)(void *, void *),
|
||||
void *arg,
|
||||
char *res,
|
||||
unsigned char *res,
|
||||
size_t ressz)
|
||||
{
|
||||
(*init)(arg);
|
||||
@@ -115,10 +115,10 @@ static int
|
||||
otp_md_hash (char *data,
|
||||
size_t len,
|
||||
void (*init)(void *),
|
||||
void (*update)(void *, u_char *, size_t),
|
||||
void (*finito)(void *, char *),
|
||||
void (*update)(void *, void *, size_t),
|
||||
void (*finito)(void *, void *),
|
||||
void *arg,
|
||||
char *res,
|
||||
unsigned char *res,
|
||||
size_t ressz)
|
||||
{
|
||||
(*init)(arg);
|
||||
@@ -135,22 +135,22 @@ otp_md4_init (OtpKey key, char *pwd, char *seed)
|
||||
|
||||
return otp_md_init (key, pwd, seed,
|
||||
(void (*)(void *))md4_init,
|
||||
(void (*)(void *, u_char *, size_t))md4_update,
|
||||
(void (*)(void *, char *))md4_finito,
|
||||
(void (*)(void *, void *, size_t))md4_update,
|
||||
(void (*)(void *, void *))md4_finito,
|
||||
&md4, res, sizeof(res));
|
||||
}
|
||||
|
||||
int
|
||||
otp_md4_hash (char *data,
|
||||
size_t len,
|
||||
char *res)
|
||||
unsigned char *res)
|
||||
{
|
||||
struct md4 md4;
|
||||
|
||||
return otp_md_hash (data, len,
|
||||
(void (*)(void *))md4_init,
|
||||
(void (*)(void *, u_char *, size_t))md4_update,
|
||||
(void (*)(void *, char *))md4_finito,
|
||||
(void (*)(void *, void *, size_t))md4_update,
|
||||
(void (*)(void *, void *))md4_finito,
|
||||
&md4, res, 16);
|
||||
}
|
||||
|
||||
@@ -162,8 +162,8 @@ otp_md4_next (OtpKey key)
|
||||
|
||||
return otp_md_next (key,
|
||||
(void (*)(void *))md4_init,
|
||||
(void (*)(void *, u_char *, size_t))md4_update,
|
||||
(void (*)(void *, char *))md4_finito,
|
||||
(void (*)(void *, void *, size_t))md4_update,
|
||||
(void (*)(void *, void *))md4_finito,
|
||||
&md4, res, sizeof(res));
|
||||
}
|
||||
|
||||
@@ -176,22 +176,22 @@ otp_md5_init (OtpKey key, char *pwd, char *seed)
|
||||
|
||||
return otp_md_init (key, pwd, seed,
|
||||
(void (*)(void *))md5_init,
|
||||
(void (*)(void *, u_char *, size_t))md5_update,
|
||||
(void (*)(void *, char *))md5_finito,
|
||||
(void (*)(void *, void *, size_t))md5_update,
|
||||
(void (*)(void *, void *))md5_finito,
|
||||
&md5, res, sizeof(res));
|
||||
}
|
||||
|
||||
int
|
||||
otp_md5_hash (char *data,
|
||||
size_t len,
|
||||
char *res)
|
||||
unsigned char *res)
|
||||
{
|
||||
struct md5 md5;
|
||||
|
||||
return otp_md_hash (data, len,
|
||||
(void (*)(void *))md5_init,
|
||||
(void (*)(void *, u_char *, size_t))md5_update,
|
||||
(void (*)(void *, char *))md5_finito,
|
||||
(void (*)(void *, void *, size_t))md5_update,
|
||||
(void (*)(void *, void *))md5_finito,
|
||||
&md5, res, 16);
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ otp_md5_next (OtpKey key)
|
||||
|
||||
return otp_md_next (key,
|
||||
(void (*)(void *))md5_init,
|
||||
(void (*)(void *, u_char *, size_t))md5_update,
|
||||
(void (*)(void *, char *))md5_finito,
|
||||
(void (*)(void *, void *, size_t))md5_update,
|
||||
(void (*)(void *, void *))md5_finito,
|
||||
&md5, res, sizeof(res));
|
||||
}
|
||||
|
||||
@@ -216,22 +216,22 @@ otp_sha_init (OtpKey key, char *pwd, char *seed)
|
||||
|
||||
return otp_md_init (key, pwd, seed,
|
||||
(void (*)(void *))sha_init,
|
||||
(void (*)(void *, u_char *, size_t))sha_update,
|
||||
(void (*)(void *, char *))sha_finito,
|
||||
(void (*)(void *, void *, size_t))sha_update,
|
||||
(void (*)(void *, void *))sha_finito,
|
||||
&sha, res, sizeof(res));
|
||||
}
|
||||
|
||||
int
|
||||
otp_sha_hash (char *data,
|
||||
size_t len,
|
||||
char *res)
|
||||
unsigned char *res)
|
||||
{
|
||||
struct sha sha;
|
||||
|
||||
return otp_md_hash (data, len,
|
||||
(void (*)(void *))sha_init,
|
||||
(void (*)(void *, u_char *, size_t))sha_update,
|
||||
(void (*)(void *, char *))sha_finito,
|
||||
(void (*)(void *, void *, size_t))sha_update,
|
||||
(void (*)(void *, void *))sha_finito,
|
||||
&sha, res, 20);
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ otp_sha_next (OtpKey key)
|
||||
|
||||
return otp_md_next (key,
|
||||
(void (*)(void *))sha_init,
|
||||
(void (*)(void *, u_char *, size_t))sha_update,
|
||||
(void (*)(void *, char *))sha_finito,
|
||||
(void (*)(void *, void *, size_t))sha_update,
|
||||
(void (*)(void *, void *))sha_finito,
|
||||
&sha, res, sizeof(res));
|
||||
}
|
||||
|
@@ -39,13 +39,13 @@
|
||||
/* $Id$ */
|
||||
|
||||
int otp_md4_init (OtpKey key, char *pwd, char *seed);
|
||||
int otp_md4_hash (char *, size_t, char *res);
|
||||
int otp_md4_hash (char *, size_t, unsigned char *res);
|
||||
int otp_md4_next (OtpKey key);
|
||||
|
||||
int otp_md5_init (OtpKey key, char *pwd, char *seed);
|
||||
int otp_md5_hash (char *, size_t, char *res);
|
||||
int otp_md5_hash (char *, size_t, unsigned char *res);
|
||||
int otp_md5_next (OtpKey key);
|
||||
|
||||
int otp_sha_init (OtpKey key, char *pwd, char *seed);
|
||||
int otp_sha_hash (char *, size_t, char *res);
|
||||
int otp_sha_hash (char *, size_t, unsigned char *res);
|
||||
int otp_sha_next (OtpKey key);
|
||||
|
Reference in New Issue
Block a user