X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_keyexpimp.c;h=02eac5d1153581a709f2965a1354f7717b6a0a11;hb=d2810d23a9f30ae885f9bf0783f0847a12972ff3;hp=15d172d6d0982fb30ffda19a842fdab9351a9e41;hpb=1d5c8f8d6422049b58dc83e113039e95207edf33;p=openssl-gost%2Fengine.git diff --git a/gost_keyexpimp.c b/gost_keyexpimp.c index 15d172d..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; @@ -407,7 +412,7 @@ static int kuznyechik_wrap_do(EVP_CIPHER_CTX *ctx, unsigned char *out, } } -int wrap_ctrl (EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) +static int wrap_ctrl (EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) { switch(type) {