[ Full content available at: https://github.com/apache/trafficserver/pull/4040 ]
If you're willing to do a bit of meta programming, I have a header file with
which you could do this
```
namespace
{
template <typename T>
auto
TS_SSL_CTX_set1_groups_list(T *, char *, ts::meta::CaseArg_0) -> bool
{
return true;
}
template <typename T>
auto
TS_SSL_CTX_set1_groups_list(T *ctx, char *groups, ts::meta::CaseArg_1)
-> decltype(SSL_CTX_set1_groups_list(static_cast<T *>(nullptr),
static_cast<char*>(nullptr)), bool())
{
if (!SSL_CTX_set1_groups_list(ctx, groups)) {
SSLError("invalid groups list for client in records.config");
return false;
}
return true;
}
} // namespace
bool
TS_SSL_CTX_set1_groups_list(SSL_CTX *ctx, char *params)
{
return TS_SSL_CTX_set1_groups_list(ctx, params, ts::meta::CaseArg);
}
```
At the original call site, it's
```
if (params->client_groups_list != nullptr) {
if (!TS_SSL_CTX_set1_groups_list(client_ctx, params->client_groups_list)) {
SSLError("invalid groups list for client in records.config");
goto fail;
}
}
```
This doesn't depend on any `#define` or checking in `configure.ac`, it's
completely self contained. It doesn't depend on knowing the openSSL version,
and should work on BoringSSL. In fact, if BoringSSL has a functionally
equivalent but differently named function, that could be easily incorporated.
(This message was relayed via gitbox.apache.org for [email protected])