From 13345aa5fc70d647a94d388d7a7b157349dd39a7 Mon Sep 17 00:00:00 2001 From: Norbert Moutarde Date: Mon, 29 Jul 2013 23:01:18 +0200 Subject: [PATCH] I can't remember ... --- sqldb.cpp | 27 ++++++++++++++++++++------- sqldb.h | 7 +++++-- tables1.sql | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/sqldb.cpp b/sqldb.cpp index 922bde0..b4bde20 100644 --- a/sqldb.cpp +++ b/sqldb.cpp @@ -11,13 +11,11 @@ using namespace std; sqlpg::sqlpg() { - /* Load the human readable error strings for libcrypto */ - ERR_load_crypto_strings(); - /* Load all digest and cipher algorithms */ + //src : http://www.ibm.com/developerworks/linux/library/l-openssl/index.html + SSL_load_error_strings(); + ERR_load_BIO_strings(); OpenSSL_add_all_algorithms(); - /* Load config file, and other important initialisation */ - OPENSSL_config(NULL); - EVP_PKEY *EVP_PKEY_new(void); + SSL_library_init(); //strconnect = "host=postgresql1.alwaysdata.com port=5432 dbname=nothing2do.eu_diary user=nothing2do.eu password=x connect_timeout=10"; strconnect = "dbname=bob user=bob password=pass connect_timeout=10"; @@ -354,7 +352,7 @@ void sqlpg::getvar(){ }; clog<<"value.size="< #include #include -#include -#include +/*#include +#include */ #include #include #include @@ -35,6 +35,9 @@ public: void connect(std::string, std::string);//connect with user and service (credential in database) private: + BIO * bio; + SSL * ssl; + SSL_CTX * ctx; PGconn *conn; PGresult *res, *res2, *res3; std::vector < std::vector > ret;//useless ? diff --git a/tables1.sql b/tables1.sql index af9f260..f4441b0 100755 --- a/tables1.sql +++ b/tables1.sql @@ -52,5 +52,5 @@ name text, proto text, port integer, server text, -cmd text, +cmd text ); -- 2.45.1