mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-19 19:33:38 +08:00
Fix bugs
This commit is contained in:
@@ -152,7 +152,7 @@ int sdfdigest_main(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
infile = *(++argv);
|
||||
if (!(infp = fopen(infile, "rb"))) {
|
||||
fprintf(stderr, "gmssl%s: open '%s' failure : %s\n", prog, infile, strerror(errno));
|
||||
fprintf(stderr, "gmssl %s: open '%s' failure : %s\n", prog, infile, strerror(errno));
|
||||
goto end;
|
||||
}
|
||||
} else if (!strcmp(*argv, "-out")) {
|
||||
@@ -236,6 +236,10 @@ bad:
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
if (ferror(infp)) {
|
||||
fprintf(stderr, "%s: read failure\n", prog);
|
||||
goto end;
|
||||
}
|
||||
memset(buf, 0, sizeof(buf));
|
||||
}
|
||||
if (sdf_digest_finish(&ctx, dgst) != 1) {
|
||||
|
||||
Reference in New Issue
Block a user