mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Feature: Added function to check for specific TLS implementation
This commit is contained in:
parent
9cbc110f78
commit
68b3b1c72a
16
src/tls.c
16
src/tls.c
@ -15,12 +15,28 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "tls.h"
|
||||
|
||||
#include "logging.h"
|
||||
#define CATMODULE "tls"
|
||||
|
||||
/* Check for a specific implementation. Returns 0 if supported, 1 if unsupported and -1 on error. */
|
||||
int tls_check_impl(const char *impl)
|
||||
{
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (!strcasecmp(impl, "openssl"))
|
||||
return 0;
|
||||
#endif
|
||||
#ifdef ICECAST_CAP_TLS
|
||||
if (!strcasecmp(impl, "generic"))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
struct tls_ctx_tag {
|
||||
size_t refc;
|
||||
|
Loading…
Reference in New Issue
Block a user