From: Dmitry Belyavskiy Date: Fri, 18 Sep 2020 08:18:10 +0000 (+0300) Subject: Endianess bugfix X-Git-Tag: v3.0.0~67 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=f1f47c6c7710291157aa863768d9048aaeaa9530;p=openssl-gost%2Fengine.git Endianess bugfix --- diff --git a/gost_keyexpimp.c b/gost_keyexpimp.c index 1f2c0aa..02eac5d 100644 --- a/gost_keyexpimp.c +++ b/gost_keyexpimp.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "gost_lcl.h" #include "e_gost_err.h" @@ -267,7 +268,11 @@ int gost_tlstree(int cipher_nid, const unsigned char *in, unsigned char *out, default: return 0; } +#ifndef L_ENDIAN + BUF_reverse(&seq, tlsseq, 8); +#else memcpy(&seq, tlsseq, 8); +#endif seed1 = seq & c1; seed2 = seq & c2; seed3 = seq & c3;