提交 744ecaa5 编写于 作者: D Dr. Stephen Henson

Avoid WIN32 signed/unsigned warnings.

上级 76d761cc
......@@ -354,7 +354,7 @@ int gost_mac(gost_ctx *ctx,int mac_len,const unsigned char *data,
{
byte buffer[8]={0,0,0,0,0,0,0,0};
byte buf2[8];
int i;
unsigned int i;
for (i=0;i+8<=data_len;i+=8)
mac_block(ctx,buffer,data+i);
if (i<data_len)
......@@ -373,7 +373,7 @@ int gost_mac_iv(gost_ctx *ctx,int mac_len,const unsigned char *iv,const unsigned
{
byte buffer[8];
byte buf2[8];
int i;
unsigned int i;
memcpy (buffer,iv,8);
for (i=0;i+8<=data_len;i+=8)
mac_block(ctx,buffer,data+i);
......
......@@ -251,8 +251,8 @@ int gost_cipher_do_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out,
{
const unsigned char *in_ptr=in;
unsigned char *out_ptr=out;
int i=0;
int j=0;
unsigned int i=0;
unsigned int j=0;
/* process partial block if any */
if (ctx->num)
{
......@@ -313,8 +313,8 @@ static int gost_cipher_do_cnt(EVP_CIPHER_CTX *ctx, unsigned char *out,
{
const unsigned char *in_ptr=in;
unsigned char *out_ptr=out;
int i=0;
int j;
unsigned int i=0;
unsigned int j;
/* process partial block if any */
if (ctx->num)
{
......
......@@ -16,7 +16,6 @@
#include <openssl/x509.h>
#include <openssl/engine.h>
#include <openssl/ec.h>
#include <unistd.h>
#include "gost89.h"
#include "gosthash.h"
/* Control commands */
......
......@@ -185,7 +185,7 @@ int hash_block(gost_hash_ctx *ctx,const byte *block, size_t length)
if (ctx->left)
{
/*There are some bytes from previous step*/
int add_bytes = 32-ctx->left;
unsigned int add_bytes = 32-ctx->left;
if (add_bytes>length)
{
add_bytes = length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册