Fix error check in GOST engine
authorMatt Caswell <matt@openssl.org>
Mon, 25 May 2015 23:02:57 +0000 (00:02 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 26 May 2015 09:35:22 +0000 (10:35 +0100)
commit90e7cdff3aa66779486914f88333f6601f0c1cf4
treeec2d83d8b1db1f5d0085854a16d13edbe12783a3
parentfc52ac9028b9492fb086ba35a3352ea46e03ecfc
Fix error check in GOST engine

The return value of i2d functions can be negative if an error occurs.
Therefore don't assign the return value to an unsigned type and *then*
check if it is negative.

RT#3862

Reviewed-by: Richard Levitte <levitte@openssl.org>
engines/ccgost/gost94_keyx.c