1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <openssl/err.h> #include <stdio.h> void print_error() { FILE *fp; //ERR_print_errors_fp(stderr); fp = fopen("/tmp/gnc.log", "a"); fprintf(fp, "ssl was %d ::\n",SSL_get_error()); ERR_print_errors_fp(fp); fclose(fp); }