Update Public API

This commit is contained in:
Zhi Guan
2022-05-23 09:42:08 +08:00
parent 252839e196
commit d7a96e3ba1
25 changed files with 1361 additions and 856 deletions

View File

@@ -118,10 +118,14 @@ bad:
argv++;
}
if (!mpkfile || !id) {
if (!mpkfp || !id) {
error_print();
goto end;
}
if (sm9_enc_master_public_key_from_pem(&mpk, mpkfp) != 1) {
error_print();
return -1;
}
if ((inlen = fread(inbuf, 1, sizeof(inbuf), infp)) <= 0) {
error_print();
goto end;
@@ -138,5 +142,6 @@ bad:
end:
if (infile && infp) fclose(infp);
if (outfile && outfp) fclose(outfp);
if (mpkfp) fclose(mpkfp);
return ret;
}