Hello,

2014-11-18 8:27 GMT+03:00 Miod Vallat <m...@online.fr>:
>> I found the issue. In param_copy_gost01() change
>> int ret = 0;
>> to
>> int ret = 1;
>>
>> If there is no private key set in eto, param_copy_gost01() will
>> skip all ret assignments and happily return 0 (= error).
>
> Doh, of course! Sorry for introducing this bug.

Another change to the same function:

@@ -605,7 +605,7 @@ param_copy_gost01(EVP_PKEY *to, const EVP_PKEY *from)
                    GOST_R_KEY_PARAMETERS_MISSING);
                return 0;
        }
-       if (eto) {
+       if (eto == NULL) {
                eto = GOST_KEY_new();
                if (eto == NULL) {
                        GOSTerr(GOST_F_PARAM_COPY_GOST01,


-- 
With best wishes
Dmitry

Reply via email to