mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-09 23:43:41 +08:00
jni api
This commit is contained in:
@@ -211,7 +211,6 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
|
||||
type = ctx->digest;
|
||||
}
|
||||
#endif
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
if (ctx->digest != type) {
|
||||
if (ctx->digest && ctx->digest->ctx_size)
|
||||
OPENSSL_free(ctx->md_data);
|
||||
@@ -220,7 +219,6 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
|
||||
ctx->update = type->update;
|
||||
ctx->md_data = OPENSSL_malloc(type->ctx_size);
|
||||
if (ctx->md_data == NULL) {
|
||||
fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
EVPerr(EVP_F_EVP_DIGESTINIT_EX, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
@@ -231,7 +229,6 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
|
||||
#endif
|
||||
if (ctx->pctx) {
|
||||
int r;
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
r = EVP_PKEY_CTX_ctrl(ctx->pctx, -1, EVP_PKEY_OP_TYPE_SIG,
|
||||
EVP_PKEY_CTRL_DIGESTINIT, 0, ctx);
|
||||
if (r <= 0 && (r != -2))
|
||||
@@ -248,7 +245,6 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
//fprintf(stderr, "%s %d\n", __FILE__, __LINE__);
|
||||
return ctx->digest->init(ctx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user