Reorganize the crypto functions. ZRTP4J library now contains al required crypto methods and

classes. These classes are copied from BouncyCastle. The DH related classes are modified to
use a crypto aware big integer implementation. Due to this reorganization we can remove
the old BC library - this saves about 1.5MB.
cusax-fix
Werner Dittmann 17 years ago
parent 4a09b0217a
commit f2ecf2bcae

@ -1935,15 +1935,16 @@ javax.swing.event, javax.swing.border"/>
<jar compress="true" destfile="${bundles.dest}/zrtp4j.jar"
filesetmanifest="merge">
<zipfileset src="${lib.noinst}/zrtp4j-1.4.3.jar" prefix=""/>
<zipfileset src="${lib.noinst}/zrtp4j-1.4.4.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=" org.bouncycastle.crypto,org.bouncycastle.crypto.digests,org.bouncycastle.crypto.macs,
org.bouncycastle.crypto.params,org.bouncycastle.crypto.engines,org.bouncycastle.crypto.agreement,
org.bouncycastle.crypto.generators,org.bouncycastle.crypto.modes "/>
<attribute name="Export-Package" value="gnu.java.zrtp,gnu.java.zrtp.packets,
gnu.java.zrtp.utils,gnu.java.zrtp.zidfile,
org.bouncycastle.crypto,org.bouncycastle.crypto.digests,org.bouncycastle.crypto.macs,
org.bouncycastle.crypto.params,org.bouncycastle.crypto.engines,
org.bouncycastle.crypto.modes"/>
<attribute name="Bundle-Name" value="ZRTP4J"/>
<attribute name="Bundle-Description" value="ZRTP for Java library."/>
<attribute name="Bundle-Version" value="1.4.3"/>
<attribute name="Bundle-Version" value="1.4.4"/>
<attribute name="System-Bundle" value="yes"/>
</manifest>
</jar>

@ -46,7 +46,7 @@
<classpathentry kind="lib" path="lib/installer-exclude/swing-worker-1.2.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/transparency.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/ymsg_network_v0_63.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/zrtp4j-1.4.3.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/zrtp4j-1.4.4.jar"/>
<classpathentry kind="lib" path="lib/os-specific/linux/installer-exclude/jmf.jar"/>
<classpathentry kind="lib" path="lib/os-specific/linux/jdic_stub.jar"/>
<classpathentry kind="lib" path="lib/os-specific/mac/installer-exclude/jmf.jar"/>

@ -122,7 +122,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/installer-exclude/commons-logging.jar:lib/installer-exclude/concurrent.jar:lib/installer-exclude/dict4j.jar:lib/installer-exclude/dnsjava-2.0.3.jar:lib/installer-exclude/jain-sip-api.jar:lib/installer-exclude/jain-sip-ri.jar:lib/installer-exclude/jain-sdp.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/installer-exclude/fmj.jar:lib/installer-exclude/jna.jar:lib/installer-exclude/lti-civil-no_s_w_t.jar:lib/installer-exclude/swing-worker-1.2.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/jdic_stub.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/jdic_stub.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/laf-widget.jar:lib/installer-exclude/transparency.jar:lib/installer-exclude/zrtp4j-1.4.3.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/installer-exclude/commons-logging.jar:lib/installer-exclude/concurrent.jar:lib/installer-exclude/dict4j.jar:lib/installer-exclude/dnsjava-2.0.3.jar:lib/installer-exclude/jain-sip-api.jar:lib/installer-exclude/jain-sip-ri.jar:lib/installer-exclude/jain-sdp.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/installer-exclude/fmj.jar:lib/installer-exclude/jna.jar:lib/installer-exclude/lti-civil-no_s_w_t.jar:lib/installer-exclude/swing-worker-1.2.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/jdic_stub.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/jdic_stub.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/laf-widget.jar:lib/installer-exclude/transparency.jar:lib/installer-exclude/zrtp4j-1.4.4.jar:lib/installer-exclude/profiler4j-1.0-beta3-SC.jar</classpath>
<built-to>classes</built-to>
<source-level>1.5</source-level>
</compilation-unit>

Binary file not shown.

@ -47,14 +47,6 @@ org.osgi.framework.system.packages.extra= org.osgi.framework; version=1.3.0, \
quicktime.std.image; \
org.xml.sax.helpers; \
net.java.sip.communicator.util.launchutils; \
org.bouncycastle.crypto; \
org.bouncycastle.crypto.digests; \
org.bouncycastle.crypto.macs; \
org.bouncycastle.crypto.params; \
org.bouncycastle.crypto.agreement; \
org.bouncycastle.crypto.generators; \
org.bouncycastle.crypto.modes; \
org.bouncycastle.crypto.engines; \
javax.crypto; \
javax.crypto.spec; \
javax.crypto.interfaces;

@ -37,14 +37,6 @@ org.osgi.framework.system.packages.extra= org.osgi.framework; ; version=1.3.0, \
javax.naming.directory; \
javax.net; \
javax.net.ssl; \
org.bouncycastle.crypto; \
org.bouncycastle.crypto.digests; \
org.bouncycastle.crypto.macs; \
org.bouncycastle.crypto.params; \
org.bouncycastle.crypto.agreement; \
org.bouncycastle.crypto.generators; \
org.bouncycastle.crypto.modes; \
org.bouncycastle.crypto.engines; \
gnu.java.zrtp; \
gnu.java.zrtp.packets; \
gnu.java.zrtp.utils; \
@ -54,6 +46,15 @@ org.osgi.framework.system.packages.extra= org.osgi.framework; ; version=1.3.0, \
com.apple.cocoa.application; \
net.java.sip.communicator.service.audionotifier; \
# org.bouncycastle.crypto; \
# org.bouncycastle.crypto.digests; \
# org.bouncycastle.crypto.macs; \
# org.bouncycastle.crypto.params; \
# org.bouncycastle.crypto.agreement; \
# org.bouncycastle.crypto.generators; \
# org.bouncycastle.crypto.modes; \
# org.bouncycastle.crypto.engines; \
#
# In case you want testing to run using oscar's graphical ui then uncomment
#

@ -601,7 +601,7 @@ public RawPacket reverseTransform(RawPacket pkt)
return null;
}
byte[] extHeader = zPkt.getMessagePart();
zrtpEngine.processZrtpMessage(extHeader);
zrtpEngine.processZrtpMessage(extHeader, zPkt.getSSRC());
}
return null;
}

Loading…
Cancel
Save