Skip to content
Snippets Groups Projects
Commit 387222c4 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

sips: disable ZRTP

Fixes a crash caused by of missing ZRTP config values.

ZRTP may be enabled back later in the daemon
but is disabled for now.

Refs #76074

Change-Id: Iab815a7394f29a08bc800a1e28386bba77c692ee
parent aa771a8b
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ import cx.ring.model.account.AccountDetailSrtp; ...@@ -40,7 +40,7 @@ import cx.ring.model.account.AccountDetailSrtp;
public class SecureSipCall extends SipCall { public class SecureSipCall extends SipCall {
public interface SecureLayer { public interface SecureLayer {
int ZRTP_LAYER = 0; //int ZRTP_LAYER = 0;
int SDES_LAYER = 1; int SDES_LAYER = 1;
} }
...@@ -50,7 +50,7 @@ public class SecureSipCall extends SipCall { ...@@ -50,7 +50,7 @@ public class SecureSipCall extends SipCall {
public final static int DISPLAY_NONE = 3; public final static int DISPLAY_NONE = 3;
int mSecureLayerUsed; int mSecureLayerUsed;
ZrtpModule mZrtpModule; //ZrtpModule mZrtpModule;
SdesModule mSdesModule; SdesModule mSdesModule;
private boolean isInitialized; private boolean isInitialized;
...@@ -59,26 +59,27 @@ public class SecureSipCall extends SipCall { ...@@ -59,26 +59,27 @@ public class SecureSipCall extends SipCall {
super(call); super(call);
isInitialized = false; isInitialized = false;
String keyExchange = getAccount().getSrtpDetails().getDetailString(AccountDetailSrtp.CONFIG_SRTP_KEY_EXCHANGE); String keyExchange = getAccount().getSrtpDetails().getDetailString(AccountDetailSrtp.CONFIG_SRTP_KEY_EXCHANGE);
if (keyExchange.contentEquals("zrtp")) { /*if (keyExchange.contentEquals("zrtp")) {
mSecureLayerUsed = SecureLayer.ZRTP_LAYER; mSecureLayerUsed = SecureLayer.ZRTP_LAYER;
} else if (keyExchange.contentEquals("sdes")) { } else */if (keyExchange.contentEquals("sdes")) {
mSecureLayerUsed = SecureLayer.SDES_LAYER; mSecureLayerUsed = SecureLayer.SDES_LAYER;
} }
mZrtpModule = new ZrtpModule(); //mZrtpModule = new ZrtpModule();
mSdesModule = new SdesModule(); mSdesModule = new SdesModule();
} }
public void setSASConfirmed(boolean confirmedSAS) { public void setSASConfirmed(boolean confirmedSAS) {
mZrtpModule.needSASConfirmation = !confirmedSAS; //mZrtpModule.needSASConfirmation = !confirmedSAS;
} }
public String getSAS() { public String getSAS() {
return mZrtpModule.SAS; //return mZrtpModule.SAS;
return "";
} }
public void setSAS(String SAS) { public void setSAS(String SAS) {
mZrtpModule.SAS = SAS; //mZrtpModule.SAS = SAS;
} }
public SecureSipCall(Parcel in) { public SecureSipCall(Parcel in) {
...@@ -86,7 +87,7 @@ public class SecureSipCall extends SipCall { ...@@ -86,7 +87,7 @@ public class SecureSipCall extends SipCall {
isInitialized = in.readByte() == 1; isInitialized = in.readByte() == 1;
mSecureLayerUsed = in.readInt(); mSecureLayerUsed = in.readInt();
mSdesModule = new SdesModule(in); mSdesModule = new SdesModule(in);
mZrtpModule = new ZrtpModule(in); //mZrtpModule = new ZrtpModule(in);
} }
@Override @Override
...@@ -95,7 +96,7 @@ public class SecureSipCall extends SipCall { ...@@ -95,7 +96,7 @@ public class SecureSipCall extends SipCall {
out.writeByte((byte) (isInitialized ? 1 : 0)); out.writeByte((byte) (isInitialized ? 1 : 0));
out.writeInt(mSecureLayerUsed); out.writeInt(mSecureLayerUsed);
mSdesModule.writeToParcel(out); mSdesModule.writeToParcel(out);
mZrtpModule.writeToParcel(out); //mZrtpModule.writeToParcel(out);
} }
public static final Parcelable.Creator<SecureSipCall> CREATOR = new Parcelable.Creator<SecureSipCall>() { public static final Parcelable.Creator<SecureSipCall> CREATOR = new Parcelable.Creator<SecureSipCall>() {
...@@ -113,9 +114,9 @@ public class SecureSipCall extends SipCall { ...@@ -113,9 +114,9 @@ public class SecureSipCall extends SipCall {
} }
public void setZrtpSupport(boolean support) { public void setZrtpSupport(boolean support) {
mZrtpModule.zrtpIsSupported = support; /*mZrtpModule.zrtpIsSupported = support;
if (!support) if (!support)
mZrtpModule.needSASConfirmation = false; mZrtpModule.needSASConfirmation = false;*/
} }
public void setInitialized() { public void setInitialized() {
...@@ -126,7 +127,7 @@ public class SecureSipCall extends SipCall { ...@@ -126,7 +127,7 @@ public class SecureSipCall extends SipCall {
* returns what state should be visible during call * returns what state should be visible during call
*/ */
public int displayModule() { public int displayModule() {
if (isInitialized) { /*if (isInitialized) {
Log.i("SecureSIp", "needSASConfirmation" + mZrtpModule.needSASConfirmation); Log.i("SecureSIp", "needSASConfirmation" + mZrtpModule.needSASConfirmation);
if (mZrtpModule.needSASConfirmation) { if (mZrtpModule.needSASConfirmation) {
return DISPLAY_CONFIRM_SAS; return DISPLAY_CONFIRM_SAS;
...@@ -135,16 +136,16 @@ public class SecureSipCall extends SipCall { ...@@ -135,16 +136,16 @@ public class SecureSipCall extends SipCall {
} else { } else {
return DISPLAY_RED_LOCK; return DISPLAY_RED_LOCK;
} }
} }*/
return DISPLAY_NONE; return DISPLAY_NONE;
} }
public void useSecureSDES(boolean use) { public void useSecureSDES(boolean use) {
mSdesModule.sdesIsOn = use; mSdesModule.sdesIsOn = use;
mZrtpModule.needSASConfirmation = false; //mZrtpModule.needSASConfirmation = false;
} }
/*
private class ZrtpModule { private class ZrtpModule {
private String SAS; private String SAS;
private boolean needSASConfirmation; private boolean needSASConfirmation;
...@@ -181,7 +182,7 @@ public class SecureSipCall extends SipCall { ...@@ -181,7 +182,7 @@ public class SecureSipCall extends SipCall {
dest.writeByte((byte) (needSASConfirmation ? 1 : 0)); dest.writeByte((byte) (needSASConfirmation ? 1 : 0));
} }
} }
*/
private class SdesModule { private class SdesModule {
private boolean sdesIsOn; private boolean sdesIsOn;
......
...@@ -33,10 +33,10 @@ public class AccountDetailSrtp implements AccountDetail { ...@@ -33,10 +33,10 @@ public class AccountDetailSrtp implements AccountDetail {
public static final String CONFIG_SRTP_KEY_EXCHANGE = "SRTP.keyExchange"; public static final String CONFIG_SRTP_KEY_EXCHANGE = "SRTP.keyExchange";
public static final String CONFIG_SRTP_ENCRYPTION_ALGO = "SRTP.encryptionAlgorithm"; // Provided by ccRTP,0=NULL,1=AESCM,2=AESF8 public static final String CONFIG_SRTP_ENCRYPTION_ALGO = "SRTP.encryptionAlgorithm"; // Provided by ccRTP,0=NULL,1=AESCM,2=AESF8
public static final String CONFIG_SRTP_RTP_FALLBACK = "SRTP.rtpFallback"; public static final String CONFIG_SRTP_RTP_FALLBACK = "SRTP.rtpFallback";
public static final String CONFIG_ZRTP_HELLO_HASH = "ZRTP.helloHashEnable"; /*public static final String CONFIG_ZRTP_HELLO_HASH = "ZRTP.helloHashEnable";
public static final String CONFIG_ZRTP_DISPLAY_SAS = "ZRTP.displaySAS"; public static final String CONFIG_ZRTP_DISPLAY_SAS = "ZRTP.displaySAS";
public static final String CONFIG_ZRTP_NOT_SUPP_WARNING = "ZRTP.notSuppWarning"; public static final String CONFIG_ZRTP_NOT_SUPP_WARNING = "ZRTP.notSuppWarning";
public static final String CONFIG_ZRTP_DISPLAY_SAS_ONCE = "ZRTP.displaySasOnce"; public static final String CONFIG_ZRTP_DISPLAY_SAS_ONCE = "ZRTP.displaySasOnce";*/
private ArrayList<AccountDetail.PreferenceEntry> privateArray; private ArrayList<AccountDetail.PreferenceEntry> privateArray;
...@@ -47,10 +47,10 @@ public class AccountDetailSrtp implements AccountDetail { ...@@ -47,10 +47,10 @@ public class AccountDetailSrtp implements AccountDetail {
preference.add(new PreferenceEntry(CONFIG_SRTP_KEY_EXCHANGE, false)); preference.add(new PreferenceEntry(CONFIG_SRTP_KEY_EXCHANGE, false));
preference.add(new PreferenceEntry(CONFIG_SRTP_ENCRYPTION_ALGO, true)); preference.add(new PreferenceEntry(CONFIG_SRTP_ENCRYPTION_ALGO, true));
preference.add(new PreferenceEntry(CONFIG_SRTP_RTP_FALLBACK, true)); preference.add(new PreferenceEntry(CONFIG_SRTP_RTP_FALLBACK, true));
preference.add(new PreferenceEntry(CONFIG_ZRTP_HELLO_HASH, true)); /*preference.add(new PreferenceEntry(CONFIG_ZRTP_HELLO_HASH, true));
preference.add(new PreferenceEntry(CONFIG_ZRTP_DISPLAY_SAS, true)); preference.add(new PreferenceEntry(CONFIG_ZRTP_DISPLAY_SAS, true));
preference.add(new PreferenceEntry(CONFIG_ZRTP_NOT_SUPP_WARNING, true)); preference.add(new PreferenceEntry(CONFIG_ZRTP_NOT_SUPP_WARNING, true));
preference.add(new PreferenceEntry(CONFIG_ZRTP_DISPLAY_SAS_ONCE, true)); preference.add(new PreferenceEntry(CONFIG_ZRTP_DISPLAY_SAS_ONCE, true));*/
return preference; return preference;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment