X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_ec_sign.c;h=03a2ba09da25079700ebdc69b3de3cf846282bd5;hb=d21d11ec8e5b8eb62dbe0d802a3c9bcee2d83159;hp=904b80c6b22512b185280757e1cb5dcfd9d31b80;hpb=18383fe5a0b32b22fb70e16177406ac777a98453;p=openssl-gost%2Fengine.git diff --git a/gost_ec_sign.c b/gost_ec_sign.c index 904b80c..03a2ba0 100644 --- a/gost_ec_sign.c +++ b/gost_ec_sign.c @@ -161,7 +161,7 @@ DSA_SIG *gost_ec_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) BIGNUM *r = NULL, *s = NULL, *X = NULL, *tmp = NULL, *tmp2 = NULL, *k = NULL, *e = NULL; - const BIGNUM *new_r = NULL, *new_s = NULL; + BIGNUM *new_r = NULL, *new_s = NULL; EC_POINT *C = NULL; BN_CTX *ctx; @@ -276,13 +276,13 @@ DSA_SIG *gost_ec_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) } while (BN_is_zero(s)); - DSA_SIG_get0(newsig, &new_r, &new_s); new_s = BN_dup(s); new_r = BN_dup(r); if (!new_s || !new_r) { GOSTerr(GOST_F_GOST_EC_SIGN, ERR_R_MALLOC_FAILURE); goto err; } + DSA_SIG_set0(newsig, new_r, new_s); ret = newsig; err: