Avoid WIN32 signed/unsigned warnings.

This commit is contained in:
Dr. Stephen Henson 2008-01-04 00:37:23 +00:00
parent 76d761ccd3
commit 744ecaa5b6
4 changed files with 7 additions and 8 deletions

View file

@ -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);

View file

@ -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)
{

View file

@ -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 */

View file

@ -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;