diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-09-18 11:18:10 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-09-18 11:18:10 +0300 |
commit | f1f47c6c7710291157aa863768d9048aaeaa9530 (patch) | |
tree | 2f14d2cbe76e6a5c588d234a03a42bebb3e1b52c /gost_keyexpimp.c | |
parent | 0c4da90d6605b68fcb1e6e95b3d7eecb2ecb1a80 (diff) | |
download | gost-engine-f1f47c6c7710291157aa863768d9048aaeaa9530.zip gost-engine-f1f47c6c7710291157aa863768d9048aaeaa9530.tar.gz gost-engine-f1f47c6c7710291157aa863768d9048aaeaa9530.tar.bz2 |
Endianess bugfix
Diffstat (limited to 'gost_keyexpimp.c')
-rw-r--r-- | gost_keyexpimp.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <string.h> #include <openssl/evp.h> #include <openssl/hmac.h> +#include <openssl/buffer.h> #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; |