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. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox