1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-01-19 07:52:23 +01:00

Further pointer signedness fixes.

This commit is contained in:
Fredrik Thulin 2011-12-06 13:46:30 +01:00
parent 43134038a5
commit 4ce59833ba
3 changed files with 7 additions and 7 deletions

2
util.c
View File

@ -144,7 +144,7 @@ init_yubikey(YK_KEY **yk)
int challenge_response(YK_KEY *yk, int slot,
char *challenge, unsigned int len,
bool hmac, unsigned int flags, bool verbose,
char *response, int res_size, int *res_len)
char *response, int res_size, unsigned int *res_len)
{
int yk_cmd;
unsigned int response_len = 0;

10
util.h
View File

@ -67,16 +67,16 @@ int get_user_cfgfile_path(const char *common_path, const char *filename, const c
#define CR_RESPONSE_SIZE 20
struct chalresp_state {
unsigned char challenge[CR_CHALLENGE_SIZE];
char challenge[CR_CHALLENGE_SIZE];
uint8_t challenge_len;
unsigned char response[CR_RESPONSE_SIZE];
char response[CR_RESPONSE_SIZE];
uint8_t response_len;
uint8_t slot;
};
typedef struct chalresp_state CR_STATE;
int generate_random(char *buf, int len);
int generate_random(void *buf, int len);
int get_user_challenge_file(YK_KEY *yk, const char *chalresp_path, const char *username, char **fn);
@ -86,9 +86,9 @@ int write_chalresp_state(FILE *f, CR_STATE *state);
int init_yubikey(YK_KEY **yk);
int check_firmware_version(YK_KEY *yk, bool verbose, bool quiet);
int challenge_response(YK_KEY *yk, int slot,
unsigned char *challenge, unsigned int len,
char *challenge, unsigned int len,
bool hmac, unsigned int flags, bool verbose,
unsigned char *response, int res_size, int *res_len);
char *response, int res_size, unsigned int *res_len);
#endif /* HAVE_CR */

View File

@ -118,7 +118,7 @@ parse_args(int argc, char **argv,
int
do_add_hmac_chalresp(YK_KEY *yk, uint8_t slot, bool verbose, char *output_dir, int *exit_code)
{
unsigned char buf[CR_RESPONSE_SIZE + 16];
char buf[CR_RESPONSE_SIZE + 16];
CR_STATE state;
unsigned int flags = 0;
int ret = 0;