gcontini
2019-11-30 8f01d6c808cb61d2186fdfb802ecf35ee8db8065
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,12 +14,12 @@
   if (mdctx) {
      EVP_MD_CTX_destroy(mdctx);
   }
}
}*/
/*
FUNCTION_RETURN verifySignature(const char* stringToVerify,
      const char* signatureB64) {
   EVP_MD_CTX *mdctx = NULL;
   const char *pubKey = PUBLIC_KEY;
   const char pubKey[] = PUBLIC_KEY;
   int func_ret = 0;
   BIO* bio = BIO_new_mem_buf((void*) (pubKey), strlen(pubKey));
@@ -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