Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marvin Scholz
Icecast-Server
Commits
68b3b1c7
Commit
68b3b1c7
authored
May 18, 2017
by
Philipp Schafft
🦁
Browse files
Feature: Added function to check for specific TLS implementation
parent
9cbc110f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tls.c
View file @
68b3b1c7
...
...
@@ -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
;
...
...
src/tls.h
View file @
68b3b1c7
...
...
@@ -25,6 +25,9 @@
typedef
struct
tls_ctx_tag
tls_ctx_t
;
typedef
struct
tls_tag
tls_t
;
/* Check for a specific implementation. Returns 0 if supported, 1 if unsupported and -1 on error. */
int
tls_check_impl
(
const
char
*
impl
);
void
tls_initialize
(
void
);
void
tls_shutdown
(
void
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment