mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-10 16:03:48 +08:00
fast SMS4 with Intel AVX2/KNC-NI
This commit is contained in:
@@ -87,8 +87,6 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
}
|
||||
}
|
||||
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
|
||||
if (ver) {
|
||||
if (ctx->pctx->pmeth->verifyctx_init) {
|
||||
if (ctx->pctx->pmeth->verifyctx_init(ctx->pctx, ctx) <= 0)
|
||||
@@ -98,22 +96,21 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
return 0;
|
||||
} else {
|
||||
if (ctx->pctx->pmeth->signctx_init) {
|
||||
if (ctx->pctx->pmeth->signctx_init(ctx->pctx, ctx) <= 0)
|
||||
if (ctx->pctx->pmeth->signctx_init(ctx->pctx, ctx) <= 0) {
|
||||
fprintf(stderr, "error %s %d\n", __FILE__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
ctx->pctx->operation = EVP_PKEY_OP_SIGNCTX;
|
||||
} else if (EVP_PKEY_sign_init(ctx->pctx) <= 0)
|
||||
return 0;
|
||||
}
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
|
||||
if (EVP_PKEY_CTX_set_signature_md(ctx->pctx, type) <= 0)
|
||||
return 0;
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
if (pctx)
|
||||
*pctx = ctx->pctx;
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
if (ctx->pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM)
|
||||
return 1;
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
if (!EVP_DigestInit_ex(ctx, type, e))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user