summaryrefslogtreecommitdiff
path: root/lib/libcrypto/gost/gostr341001_pmeth.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-11-09 19:28:45 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-11-09 19:28:45 +0000
commitdf8300e3cb1490b00adf5f29568ceb024c778864 (patch)
treee9ff8c0ae1bd50c16b7960f2256a68f3cd626a39 /lib/libcrypto/gost/gostr341001_pmeth.c
parentc38d721255c0219e78c885aca72fd25005cd90e9 (diff)
Remove DEBUG_SIGN code. Make sure gost_key_unwrap_crypto_pro() returns failure
instead of a printf and a success return, when the operation fails.
Diffstat (limited to 'lib/libcrypto/gost/gostr341001_pmeth.c')
-rw-r--r--lib/libcrypto/gost/gostr341001_pmeth.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/libcrypto/gost/gostr341001_pmeth.c b/lib/libcrypto/gost/gostr341001_pmeth.c
index c7001fc1fa0..77a84a36572 100644
--- a/lib/libcrypto/gost/gostr341001_pmeth.c
+++ b/lib/libcrypto/gost/gostr341001_pmeth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gostr341001_pmeth.c,v 1.3 2014/11/09 19:27:29 miod Exp $ */
+/* $OpenBSD: gostr341001_pmeth.c,v 1.4 2014/11/09 19:28:44 miod Exp $ */
/*
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* Copyright (c) 2005-2006 Cryptocom LTD
@@ -235,13 +235,6 @@ static int pkey_gost01_sign(EVP_PKEY_CTX * ctx, unsigned char *sig,
OPENSSL_assert(tbs_len == 32 || tbs_len == 64);
md = GOST_le2bn(tbs, tbs_len, NULL);
unpacked_sig = gost2001_do_sign(md, pkey->pkey.gost);
-#ifdef DEBUG_SIGN
- fprintf(stderr, "S.R=");
- BN_print_fp(stderr, unpacked_sig->r);
- fprintf(stderr, "\nS.S=");
- BN_print_fp(stderr, unpacked_sig->s);
- fprintf(stderr, "\n");
-#endif
if (!unpacked_sig) {
return 0;
}
@@ -281,13 +274,6 @@ static int pkey_gost01_verify(EVP_PKEY_CTX * ctx, const unsigned char *sig,
md = GOST_le2bn(tbs, tbs_len, NULL);
if (!md)
goto err;
-#ifdef DEBUG_SIGN
- fprintf(stderr, "V.R=");
- BN_print_fp(stderr, s->r);
- fprintf(stderr, "\nV.S=");
- BN_print_fp(stderr, s->s);
- fprintf(stderr, "\n");
-#endif
ok = gost2001_do_verify(md, s, pub_key->pkey.gost);
err: