On 08:17 Thu 12 Mar , Sascha Hauer wrote: > On Wed, Mar 11, 2015 at 05:53:08PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > > the hmac algo will be registered as hmac(%s) such as hmac(sha256) > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> > > --- > > +static int digest_hmac_alloc(struct digest *d) > > +{ > > + struct digest_hmac_ctx *dh = d->ctx; > > + struct digest_hmac *hmac = to_digest_hmac(d->algo); > > + > > + dh->d = digest_alloc(hmac->name); > > + if (!dh->d) > > + return -EINVAL; > > + > > + dh->ipad = xmalloc(sizeof(unsigned char) * hmac->pad_length); > > + dh->opad = xmalloc(sizeof(unsigned char) * hmac->pad_length); > > sizeof(unsigned char) is 1. Dropped while applying. habit to always use sizeof but yes no diff Best Regards, J. _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox