mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-19 19:33:38 +08:00
Fix bugs
This commit is contained in:
@@ -231,6 +231,10 @@ bad:
|
||||
while ((len = fread(buf, 1, sizeof(buf), infp)) > 0) {
|
||||
sm3_update(&sm3_ctx, buf, len);
|
||||
}
|
||||
if (ferror(infp)) {
|
||||
fprintf(stderr, "%s: read failure\n", prog);
|
||||
goto end;
|
||||
}
|
||||
sm3_finish(&sm3_ctx, dgst);
|
||||
|
||||
if ((ret = skf_sign(&key, dgst, sig, &siglen)) != 1) {
|
||||
|
||||
Reference in New Issue
Block a user