use OPENSSL_NO_DYNAMIC_ENGINE macro, disable debug messages
PR: 1440 Submitted by: Victor B. Wagner" <vitus@cryptocom.ru>
This commit is contained in:
parent
fec38ca4ed
commit
afda1385bd
@ -141,10 +141,10 @@ static int bind_gost (ENGINE *e,const char *id)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENGINE_DYNAMIC_SUPPORT
|
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||||
IMPLEMENT_DYNAMIC_BIND_FN(bind_gost)
|
IMPLEMENT_DYNAMIC_BIND_FN(bind_gost)
|
||||||
IMPLEMENT_DYNAMIC_CHECK_FN()
|
IMPLEMENT_DYNAMIC_CHECK_FN()
|
||||||
#endif /* def ENGINE_DYNAMIC_SUPPORT */
|
#endif /* ndef OPENSSL_NO_DYNAMIC_ENGINE */
|
||||||
|
|
||||||
static int gost_digests(ENGINE *e, const EVP_MD **digest,
|
static int gost_digests(ENGINE *e, const EVP_MD **digest,
|
||||||
const int **nids, int nid)
|
const int **nids, int nid)
|
||||||
|
@ -446,11 +446,13 @@ static int pkey_gost01_cc_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig,
|
|||||||
int ok = 0;
|
int ok = 0;
|
||||||
EVP_PKEY* pub_key = EVP_PKEY_CTX_get0_pkey(ctx);
|
EVP_PKEY* pub_key = EVP_PKEY_CTX_get0_pkey(ctx);
|
||||||
DSA_SIG *s=unpack_cc_signature(sig,siglen);
|
DSA_SIG *s=unpack_cc_signature(sig,siglen);
|
||||||
|
#ifdef DEBUG_SIGN
|
||||||
fprintf(stderr,"R=");
|
fprintf(stderr,"R=");
|
||||||
BN_print_fp(stderr,s->r);
|
BN_print_fp(stderr,s->r);
|
||||||
fprintf(stderr,"\nS=");
|
fprintf(stderr,"\nS=");
|
||||||
BN_print_fp(stderr,s->s);
|
BN_print_fp(stderr,s->s);
|
||||||
fprintf(stderr,"\n");
|
fprintf(stderr,"\n");
|
||||||
|
#endif
|
||||||
if (!s) return 0;
|
if (!s) return 0;
|
||||||
if (pub_key) ok = gost2001_do_verify(tbs,tbs_len,s,EVP_PKEY_get0(pub_key));
|
if (pub_key) ok = gost2001_do_verify(tbs,tbs_len,s,EVP_PKEY_get0(pub_key));
|
||||||
DSA_SIG_free(s);
|
DSA_SIG_free(s);
|
||||||
@ -464,11 +466,13 @@ static int pkey_gost01_cp_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig,
|
|||||||
EVP_PKEY* pub_key = EVP_PKEY_CTX_get0_pkey(ctx);
|
EVP_PKEY* pub_key = EVP_PKEY_CTX_get0_pkey(ctx);
|
||||||
DSA_SIG *s=unpack_cp_signature(sig,siglen);
|
DSA_SIG *s=unpack_cp_signature(sig,siglen);
|
||||||
if (!s) return 0;
|
if (!s) return 0;
|
||||||
|
#ifdef DEBUG_SIGN
|
||||||
fprintf(stderr,"R=");
|
fprintf(stderr,"R=");
|
||||||
BN_print_fp(stderr,s->r);
|
BN_print_fp(stderr,s->r);
|
||||||
fprintf(stderr,"\nS=");
|
fprintf(stderr,"\nS=");
|
||||||
BN_print_fp(stderr,s->s);
|
BN_print_fp(stderr,s->s);
|
||||||
fprintf(stderr,"\n");
|
fprintf(stderr,"\n");
|
||||||
|
#endif
|
||||||
if (pub_key) ok = gost2001_do_verify(tbs,tbs_len,s,EVP_PKEY_get0(pub_key));
|
if (pub_key) ok = gost2001_do_verify(tbs,tbs_len,s,EVP_PKEY_get0(pub_key));
|
||||||
DSA_SIG_free(s);
|
DSA_SIG_free(s);
|
||||||
return ok;
|
return ok;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user