mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
ios: enable TLS support
This commit is contained in:
parent
eb6e99ba5f
commit
44466fb57f
5 changed files with 24 additions and 9 deletions
|
|
@ -364,6 +364,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
else {
|
||||
linphone_core_disable_logs();
|
||||
}
|
||||
|
||||
NSBundle* myBundle = [NSBundle mainBundle];
|
||||
|
||||
const char* lRootCa = [[myBundle pathForResource:@"rootca"ofType:@"pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
|
||||
linphone_core_set_root_ca(theLinphoneCore, lRootCa);
|
||||
|
||||
NSString* transport = [[NSUserDefaults standardUserDefaults] stringForKey:@"transport_preference"];
|
||||
|
||||
|
||||
|
|
@ -376,9 +382,15 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
if ([transport isEqualToString:@"tcp"]) {
|
||||
if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port;
|
||||
transportValue.udp_port=0;
|
||||
transportValue.tls_port=0;
|
||||
} else if ([transport isEqualToString:@"udp"]){
|
||||
if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port;
|
||||
transportValue.tcp_port=0;
|
||||
transportValue.tls_port=0;
|
||||
} else if ([transport isEqualToString:@"tls"]){
|
||||
if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port;
|
||||
transportValue.tcp_port=0;
|
||||
transportValue.udp_port=0;
|
||||
} else {
|
||||
ms_error("unexpected trasnport [%s]",[transport cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
}
|
||||
|
|
@ -387,17 +399,14 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Set audio assets
|
||||
NSBundle* myBundle = [NSBundle mainBundle];
|
||||
const char* lRing = [[myBundle pathForResource:@"oldphone-mono"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
|
||||
linphone_core_set_ring(theLinphoneCore, lRing );
|
||||
const char* lRingBack = [[myBundle pathForResource:@"ringback"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
|
||||
linphone_core_set_ringback(theLinphoneCore, lRingBack);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//configure sip account
|
||||
|
|
@ -435,7 +444,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
//possible valid config detected
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
proxyCfg = linphone_proxy_config_new();
|
||||
|
||||
|
||||
// add username password
|
||||
LinphoneAddress *from = linphone_address_new(identity);
|
||||
LinphoneAuthInfo *info;
|
||||
|
|
|
|||
|
|
@ -213,6 +213,7 @@
|
|||
<array>
|
||||
<string>udp</string>
|
||||
<string>tcp</string>
|
||||
<string>tls</string>
|
||||
</array>
|
||||
<key>Type</key>
|
||||
<string>PSMultiValueSpecifier</string>
|
||||
|
|
@ -220,6 +221,7 @@
|
|||
<array>
|
||||
<string>udp</string>
|
||||
<string>tcp</string>
|
||||
<string>tls</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; };
|
||||
22F51EF6107FA66500F98953 /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; };
|
||||
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
|
||||
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
|
@ -394,6 +395,7 @@
|
|||
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = "<group>"; };
|
||||
70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* linphone-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "linphone-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
|
@ -833,6 +835,7 @@
|
|||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
70571E1913FABCB000CDD3C2 /* rootca.pem */,
|
||||
22E19E47138A67A000FBFE87 /* missed_call.png */,
|
||||
228B19AE130290C500F154D3 /* iTunesArtwork */,
|
||||
2242E312125235120061DDCE /* oldphone-mono-30s.caf */,
|
||||
|
|
@ -970,6 +973,7 @@
|
|||
228B19AF130290C500F154D3 /* iTunesArtwork in Resources */,
|
||||
2214783D1386A2030020F8B8 /* Localizable.strings in Resources */,
|
||||
22E19E48138A67A000FBFE87 /* missed_call.png in Resources */,
|
||||
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
2
submodules/externals/exosip
vendored
2
submodules/externals/exosip
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 361a5cfe25a31d503b0d9e46960d6908c6672aad
|
||||
Subproject commit ce927e6b891a9d9129ab50d0666f6f22f37228a1
|
||||
2
submodules/externals/osip
vendored
2
submodules/externals/osip
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 5a3da085ca1dcf82a852cee1e191cab0b98ff1f1
|
||||
Subproject commit 7dbd4b443eed178480b76498173e7bffc7e73d00
|
||||
Loading…
Add table
Reference in a new issue