X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=authobj.c;h=ed20d4a41c0db67655fefbf0562e592032f090d4;hp=f8d577d8d66eb43efbcf89409c620791ceca0ca9;hb=b7d64e8a15a3a652d0844596307b787bc1711fa4;hpb=dc8959a3cb5615448ea9307a3277e608ffd8a6dd diff --git a/authobj.c b/authobj.c index f8d577d..ed20d4a 100644 --- a/authobj.c +++ b/authobj.c @@ -3,11 +3,11 @@ #endif #include #include +#include #include #include "serial.h" #include "crypto.h" #include "authobj.h" -#include "pcsc_cr.h" static struct _auth_chunk make_challenge(const char *uid, const char *pass, const char *nonce) @@ -88,7 +88,7 @@ make_key(const char *userid, const char *password, const char *nonce, } static struct _auth_obj -make_authobj(char *userid, char *password, char *nonce, +make_authobj(const char *userid, const char *password, const char *nonce, const unsigned char *secret, const int secsize, const unsigned char *payload, const int paylsize) { @@ -146,7 +146,7 @@ make_authobj(char *userid, char *password, char *nonce, } static struct _auth_obj -parse_authobj(char *userid, char *password, char *nonce, +parse_authobj(const char *userid, const char *password, const char *nonce, const unsigned char *secret, const int secsize, const unsigned char *ablob, const int blobsize, struct _auth_chunk (*fetch_key)(const unsigned char *chal, @@ -201,11 +201,11 @@ struct _auth_obj authobj(const char *userid, const char *password, struct _auth_chunk (*fetch_key)(const unsigned char *chal, const int csize)) { - unsigned char *wsecret; + const unsigned char *wsecret; int wsecsize; - unsigned char *wpayload; + const unsigned char *wpayload; int wpaylsize; - struct _auth_obj old_ao; + struct _auth_obj old_ao = {0}; struct _auth_obj new_ao = {0}; if (!secret || !secsize || !payload) {