Hi Klaus,
> > + { .key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
> > + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b },
> > + .key_len = 20,
> > + .data = { "Hi There" },
> > + .data_len = 8,
> > + .mech = { CKM_SHA_1_HMAC_GENERAL, &four, sizeof(CK_ULONG) },
> > + .hash_len = 20,
> > + .result = { 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64, 0xe2,
> > 0x8b,
> > + 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e, 0xf1, 0x46, 0xbe,
> > 0x00 }
> > + },
>
> Since we're only asking for 4 bytes, we could make .hash_len=4 and use
> use only the first 4 bytes, right? Just wanted to confirm, since this
> may possibly simplify the logic further down, but either way is fine.
Yep, that's correct. Based on the way the test and the P11 API work, we
could use anything from 1 byte to hash_len bytes. I just re-used 4 since the
previous test used it.
> > + .mech = { CKM_SHA256_HMAC, 0, 0 },
> > + .hash_len = 32,
> > + .result = { 0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, 0x27,
> > 0x63, 0x5f, 0xbc, 0xd5,
> > + 0xb0, 0xe9, 0x44, 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07,
> > 0x13, 0x93, 0x8a, 0x7f,
> > + 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2 }
> > + },
>
> Just checking, we are not doing any SHA_HMAC[256|512]_GENERAL tests?
Hey, good catch. I can add them on top of this or resubmit this patch if
you'd like.
> > +char *
> > +p11_get_mech(CK_ULONG mechanism)
> > +{
>
> It may sound picky, but we're using p11_get_ckr() and p11_get_mech().
> Do you think we should change the first to use p11_get_err() or the
> second to use p11_get_ckm()?
Not picky at all, I had the same thoughts. :-) Your call though... _ckm is
fine w/ me.
Thanks,
Kent
>
> Thanks,
>
> -Klaus
>
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech