summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-01-04 00:37:23 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-01-04 00:37:23 +0000
commit744ecaa5b6c024c4dfb9036e5efb65f7fec4f784 (patch)
treea81b11f6b2720586c517705b2f44fdcd8bd55d08
parent76d761ccd3dc1a8c5fb844d91a1d2bc29f0d2b13 (diff)
Avoid WIN32 signed/unsigned warnings.
-rw-r--r--engines/ccgost/gost89.c4
-rw-r--r--engines/ccgost/gost_crypt.c8
-rw-r--r--engines/ccgost/gost_lcl.h1
-rw-r--r--engines/ccgost/gosthash.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/engines/ccgost/gost89.c b/engines/ccgost/gost89.c
index c44143dca7..91a858a7bc 100644
--- a/engines/ccgost/gost89.c
+++ b/engines/ccgost/gost89.c
@@ -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);
diff --git a/engines/ccgost/gost_crypt.c b/engines/ccgost/gost_crypt.c
index a6736836c4..277921f02d 100644
--- a/engines/ccgost/gost_crypt.c
+++ b/engines/ccgost/gost_crypt.c
@@ -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)
{
diff --git a/engines/ccgost/gost_lcl.h b/engines/ccgost/gost_lcl.h
index 6a67f05123..7996db569b 100644
--- a/engines/ccgost/gost_lcl.h
+++ b/engines/ccgost/gost_lcl.h
@@ -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 */
diff --git a/engines/ccgost/gosthash.c b/engines/ccgost/gosthash.c
index 1acd16317b..de55e0c3aa 100644
--- a/engines/ccgost/gosthash.c
+++ b/engines/ccgost/gosthash.c
@@ -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;