X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_gost2015.c;h=8989ab1c50b42c423aa19c3ad862548567d805ee;hb=e0a500ab877ba72cb14026a24d462dd923b90ced;hp=7d207d02a39e2e7e375acf1e954df04f1423530b;hpb=2a8a5e0ecaa3e3d6f4ec722a49aa72476755c2b7;p=openssl-gost%2Fengine.git diff --git a/gost_gost2015.c b/gost_gost2015.c index 7d207d0..8989ab1 100644 --- a/gost_gost2015.c +++ b/gost_gost2015.c @@ -465,8 +465,11 @@ int gost_mgm128_finish(mgm128_context *ctx, const unsigned char *tag, ctx->len.u[0] = alen; ctx->len.u[1] = clen; } else { - // TODO: check for big-endian +#ifdef L_ENDIAN ctx->len.u[0] = (alen >> 32) | clen; +#else + ctx->len.u[0] = (alen << 32) | clen; +#endif ctx->len.u[1] = 0; }