Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
belle-sip
Commits
50da7866
Commit
50da7866
authored
Nov 30, 2013
by
Simon Morlat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add method to know if tls support is available
parent
e319dc86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
include/belle-sip/sipstack.h
include/belle-sip/sipstack.h
+6
-0
src/listeningpoint_internal.h
src/listeningpoint_internal.h
+2
-3
src/sipstack.c
src/sipstack.c
+4
-0
src/transports/tls_listeningpoint_polarssl.c
src/transports/tls_listeningpoint_polarssl.c
+8
-0
No files found.
include/belle-sip/sipstack.h
View file @
50da7866
...
...
@@ -110,6 +110,12 @@ BELLESIP_EXPORT void belle_sip_stack_set_default_dscp(belle_sip_stack_t *stack,
**/
BELLESIP_EXPORT
int
belle_sip_stack_get_default_dscp
(
belle_sip_stack_t
*
stack
);
/**
* Returns TRUE if TLS support has been compiled into, FALSE otherwise.
**/
BELLESIP_EXPORT
int
belle_sip_stack_tls_available
(
belle_sip_stack_t
*
stack
);
BELLE_SIP_END_DECLS
#endif
...
...
src/listeningpoint_internal.h
View file @
50da7866
...
...
@@ -85,13 +85,12 @@ belle_sip_listening_point_t * belle_sip_stream_listening_point_new(belle_sip_sta
struct
belle_sip_tls_listening_point
{
belle_sip_stream_listening_point_t
base
;
#ifdef HAVE_OPENSSL
SSL_CTX
*
ssl_context
;
#endif
char
*
root_ca
;
int
verify_exceptions
;
};
int
belle_sip_tls_listening_point_available
(
void
);
BELLE_SIP_DECLARE_CUSTOM_VPTR_BEGIN
(
belle_sip_tls_listening_point_t
,
belle_sip_listening_point_t
)
BELLE_SIP_DECLARE_CUSTOM_VPTR_END
#define BELLE_SIP_TLS_LISTENING_POINT(obj) BELLE_SIP_CAST(obj,belle_sip_tls_listening_point_t)
...
...
src/sipstack.c
View file @
50da7866
...
...
@@ -212,3 +212,7 @@ int belle_sip_stack_get_default_dscp(belle_sip_stack_t *stack){
return
stack
->
dscp
;
}
int
belle_sip_stack_tls_available
(
belle_sip_stack_t
*
stack
){
return
belle_sip_tls_listening_point_available
();
}
src/transports/tls_listeningpoint_polarssl.c
View file @
50da7866
...
...
@@ -101,6 +101,10 @@ int belle_sip_tls_listening_point_set_verify_exceptions(belle_sip_tls_listening_
return
0
;
}
int
belle_sip_tls_listening_point_available
(
void
){
return
TRUE
;
}
#else
belle_sip_listening_point_t
*
belle_sip_tls_listening_point_new
(
belle_sip_stack_t
*
s
,
const
char
*
ipaddress
,
int
port
){
...
...
@@ -115,5 +119,9 @@ int belle_sip_tls_listening_point_set_verify_exceptions(belle_sip_tls_listening_
return
-
1
;
}
int
belle_sip_tls_listening_point_available
(
void
){
return
FALSE
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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