summaryrefslogtreecommitdiffstats
path: root/engines/ccgost/gost_keywrap.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2008-01-05 21:28:53 +0000
committerAndy Polyakov <appro@openssl.org>2008-01-05 21:28:53 +0000
commit085ea803714f148b160499d289616af4c16fa089 (patch)
tree69f30f4f267794fc45fd30b0b8b6d4ef6d7fad91 /engines/ccgost/gost_keywrap.c
parentab0ff062052bc43085a78b4d4380803f752fe92b (diff)
engine/ccgost Win32 portability fixes.
Diffstat (limited to 'engines/ccgost/gost_keywrap.c')
-rw-r--r--engines/ccgost/gost_keywrap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/ccgost/gost_keywrap.c b/engines/ccgost/gost_keywrap.c
index 014499077f..c618f6da28 100644
--- a/engines/ccgost/gost_keywrap.c
+++ b/engines/ccgost/gost_keywrap.c
@@ -44,8 +44,14 @@ void keyDiversifyCryptoPro(gost_ctx *ctx,const unsigned char *inputKey, const un
s2+=k;
}
}
- S[0]=s1&0xff; S[1]=(s1>>8)&0xff; S[2]=(s1>>16)&0xff; S[3]=(s1>>24)&0xff;
- S[4]=s2&0xff; S[5]=(s2>>8)&0xff; S[6]=(s2>>16)&0xff; S[7]=(s2>>24)&0xff;
+ S[0]=(unsigned char)(s1&0xff);
+ S[1]=(unsigned char)((s1>>8)&0xff);
+ S[2]=(unsigned char)((s1>>16)&0xff);
+ S[3]=(unsigned char)((s1>>24)&0xff);
+ S[4]=(unsigned char)(s2&0xff);
+ S[5]=(unsigned char)((s2>>8)&0xff);
+ S[6]=(unsigned char)((s2>>16)&0xff);
+ S[7]=(unsigned char)((s2>>24)&0xff);
gost_key(ctx,outputKey);
gost_enc_cfb(ctx,S,outputKey,outputKey,4);
}