curl-library
Re: Welcome to the "curl-library" mailing list
Date: Thu, 13 Aug 2015 16:37:58 +0200
Hello.
I'm making a program that would declare an array of structures like
this, to associate a name to a curl constant curl used for the
particular SSL version. But these symbols are constants enum and you
can not do it. There is a different technique? The idea would be not
to bind the control to the runtime version of curl for easy
maintenance.
Thank you in advance.
......
static struct {
const char * name;
long ssl_version;
} Sslversions [] = {
{"SSLv2" CURL_SSLVERSION_SSLv2},
{"SSLv3", CURL_SSLVERSION_TLSv1},
{"TLSv1", CURL_SSLVERSION_TLSv1},
#if CURL_SSLVERSION_TLSv1_0
{"Tlsv1.0", CURL_SSLVERSION_TLSv1_0},
#endif
#ifdef CURL_SSLVERSION_TLSv1_1
{"Tlsv1.1", CURL_SSLVERSION_TLSv1_1},
#endif
#ifdef CURL_SSLVERSION_TLSv1_2
{"Tlsv1.2", CURL_SSLVERSION_TLSv1_2},
#endif
{NULL}
};
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-08-13