mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-11 00:13:55 +08:00
Update CPK sub-lib
Use simple NID as arguments, and fix some bugs
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user