Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
115933e6
Commit
115933e6
authored
Jul 01, 2014
by
Ghislain MARY
Browse files
Fix some TLS unit tests on Windows Phone 8 by giving a root ca file.
parent
a55f23f7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3916 additions
and
6 deletions
+3916
-6
build/wp8/belle-sip-tester-wp8/belle-sip-tester-native/belle-sip-tester-native.cpp
...r-wp8/belle-sip-tester-native/belle-sip-tester-native.cpp
+1
-0
build/wp8/belle-sip-tester-wp8/belle-sip-tester-wp8/Assets/rootca.pem
...lle-sip-tester-wp8/belle-sip-tester-wp8/Assets/rootca.pem
+3895
-0
build/wp8/belle-sip-tester-wp8/belle-sip-tester-wp8/belle-sip-tester-wp8.csproj
...ster-wp8/belle-sip-tester-wp8/belle-sip-tester-wp8.csproj
+3
-0
tester/belle_http_tester.c
tester/belle_http_tester.c
+2
-4
tester/belle_sip_register_tester.c
tester/belle_sip_register_tester.c
+1
-0
tester/belle_sip_tester.c
tester/belle_sip_tester.c
+12
-2
tester/belle_sip_tester.h
tester/belle_sip_tester.h
+2
-0
No files found.
build/wp8/belle-sip-tester-wp8/belle-sip-tester-native/belle-sip-tester-native.cpp
View file @
115933e6
...
...
@@ -64,6 +64,7 @@ void BelleSipTesterNative::run(Platform::String^ suiteName, Platform::String^ ca
belle_sip_set_log_handler
(
belleSipNativeOutputTraceHandler
);
CU_set_trace_handler
(
nativeOutputTraceHandler
);
belle_sip_tester_set_root_ca_path
(
"Assets/rootca.pem"
);
belle_sip_tester_run_tests
(
wssuitename
==
all
?
0
:
csuitename
,
wscasename
==
all
?
0
:
ccasename
);
}
...
...
build/wp8/belle-sip-tester-wp8/belle-sip-tester-wp8/Assets/rootca.pem
0 → 100644
View file @
115933e6
This source diff could not be displayed because it is too large. You can
view the blob
instead.
build/wp8/belle-sip-tester-wp8/belle-sip-tester-wp8/belle-sip-tester-wp8.csproj
View file @
115933e6
...
...
@@ -129,6 +129,9 @@
</Page>
</ItemGroup>
<ItemGroup>
<Content
Include=
"Assets\rootca.pem"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<None
Include=
"Properties\AppManifest.xml"
/>
<None
Include=
"Properties\WMAppManifest.xml"
>
<SubType>
Designer
</SubType>
...
...
tester/belle_http_tester.c
View file @
115933e6
...
...
@@ -22,8 +22,6 @@
#include "belle_sip_tester.h"
#include <belle_sip_internal.h>
extern
const
char
*
root_ca_path
;
typedef
struct
http_counters
{
int
response_headers_count
;
int
response_count
;
...
...
@@ -83,9 +81,9 @@ static belle_http_provider_t *prov=NULL;
static
int
http_init
(
void
){
stack
=
belle_sip_stack_new
(
NULL
);
prov
=
belle_sip_stack_create_http_provider
(
stack
,
"0.0.0.0"
);
if
(
root_ca_path
!=
NULL
)
{
if
(
belle_sip_tester_get_
root_ca_path
()
!=
NULL
)
{
belle_tls_verify_policy_t
*
policy
=
belle_tls_verify_policy_new
();
belle_tls_verify_policy_set_root_ca
(
policy
,
root_ca_path
);
belle_tls_verify_policy_set_root_ca
(
policy
,
belle_sip_tester_get_
root_ca_path
()
);
belle_http_provider_set_tls_verify_policy
(
prov
,
policy
);
}
return
0
;
...
...
tester/belle_sip_register_tester.c
View file @
115933e6
...
...
@@ -193,6 +193,7 @@ int register_init(void) {
if
(
lp
)
{
/* since test.linphone.org does not have proper certificates, don't verify anything*/
belle_sip_tls_listening_point_set_verify_exceptions
(
BELLE_SIP_TLS_LISTENING_POINT
(
lp
),
BELLE_SIP_TLS_LISTENING_POINT_BADCERT_ANY_REASON
);
belle_sip_tls_listening_point_set_root_ca
(
BELLE_SIP_TLS_LISTENING_POINT
(
lp
),
belle_sip_tester_get_root_ca_path
());
belle_sip_provider_add_listening_point
(
prov
,
lp
);
}
...
...
tester/belle_sip_tester.c
View file @
115933e6
...
...
@@ -29,8 +29,8 @@
extern
const
char
*
test_domain
;
extern
const
char
*
auth_domain
;
const
char
*
root_ca_path
=
NULL
;
static
const
char
*
belle_sip_tester_root_ca_path
=
NULL
;
static
test_suite_t
**
test_suite
=
NULL
;
static
int
nb_test_suites
=
0
;
...
...
@@ -123,7 +123,7 @@ int belle_sip_tester_ipv6_available(void){
return
ipv6_available
;
}
void
belle_sip_tester_init
(
void
)
{
void
belle_sip_tester_init
(
const
char
*
root_ca_path
)
{
belle_sip_object_enable_marshal_check
(
TRUE
);
ipv6_available
=
_belle_sip_tester_ipv6_available
();
add_test_suite
(
&
cast_test_suite
);
...
...
@@ -141,6 +141,14 @@ void belle_sip_tester_init(void) {
add_test_suite
(
&
http_test_suite
);
}
const
char
*
belle_sip_tester_get_root_ca_path
(
void
)
{
return
belle_sip_tester_root_ca_path
;
}
void
belle_sip_tester_set_root_ca_path
(
const
char
*
root_ca_path
)
{
belle_sip_tester_root_ca_path
=
root_ca_path
;
}
void
belle_sip_tester_uninit
(
void
)
{
...
...
@@ -233,6 +241,7 @@ void helper(const char *name) {
int
main
(
int
argc
,
char
*
argv
[])
{
int
i
;
int
ret
;
const
char
*
root_ca_path
=
NULL
;
const
char
*
suite_name
=
NULL
;
const
char
*
test_name
=
NULL
;
const
char
*
env_domain
=
getenv
(
"TEST_DOMAIN"
);
...
...
@@ -294,6 +303,7 @@ int main (int argc, char *argv[]) {
}
}
belle_sip_tester_set_root_ca_path
(
root_ca_path
);
ret
=
belle_sip_tester_run_tests
(
suite_name
,
test_name
);
belle_sip_tester_uninit
();
return
ret
;
...
...
tester/belle_sip_tester.h
View file @
115933e6
...
...
@@ -65,6 +65,8 @@ extern const char * belle_sip_tester_test_suite_name(int suite_index);
extern
const
char
*
belle_sip_tester_test_name
(
const
char
*
suite_name
,
int
test_index
);
extern
void
belle_sip_tester_init
(
void
);
extern
void
belle_sip_tester_uninit
(
void
);
extern
const
char
*
belle_sip_tester_get_root_ca_path
(
void
);
extern
void
belle_sip_tester_set_root_ca_path
(
const
char
*
root_ca_path
);
extern
int
belle_sip_tester_run_tests
(
const
char
*
suite_name
,
const
char
*
test_name
);
extern
const
char
*
belle_sip_tester_client_cert
;
...
...
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