I am trying to connect MySQL through C code on SSL. I have written like:
MYSQL *mysql_conn(connection_info *conn_info)
printf("FAILED\n[-] init mysql failed:%s\n",mysql_error(connect));
#ifdef HAVE_OPENSSL // IFDEF CONDITION
int in = mysql_ssl_set(connect,"certs/client-key.pem",
"certs/ca-cert.pem", 0, 0);
// printf("%d\n", in);
/* Connect to database */
printf("FAILED\n[-] Error: %s\n",mysql_error(connect));
It's giving error on "IFDEF CONDITION". When I remove this condition, code is working fine. However, it has suggested in tutorial that I should use that IFDEF CONDITION.
What is the problem with that condition, which approach would be better for me, I don't have have idea about that.
Please provide some solution for this problem.