diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2016-12-12 16:47:46 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2016-12-12 16:47:46 +0300 |
commit | d21d11ec8e5b8eb62dbe0d802a3c9bcee2d83159 (patch) | |
tree | 636ea699d82c06abdbab3283ea880a820e632967 | |
parent | 18383fe5a0b32b22fb70e16177406ac777a98453 (diff) | |
download | gost-engine-d21d11ec8e5b8eb62dbe0d802a3c9bcee2d83159.zip gost-engine-d21d11ec8e5b8eb62dbe0d802a3c9bcee2d83159.tar.gz gost-engine-d21d11ec8e5b8eb62dbe0d802a3c9bcee2d83159.tar.bz2 |
Fix signature processing
-rw-r--r-- | gost_ec_sign.c | 4 |
1 files changed, 2 insertions, 2 deletions
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: |