+/*
+ * Copyright (c) 2019 Dmitry Belyavskiy <beldmit@gmail.com>
+ * Copyright (c) 2020 Vitaly Chikunov <vt@altlinux.org>
+ *
+ * Contents licensed under the terms of the OpenSSL license
+ * See https://www.openssl.org/source/license.html for details
+ */
#ifdef _WIN32
#include <winsock.h>
#else
#include <string.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
+#include <openssl/buffer.h>
#include "gost_lcl.h"
#include "e_gost_err.h"
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;
}
}
-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)
{