From dabc496a2b86869b3e559a87efdd74af108a31f5 Mon Sep 17 00:00:00 2001 From: Gabriele Contini <contini.mailing@gmail.com> Date: 周六, 23 11月 2019 22:48:18 +0800 Subject: [PATCH] signature verified, tests --- src/library/os/os.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/library/os/os.c b/src/library/os/os.c index 802a46d..ed602ac 100644 --- a/src/library/os/os.c +++ b/src/library/os/os.c @@ -6,7 +6,7 @@ #ifdef __linux__ #include <openssl/pem.h> - +/* static void free_resources(EVP_PKEY* pkey, EVP_MD_CTX* mdctx) { if (pkey) { EVP_PKEY_free(pkey); @@ -14,8 +14,8 @@ if (mdctx) { EVP_MD_CTX_destroy(mdctx); } -} - +}*/ +/* FUNCTION_RETURN verifySignature(const char* stringToVerify, const char* signatureB64) { EVP_MD_CTX *mdctx = NULL; @@ -37,7 +37,7 @@ RSA *key = 0; PEM_read_bio_RSAPublicKey(bo, &key, 0, 0); BIO_free(bo);*/ - +/* //RSA* rsa = EVP_PKEY_get1_RSA( key ); //RSA * pubKey = d2i_RSA_PUBKEY(NULL, <der encoded byte stream pointer>, <num bytes>); unsigned char buffer[512]; @@ -52,7 +52,6 @@ BIO_free_all(biosig); - /* Create the Message Digest Context */ if (!(mdctx = EVP_MD_CTX_create())) { free_resources(pkey, mdctx); LOG_ERROR("Error creating context"); @@ -79,7 +78,7 @@ free_resources(pkey, mdctx); return result; -} +}*/ #else -- Gitblit v1.9.1