X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=authobj.c;h=224cbb56b9df63998bb35ad7db846da77fe4fd95;hp=adc101b087c426b71f86a977ef7b95b1dbc1b917;hb=f5144b94c8221f81c6d7520990a7602c3ce2a5a4;hpb=1e82444d55250382a5521bf4442fdb90369d2c2f diff --git a/authobj.c b/authobj.c index adc101b..224cbb5 100644 --- a/authobj.c +++ b/authobj.c @@ -158,19 +158,19 @@ parse_authobj(const unsigned char *key, const int keysize, serial_init(&srl, ao.buffer, bufsize); if (serial_get(&srl, (void**)&ao.data, &ao.datasize)) { - ao.err = "parse authobj: too long secret"; + ao.err = "mismatch: impossible secret"; } else if (serial_get(&srl, (void**)&ao.payload, &ao.paylsize)) { - ao.err = "parse authobj: too long payload"; + ao.err = "mismatch: impossible payload"; } else if ((rc = hash(ao.buffer, serial_size(&srl), myhash, &myhsize))) { ao.err = crypto_errstr(rc); } else if (serial_get(&srl, (void**)&theirhash, &theirhsize)) { - ao.err = "parse authobj: too long hash"; + ao.err = "mismatch: impossible hash"; } else if (theirhsize != HASHSIZE) { - ao.err = "parse authobj: hash is of wrong size"; + ao.err = "mismatch: hash is of wrong size"; } else if ((myhsize != theirhsize) || memcmp(myhash, theirhash, myhsize)) { - ao.err = "parse authobj: hash mismatch"; + ao.err = "mismatch: different hash"; } } return ao;