enable SRTP DTLS

[Switch submodule branch] for polarssl
This commit is contained in:
Jehan Monnier 2015-02-20 18:24:45 +01:00
parent b313bfc0ef
commit 2be1b5e6c1
9 changed files with 23 additions and 7 deletions

View file

@ -200,7 +200,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
switch(menc){
case LinphoneMediaEncryptionSRTP: val="SRTP"; break;
case LinphoneMediaEncryptionZRTP: val="ZRTP"; break;
default: val="None"; break;
case LinphoneMediaEncryptionDTLS: val="DTLS"; break;
case LinphoneMediaEncryptionNone: val="None"; break;
}
[self setString:val forKey:@"media_encryption_preference"];
}
@ -573,6 +574,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionSRTP);
else if (menc && [menc compare:@"ZRTP"] == NSOrderedSame)
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionZRTP);
else if (menc && [menc compare:@"DTLS"] == NSOrderedSame)
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionDTLS);
else
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionNone);

View file

@ -1477,7 +1477,8 @@ static BOOL libStarted = FALSE;
/* set the CA file no matter what, since the remote provisioning could be hitting an HTTPS server */
const char* lRootCa = [[LinphoneManager bundleFile:@"rootca.pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_root_ca(theLinphoneCore, lRootCa);
linphone_core_set_user_certificates_path(theLinphoneCore,[[LinphoneManager cacheDirectory] UTF8String]);
/* The core will call the linphone_iphone_configuring_status_changed callback when the remote provisioning is loaded (or skipped).
Wait for this to finish the code configuration */

View file

@ -564,6 +564,14 @@ static UICompositeViewDescription *compositeDescription = nil;
[values removeObject:@"SRTP"];
[dict setObject:values forKey:@"Values"];
}
if(!linphone_core_media_encryption_supported([LinphoneManager getLc], LinphoneMediaEncryptionDTLS)) {
NSMutableArray *titles = [NSMutableArray arrayWithArray:[dict objectForKey:@"Titles"]];
[titles removeObject:@"DTLS"];
[dict setObject:titles forKey:@"Titles"];
NSMutableArray *values = [NSMutableArray arrayWithArray:[dict objectForKey:@"Values"]];
[values removeObject:@"DTLS"];
[dict setObject:values forKey:@"Values"];
}
return [[[IASKSpecifier alloc] initWithSpecifier:dict] autorelease];
}

View file

@ -124,6 +124,7 @@
<string>None</string>
<string>SRTP</string>
<string>ZRTP</string>
<string>DTLS</string>
</array>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
@ -132,6 +133,7 @@
<string>None</string>
<string>SRTP</string>
<string>ZRTP</string>
<string>DTLS</string>
</array>
</dict>
<dict>

@ -1 +1 @@
Subproject commit eed16af0014ba89fec25b4351f06f60297600381
Subproject commit e5e0590db8917ccbf5631ec42022bb9f8e03b064

View file

@ -38,7 +38,9 @@ linphone_configure_controls = \
--disable-x11 \
--disable-tutorials \
--disable-tools \
--enable-msg-storage=yes
--enable-msg-storage=yes \
--with-polarssl=$(prefix) \
--enable-dtls
#path

@ -1 +1 @@
Subproject commit e46939b25c990d825d94c2d526c350a1380db67f
Subproject commit ab2f403a3e0ec91257f0e943129c0eec272f34e8

@ -1 +1 @@
Subproject commit 229f662b9f0404d2f5f6acf8fc572e9e4315cb08
Subproject commit ea0aecc8a7cabf3bf7da1cd92039c4e8259bf02f

@ -1 +1 @@
Subproject commit 394ccd39acc5671442bd966a54feab39518e5d99
Subproject commit 6c2cf04b56b226be7bbc4f0ebe47fe937806ac73