mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-29 01:03:38 +08:00
Update API
如果类型内部没有动态内存申请或外部Handle引用,不提供cleanup接口,仅用通用secure clear
This commit is contained in:
@@ -82,6 +82,7 @@ int sdfdigest_main(int argc, char **argv)
|
||||
uint8_t dgst[32];
|
||||
int i;
|
||||
|
||||
memset(&dev, 0, sizeof(dev));
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
|
||||
argc--;
|
||||
@@ -261,6 +262,7 @@ bad:
|
||||
ret = 0;
|
||||
end:
|
||||
(void)sdf_digest_cleanup(&ctx);
|
||||
(void)sdf_close_device(&dev);
|
||||
if (pubkeyfp) fclose(pubkeyfp);
|
||||
if (infile && infp) fclose(infp);
|
||||
if (outfile && outfp) fclose(outfp);
|
||||
|
||||
Reference in New Issue
Block a user