Update CPK sub-lib

Use simple NID as arguments, and fix some bugs
This commit is contained in:
Zhi Guan
2018-10-21 19:43:40 +08:00
parent ce1763c9ea
commit 9eadfd4cb6
19 changed files with 5849 additions and 5740 deletions

View File

@@ -52,6 +52,8 @@
#include <libgen.h>
#include <openssl/cpk.h>
#include <openssl/pem.h>
#include <openssl/sm2.h>
#include <openssl/is_gmssl.h>
int main(int argc, char **argv)
{
@@ -100,6 +102,10 @@ int main(int argc, char **argv)
ERR_print_errors_fp(stderr);
goto end;
}
if (!EVP_PKEY_CTX_set_ec_scheme(pctx, NID_sm_scheme)) {
ERR_print_errors_fp(stderr);
goto end;
}
while ((len = BIO_read(in_bio, buf, sizeof(buf))) > 0) {
if (!EVP_DigestSignUpdate(md_ctx, buf, len)) {
ERR_print_errors_fp(stderr);