Updated ZRTP4J jar from 0.9.0 to 1.3.1 (provided by Werner Dittmann)

Updated the build.xml and ide project file to reflect the new ZRTP4J library
Commented references to the ZRTP goClear/goSecure functions (patch provided by Werner)
cusax-fix
Romain Kuntz 17 years ago
parent fd640439f7
commit c904ef231e

@ -1816,7 +1816,7 @@ javax.swing.event, javax.swing.border"/>
<jar compress="true" destfile="${bundles.dest}/zrtp4j.jar"
filesetmanifest="merge">
<zipfileset src="${lib.noinst}/zrtp4j-0.9.0.jar" prefix=""/>
<zipfileset src="${lib.noinst}/zrtp4j-1.3.1.jar" prefix=""/>
<manifest>
<attribute name="Export-Package" value="gnu.java.zrtp,gnu.java.zrtp.packets,gnu.java.zrtp.utils,gnu.java.zrtp.zidfile"/>
<attribute name="Import-Package" value="javax.crypto,javax.crypto.spec,javax.crypto.interfaces"/>

@ -8,7 +8,7 @@
<classpathentry kind="lib" path="lib/jdic-all.jar"/>
<classpathentry kind="lib" path="lib/bundle/junit.jar"/>
<classpathentry kind="lib" path="lib/bundle/org.apache.felix.servicebinder-0.9.0-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/zrtp4j-0.9.0.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/zrtp4j-1.3.1.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/commons-logging.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/concurrent.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/dnsjava-2.0.3.jar"/>

@ -104,7 +104,7 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
<compilation-unit>
<package-root>src</package-root>
<classpath mode="compile">lib/bcprovider.jar:lib/felix.jar:lib/jdic-all.jar:lib/bundle/junit.jar:lib/bundle/log4j.jar:lib/bundle/org.apache.felix.servicebinder-0.9.0-SNAPSHOT.jar:lib/installer-exclude/commons-logging.jar:lib/installer-exclude/concurrent.jar:lib/installer-exclude/dnsjava-2.0.3.jar:lib/installer-exclude/JainSipApi1.2.jar:lib/installer-exclude/JainSipRi1.2.jar:lib/installer-exclude/jcalendar-1.3.2.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/jdom.jar:lib/installer-exclude/jmf.jar:lib/installer-exclude/jml-1.0b2.jar:lib/installer-exclude/joscar-client.jar:lib/installer-exclude/joscar-common.jar:lib/installer-exclude/joscar-protocol.jar:lib/installer-exclude/jsocks-klea.jar:lib/installer-exclude/jspeex.jar:lib/installer-exclude/junit.jar:lib/installer-exclude/log4j-1.2.8.jar:lib/installer-exclude/nist-sdp-1.0.jar:lib/installer-exclude/rome-0.9.jar:lib/installer-exclude/smack.jar:lib/installer-exclude/smackx.jar:lib/installer-exclude/smackx-jingle.jar:lib/installer-exclude/Stun4J.jar:lib/installer-exclude/ymsg_network_v0_63.jar:lib/os-specific/linux/installer-exclude/jmf.jar:lib/os-specific/linux/jdic_stub.jar:lib/os-specific/mac/AppleJavaExtensions.jar:lib/os-specific/mac/growl.jar:lib/os-specific/mac/jdic_stub.jar:lib/os-specific/mac/installer-exclude/jmf.jar:lib/os-specific/mac/installer-exclude/dock.jar:lib/os-specific/windows/installer-exclude/jmf.jar:lib/os-specific/windows/installer-exclude/sound.jar:lib/installer-exclude/aclibico-2.1.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/pircbot.jar:lib/os-specific/solaris/installer-exclude/jmf.jar:lib/installer-exclude/jsch-0.1.36.jar:lib/installer-exclude/apache-ant-1.7.0.jar:lib/installer-exclude/izpack-shortcut-link.jar:lib/installer-exclude/jfontchooser-1.0.5.jar:lib/installer-exclude/KeybindingUtil.jar:lib/installer-exclude/transparency.jar:lib/installer-exclude/zrtp4j-0.9.0.jar:lib/installer-exclude/profiler4j-1.0-beta3-SC.jar</classpath>
<classpath mode="compile">lib/bcprovider.jar:lib/felix.jar:lib/jdic-all.jar:lib/bundle/junit.jar:lib/bundle/log4j.jar:lib/bundle/org.apache.felix.servicebinder-0.9.0-SNAPSHOT.jar:lib/installer-exclude/commons-logging.jar:lib/installer-exclude/concurrent.jar:lib/installer-exclude/dnsjava-2.0.3.jar:lib/installer-exclude/JainSipApi1.2.jar:lib/installer-exclude/JainSipRi1.2.jar:lib/installer-exclude/jcalendar-1.3.2.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/jdom.jar:lib/installer-exclude/jmf.jar:lib/installer-exclude/jml-1.0b2.jar:lib/installer-exclude/joscar-client.jar:lib/installer-exclude/joscar-common.jar:lib/installer-exclude/joscar-protocol.jar:lib/installer-exclude/jsocks-klea.jar:lib/installer-exclude/jspeex.jar:lib/installer-exclude/junit.jar:lib/installer-exclude/log4j-1.2.8.jar:lib/installer-exclude/nist-sdp-1.0.jar:lib/installer-exclude/rome-0.9.jar:lib/installer-exclude/smack.jar:lib/installer-exclude/smackx.jar:lib/installer-exclude/smackx-jingle.jar:lib/installer-exclude/Stun4J.jar:lib/installer-exclude/ymsg_network_v0_63.jar:lib/os-specific/linux/installer-exclude/jmf.jar:lib/os-specific/linux/jdic_stub.jar:lib/os-specific/mac/AppleJavaExtensions.jar:lib/os-specific/mac/growl.jar:lib/os-specific/mac/jdic_stub.jar:lib/os-specific/mac/installer-exclude/jmf.jar:lib/os-specific/mac/installer-exclude/dock.jar:lib/os-specific/windows/installer-exclude/jmf.jar:lib/os-specific/windows/installer-exclude/sound.jar:lib/installer-exclude/aclibico-2.1.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/pircbot.jar:lib/os-specific/solaris/installer-exclude/jmf.jar:lib/installer-exclude/jsch-0.1.36.jar:lib/installer-exclude/apache-ant-1.7.0.jar:lib/installer-exclude/izpack-shortcut-link.jar:lib/installer-exclude/jfontchooser-1.0.5.jar:lib/installer-exclude/KeybindingUtil.jar:lib/installer-exclude/transparency.jar:lib/installer-exclude/zrtp4j-1.3.1.jar:lib/installer-exclude/profiler4j-1.0-beta3-SC.jar</classpath>
<built-to>classes</built-to>
<source-level>1.5</source-level>
</compilation-unit>

@ -243,42 +243,42 @@ public void zrtpNegotiationFailed(ZrtpCodes.MessageSeverity severity,
showTooltip();
}
public void goClearProcedureFailed(ZrtpCodes.MessageSeverity severity,
EnumSet<?> subCode, boolean maintainSecurity)
{
Iterator ii = subCode.iterator();
Object msgCode = ii.next();
logger.warn("ZRTP negotiation failed sub code: " + msgCode);
System.err.println("ZRTP negotiation failed sub code: " + msgCode);
String prevCommand = zrtpButton.getActionCommand();
if (msgCode.equals(ZrtpCodes.WarningCodes.WarningGoClearRequestInvalid))
{
zrtpButton.setActionCommand("revertFromAllowClearFailure");
zrtpButton.doClick();
}
else
if (maintainSecurity == false)
{
zrtpLabel.setBorder(BorderFactory.createLineBorder(Color.RED));
zrtpLabel.setText(SCCallbackResources.SAS_NOT_SECURED_MESSAGE);
zrtpLabel.setToolTipText(SCCallbackResources.SAS_SECURING_FAIL_TOOLTIP);
zrtpButton.setActionCommand("revertToUnsecured");
zrtpButton.doClick();
zrtpButton.setActionCommand(prevCommand);
}
else
if (maintainSecurity == true)
{
zrtpButton.setActionCommand("revertToSecured");
zrtpButton.doClick();
zrtpButton.setActionCommand(prevCommand);
}
showTooltip();
}
// public void goClearProcedureFailed(ZrtpCodes.MessageSeverity severity,
// EnumSet<?> subCode, boolean maintainSecurity)
// {
// Iterator ii = subCode.iterator();
// Object msgCode = ii.next();
// logger.warn("ZRTP negotiation failed sub code: " + msgCode);
// System.err.println("ZRTP negotiation failed sub code: " + msgCode);
//
// String prevCommand = zrtpButton.getActionCommand();
//
// if (msgCode.equals(ZrtpCodes.WarningCodes.WarningGoClearRequestInvalid))
// {
// zrtpButton.setActionCommand("revertFromAllowClearFailure");
// zrtpButton.doClick();
// }
// else
// if (maintainSecurity == false)
// {
// zrtpLabel.setBorder(BorderFactory.createLineBorder(Color.RED));
// zrtpLabel.setText(SCCallbackResources.SAS_NOT_SECURED_MESSAGE);
// zrtpLabel.setToolTipText(SCCallbackResources.SAS_SECURING_FAIL_TOOLTIP);
//
// zrtpButton.setActionCommand("revertToUnsecured");
// zrtpButton.doClick();
// zrtpButton.setActionCommand(prevCommand);
// }
// else
// if (maintainSecurity == true)
// {
// zrtpButton.setActionCommand("revertToSecured");
// zrtpButton.doClick();
// zrtpButton.setActionCommand(prevCommand);
// }
//
// showTooltip();
// }
/*
* (non-Javadoc)

@ -151,7 +151,7 @@ public class ZRTPTransformEngine
{
/**
* Very simple Timout provider class.
* Very simple Timeout provider class.
*
* This very simple timeout provider can handle one timeout request at
* one time only. A second request would overwrite the first one and would
@ -273,7 +273,7 @@ public void run()
* User callback class.
*/
private ZrtpUserCallback userCallback = null;
/**
* The ZRTP engine.
*/
@ -454,7 +454,10 @@ public synchronized boolean initialize(String zidFilename, boolean autoEnable)
// TODO Auto-generated catch block
e.printStackTrace();
}
userCallback.init();
if (userCallback instanceof SCCallback)
{
((SCCallback)userCallback).init();
}
return true;
}
@ -567,6 +570,14 @@ public RawPacket reverseTransform(RawPacket pkt)
return pkt;
}
pkt = srtpInTransformer.reverseTransform(pkt);
// if packet was valid (i.e. not null) and ZRTP engine started and
// not yet in secure state - emulate a Conf2Ack packet. See ZRTP
// specification chap. 5.6
if (pkt != null && zrtpEngine != null
&& !zrtpEngine.inState(ZrtpStateClass.ZrtpStates.SecureState))
{
zrtpEngine.conf2AckSecure();
}
return pkt;
}
@ -757,15 +768,14 @@ public boolean srtpSecretsReady(ZrtpSrtpSecrets secrets, EnableSecurity part)
*/
public void srtpSecretsOn(String c, String s, boolean verified)
{
if (userCallback != null)
{
userCallback.secureOn(c);
}
if (userCallback != null)
{
userCallback.showSAS(s, verified);
}
if (userCallback != null)
{
userCallback.secureOn(c);
}
if (userCallback != null && s != null)
{
userCallback.showSAS(s, verified);
}
}
/*
@ -854,13 +864,13 @@ public void zrtpNegotiationFailed(ZrtpCodes.MessageSeverity severity, EnumSet<?>
* @see gnu.java.zrtp.ZrtpCallback#goClearProcedureFailed(gnu.java.zrtp.ZrtpCodes.MessageSeverity, java.util.EnumSet, boolean)
*/
public void goClearProcedureFailed(ZrtpCodes.MessageSeverity severity,
EnumSet<?> subCode,
boolean maintainSecurity)
EnumSet<?> subCode,
boolean maintainSecurity)
{
if (userCallback != null)
{
userCallback.goClearProcedureFailed(severity, subCode, maintainSecurity);
}
// if (userCallback != null)
// {
// userCallback.goClearProcedureFailed(severity, subCode, maintainSecurity);
// }
}
/*
@ -964,8 +974,8 @@ public void resetSASVerified()
*/
public void requestGoClear()
{
if (zrtpEngine != null)
zrtpEngine.requestGoClear();
// if (zrtpEngine != null)
// zrtpEngine.requestGoClear();
}
/**
@ -974,8 +984,8 @@ public void requestGoClear()
*/
public void requestGoSecure()
{
if (zrtpEngine != null)
zrtpEngine.requestGoSecure();
// if (zrtpEngine != null)
// zrtpEngine.requestGoSecure();
}
/**

Loading…
Cancel
Save