mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-01-31 16:52:19 +01:00
Further pointer signedness fixes.
This commit is contained in:
parent
43134038a5
commit
4ce59833ba
2
util.c
2
util.c
@ -144,7 +144,7 @@ init_yubikey(YK_KEY **yk)
|
|||||||
int challenge_response(YK_KEY *yk, int slot,
|
int challenge_response(YK_KEY *yk, int slot,
|
||||||
char *challenge, unsigned int len,
|
char *challenge, unsigned int len,
|
||||||
bool hmac, unsigned int flags, bool verbose,
|
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;
|
int yk_cmd;
|
||||||
unsigned int response_len = 0;
|
unsigned int response_len = 0;
|
||||||
|
10
util.h
10
util.h
@ -67,16 +67,16 @@ int get_user_cfgfile_path(const char *common_path, const char *filename, const c
|
|||||||
#define CR_RESPONSE_SIZE 20
|
#define CR_RESPONSE_SIZE 20
|
||||||
|
|
||||||
struct chalresp_state {
|
struct chalresp_state {
|
||||||
unsigned char challenge[CR_CHALLENGE_SIZE];
|
char challenge[CR_CHALLENGE_SIZE];
|
||||||
uint8_t challenge_len;
|
uint8_t challenge_len;
|
||||||
unsigned char response[CR_RESPONSE_SIZE];
|
char response[CR_RESPONSE_SIZE];
|
||||||
uint8_t response_len;
|
uint8_t response_len;
|
||||||
uint8_t slot;
|
uint8_t slot;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct chalresp_state CR_STATE;
|
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);
|
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 init_yubikey(YK_KEY **yk);
|
||||||
int check_firmware_version(YK_KEY *yk, bool verbose, bool quiet);
|
int check_firmware_version(YK_KEY *yk, bool verbose, bool quiet);
|
||||||
int challenge_response(YK_KEY *yk, int slot,
|
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,
|
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 */
|
#endif /* HAVE_CR */
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ parse_args(int argc, char **argv,
|
|||||||
int
|
int
|
||||||
do_add_hmac_chalresp(YK_KEY *yk, uint8_t slot, bool verbose, char *output_dir, int *exit_code)
|
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;
|
CR_STATE state;
|
||||||
unsigned int flags = 0;
|
unsigned int flags = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user