diff options
author | Romain Kuntz <rkuntz@java.net> | 2008-10-06 10:38:30 +0000 |
---|---|---|
committer | Romain Kuntz <rkuntz@java.net> | 2008-10-06 10:38:30 +0000 |
commit | 5e3ce7bb175bbd3493538d4e90020d42e6da1250 (patch) | |
tree | 4af900db1dcc36d0e378fde4fb5b4201ad9b85e6 | |
parent | b0f7b08de63660a439954a7409982e53fc58c114 (diff) | |
download | jitsi-5e3ce7bb175bbd3493538d4e90020d42e6da1250.zip jitsi-5e3ce7bb175bbd3493538d4e90020d42e6da1250.tar.gz jitsi-5e3ce7bb175bbd3493538d4e90020d42e6da1250.tar.bz2 |
Added ZRTP4J bundle
Added the boucycastle lib
Renamed OperationSetSecuredTelephony to OperationSetSecureTelephony
Renamed the isSecured/setSecured method to isSecure/setSecure
Fixed some identations
-rw-r--r-- | build.xml | 16 | ||||
-rw-r--r-- | lib/bcprov-jdk14-140.jar (renamed from lib/installer-exclude/bcprov-jdk14-140.jar) | bin | 1589656 -> 1589656 bytes | |||
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java | 12 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/SecureButton.java | 22 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/media/CallSessionImpl.java | 16 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/media/transform/zrtp/SCCallback.java | 155 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java | 12 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java | 2 | ||||
-rw-r--r-- | src/net/java/sip/communicator/service/media/CallSession.java | 2 | ||||
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/OperationSetSecureTelephony.java (renamed from src/net/java/sip/communicator/service/protocol/OperationSetSecuredTelephony.java) | 12 | ||||
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/SecureEvent.java | 6 |
11 files changed, 129 insertions, 126 deletions
@@ -751,7 +751,7 @@ bundle-dict,bundle-plugin-dictaccregwizz, bundle-plugin-simpleaccreg,bundle-plugin-generalconfig, bundle-plugin-googletalkaccregwizz,bundle-argdelegation-service, - bundle-argdelegation"/> + bundle-argdelegation,bundle-zrtp4j"/> <!--BUNDLE-SC-LAUNCHER--> <target name="bundle-sc-launcher"> @@ -1838,4 +1838,18 @@ javax.swing.event, javax.swing.border"/> prefix="net/java/sip/communicator/impl/argdelegation/"/> </jar> </target> + + <!--BUNDLE-ZRTP4J --> + <target name="bundle-zrtp4j"> + <jar compress="true" destfile="lib/bundle/zrtp4j.jar" + filesetmanifest="merge"> + + <zipfileset src="${lib.noinst}/zrtp4j-0.9.0.jar" prefix=""/> + <manifest> + <attribute name="Export-Package" value="gnu.java.zrtp"/> + <attribute name="Bundle-Name" value="ZRTP4J"/> + <attribute name="Bundle-Description" value="ZRTP for Java library."/> + </manifest> + </jar> + </target> </project> diff --git a/lib/installer-exclude/bcprov-jdk14-140.jar b/lib/bcprov-jdk14-140.jar Binary files differindex 2bfb790..2bfb790 100644 --- a/lib/installer-exclude/bcprov-jdk14-140.jar +++ b/lib/bcprov-jdk14-140.jar diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java index 3c925c6..760a064 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java @@ -211,11 +211,11 @@ public class CallParticipantPanel /** * Creates a new <code>Component</code> representing a UI means to secure * the <code>Call</code> of the associated <code>callParticipant</code> or - * <tt>null</tt> if secured call is unsupported. + * <tt>null</tt> if secure call is unsupported. * * @return a new <code>Component</code> representing the UI means to * secure the <code>Call</code> of <code>callParticipant</code> or - * <tt>null</tt> if secured call is unsupported + * <tt>null</tt> if secure call is unsupported */ private Component createSecureCallButton() { @@ -223,11 +223,11 @@ public class CallParticipantPanel if (call != null) { - OperationSetSecuredTelephony secured = - (OperationSetSecuredTelephony) call.getProtocolProvider() - .getOperationSet(OperationSetSecuredTelephony.class); + OperationSetSecureTelephony secure = + (OperationSetSecureTelephony) call.getProtocolProvider() + .getOperationSet(OperationSetSecureTelephony.class); - if (secured != null) + if (secure != null) { return new SecureButton(callParticipant); } diff --git a/src/net/java/sip/communicator/impl/gui/main/call/SecureButton.java b/src/net/java/sip/communicator/impl/gui/main/call/SecureButton.java index efb7f7d..892f0dc 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/SecureButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/SecureButton.java @@ -43,25 +43,25 @@ public class SecureButton String command = evt.getActionCommand(); if (command.equals("startSecureMode")) { - OperationSetSecuredTelephony telephony = - (OperationSetSecuredTelephony) call.getProtocolProvider() - .getOperationSet(OperationSetSecuredTelephony.class); + OperationSetSecureTelephony telephony = + (OperationSetSecureTelephony) call.getProtocolProvider() + .getOperationSet(OperationSetSecureTelephony.class); - if (telephony != null && telephony.isSecured(callParticipant)) + if (telephony != null && telephony.isSecure(callParticipant)) { updateSecureButton(false); - telephony.setSecured(callParticipant, + telephony.setSecure(callParticipant, false, - OperationSetSecuredTelephony. + OperationSetSecureTelephony. SecureStatusChangeSource .SECURE_STATUS_CHANGE_BY_LOCAL); } else if (telephony != null) { updateSecureButton(true); - telephony.setSecured(callParticipant, + telephony.setSecure(callParticipant, true, - OperationSetSecuredTelephony. + OperationSetSecureTelephony. SecureStatusChangeSource .SECURE_STATUS_CHANGE_BY_LOCAL); } @@ -73,11 +73,11 @@ public class SecureButton /** * The method used to update the secure button state (pressed or not pressed) * - * @param isSecured parameter reflecting the current button state + * @param isSecure parameter reflecting the current button state */ - public void updateSecureButton(boolean isSecured) + public void updateSecureButton(boolean isSecure) { - if(isSecured) + if(isSecure) { this.setIcon( new ImageIcon( diff --git a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java index 5359ce0..a16c369 100644 --- a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java +++ b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java @@ -2065,7 +2065,7 @@ public class CallSessionImpl "manager initialized through connector"); } - // No key management solution - unsecured communication branch + // No key management solution - unsecure communication branch else { rtpManager.initialize(bindAddress); @@ -2624,14 +2624,14 @@ public class CallSessionImpl /** * Method for setting the default secure status value for communication - * Also has the role to trigger going secure from not secured or viceversa + * Also has the role to trigger going secure from not secure or viceversa * Notifies any present CallSession of change in the status value for this purpose * * @param activator setting for default communication securing * @param source the source of changing the secure status (local or remote) */ public void setSecureCommunicationStatus(boolean activator, - OperationSetSecuredTelephony. + OperationSetSecureTelephony. SecureStatusChangeSource source) { @@ -2643,7 +2643,7 @@ public class CallSessionImpl // Fire the change event to notify any present CallSession of security change status // if not the case of a reverted secure state // (usually case of previous change rejected due to an error) - if (source != OperationSetSecuredTelephony. + if (source != OperationSetSecureTelephony. SecureStatusChangeSource.SECURE_STATUS_REVERTED) fireSecureStatusChanged(activator, source); @@ -2656,7 +2656,7 @@ public class CallSessionImpl * @param source the source of changing the secure status (local or remote) */ private synchronized void fireSecureStatusChanged(boolean activator, - OperationSetSecuredTelephony. + OperationSetSecureTelephony. SecureStatusChangeSource source) { if (activator) @@ -2681,13 +2681,13 @@ public class CallSessionImpl * Called when a new SecureEvent is received. * * @param manager The RTP manager for which the media streams - * will be secured or unsecured + * will be secure or unsecure * @param event The secure status changed event */ public void ZRTPChangeStatus(RTPManager manager, SecureEvent event) { int newStatus = event.getEventID(); - OperationSetSecuredTelephony.SecureStatusChangeSource source = event.getSource(); + OperationSetSecureTelephony.SecureStatusChangeSource source = event.getSource(); TransformConnector transConnector = (TransformConnector) this.transConnectors.get(manager); @@ -2697,7 +2697,7 @@ public class CallSessionImpl // Perform ZRTP engine actions only if triggered by local peer - user commands; // If the remote peer caused the event only general call session security status // is changed (done before event processing) - if (source == OperationSetSecuredTelephony. + if (source == OperationSetSecureTelephony. SecureStatusChangeSource.SECURE_STATUS_CHANGE_BY_LOCAL) { if (newStatus == SecureEvent.SECURE_COMMUNICATION) diff --git a/src/net/java/sip/communicator/impl/media/transform/zrtp/SCCallback.java b/src/net/java/sip/communicator/impl/media/transform/zrtp/SCCallback.java index 3c6c612..9b7d86c 100644 --- a/src/net/java/sip/communicator/impl/media/transform/zrtp/SCCallback.java +++ b/src/net/java/sip/communicator/impl/media/transform/zrtp/SCCallback.java @@ -389,130 +389,119 @@ public class SCCallback if (command.equals("defaultZRTPAction")) { - if(callSession.getSecureCommunicationStatus()) + if(callSession.getSecureCommunicationStatus()) { - updateSecureButton(false); - - callSession. - setSecureCommunicationStatus(false, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_CHANGE_BY_LOCAL); + updateSecureButton(false); + + callSession. + setSecureCommunicationStatus(false, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_CHANGE_BY_LOCAL); } else { - updateSecureButton(true); - - callSession. - setSecureCommunicationStatus(true, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_CHANGE_BY_LOCAL); + updateSecureButton(true); + + callSession. + setSecureCommunicationStatus(true, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_CHANGE_BY_LOCAL); } } - else - if (command.equals("firstZRTPTrigger")) + else if (command.equals("firstZRTPTrigger")) { - ToolTipManager.sharedInstance().mouseMoved( + ToolTipManager.sharedInstance().mouseMoved( new MouseEvent(zrtpButton, 0, 0, 0, 0, 0, 0, false)); } - else - if (command.equals("revertFromAllowClearFailure")) + else if (command.equals("revertFromAllowClearFailure")) { - updateSecureButton(true); - - callSession. - setSecureCommunicationStatus(true, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_REVERTED); - - zrtpButton.setToolTipText(SCCallbackResources.GOCLEAR_REQUEST_AC_FLAG_FAILURE); + updateSecureButton(true); + + callSession. + setSecureCommunicationStatus(true, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_REVERTED); + + zrtpButton.setToolTipText(SCCallbackResources.GOCLEAR_REQUEST_AC_FLAG_FAILURE); } - else - if (command.equals("zrtpInitFail")) + else if (command.equals("zrtpInitFail")) { - updateSecureButton(false); - - callSession. - setSecureCommunicationStatus(false, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_REVERTED); - - zrtpButton.setToolTipText(SCCallbackResources.ZRTP_ENGINE_INIT_FAILURE); + updateSecureButton(false); + + callSession. + setSecureCommunicationStatus(false, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_REVERTED); + + zrtpButton.setToolTipText(SCCallbackResources.ZRTP_ENGINE_INIT_FAILURE); } - else - if (command.equals("revertToSecured")) + else if (command.equals("revertToSecured")) { - updateSecureButton(true); - - callSession. - setSecureCommunicationStatus(true, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_REVERTED); + updateSecureButton(true); + callSession. + setSecureCommunicationStatus(true, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_REVERTED); } - else - if (command.equals("revertToUnsecured")) + else if (command.equals("revertToUnsecured")) { - updateSecureButton(false); - - callSession. - setSecureCommunicationStatus(false, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_REVERTED); - + updateSecureButton(false); + + callSession. + setSecureCommunicationStatus(false, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_REVERTED); } - else - if (command.equals("goClearRemoteToggle")) + else if (command.equals("goClearRemoteToggle")) { - updateSecureButton(false); - - callSession. - setSecureCommunicationStatus(false, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_CHANGE_BY_REMOTE); + updateSecureButton(false); + callSession. + setSecureCommunicationStatus(false, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_CHANGE_BY_REMOTE); } - else - if (command.equals("goSecureRemoteToggle")) + else if (command.equals("goSecureRemoteToggle")) { - updateSecureButton(true); - - callSession. - setSecureCommunicationStatus(true, - OperationSetSecuredTelephony. - SecureStatusChangeSource. - SECURE_STATUS_CHANGE_BY_REMOTE); - + updateSecureButton(true); + + callSession. + setSecureCommunicationStatus(true, + OperationSetSecureTelephony. + SecureStatusChangeSource. + SECURE_STATUS_CHANGE_BY_REMOTE); } } /** * The method used to update the secure button state (pressed or not pressed) * - * @param isSecured parameter reflecting the current button state + * @param isSecure parameter reflecting the current button state */ - public void updateSecureButton(boolean isSecured) + public void updateSecureButton(boolean isSecure) { - if(isSecured) + if(isSecure) { zrtpButton.setIcon( new ImageIcon(SCCallbackResources.getImage - (SCCallbackResources.SECURE_ON_ICON))); + (SCCallbackResources.SECURE_ON_ICON))); zrtpButton.setToolTipText(SCCallbackResources.TOGGLE_OFF_SECURITY); } else { zrtpButton.setIcon( new ImageIcon(SCCallbackResources.getImage - (SCCallbackResources.SECURE_OFF_ICON))); + (SCCallbackResources.SECURE_OFF_ICON))); zrtpButton.setToolTipText(SCCallbackResources.TOGGLE_ON_SECURITY); } } diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java index 81d9a86..bac3791 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java @@ -32,7 +32,7 @@ public class OperationSetBasicTelephonySipImpl extends AbstractOperationSetBasicTelephony implements MethodProcessor, OperationSetAdvancedTelephony, - OperationSetSecuredTelephony + OperationSetSecureTelephony { private static final Logger logger = Logger.getLogger(OperationSetBasicTelephonySipImpl.class); @@ -2948,20 +2948,20 @@ public class OperationSetBasicTelephonySipImpl /* * (non-Javadoc) - * @see net.java.sip.communicator.service.protocol.OperationSetSecuredTelephony#setSecured(net.java.sip.communicator.service.protocol.CallParticipant, boolean, net.java.sip.communicator.service.protocol.OperationSetSecuredTelephony.SecureStatusChangeSource) + * @see net.java.sip.communicator.service.protocol.OperationSetSecureTelephony#setSecure(net.java.sip.communicator.service.protocol.CallParticipant, boolean, net.java.sip.communicator.service.protocol.OperationSetSecureTelephony.SecureStatusChangeSource) */ - public void setSecured(CallParticipant participant, boolean secured, + public void setSecure(CallParticipant participant, boolean secure, SecureStatusChangeSource source) { ((CallSipImpl) participant.getCall()).getMediaCallSession(). - setSecureCommunicationStatus(secured, source); + setSecureCommunicationStatus(secure, source); } /* * (non-Javadoc) - * @see net.java.sip.communicator.service.protocol.OperationSetSecuredTelephony#getSecured(net.java.sip.communicator.service.protocol.CallParticipant) + * @see net.java.sip.communicator.service.protocol.OperationSetSecureTelephony#isSecure(net.java.sip.communicator.service.protocol.CallParticipant) */ - public boolean isSecured(CallParticipant participant) + public boolean isSecure(CallParticipant participant) { return ((CallSipImpl) participant.getCall()).getMediaCallSession(). getSecureCommunicationStatus(); diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java index 148da40..a64e681 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java @@ -686,7 +686,7 @@ public class ProtocolProviderServiceSipImpl // init ZRTP (OperationSetBasicTelephonySipImpl implements // OperationSetSecureTelephony) this.supportedOperationSets.put( - OperationSetSecuredTelephony.class.getName() + OperationSetSecureTelephony.class.getName() , opSetAdvancedTelephony); //init presence op set. diff --git a/src/net/java/sip/communicator/service/media/CallSession.java b/src/net/java/sip/communicator/service/media/CallSession.java index 6346f5b..67f68549 100644 --- a/src/net/java/sip/communicator/service/media/CallSession.java +++ b/src/net/java/sip/communicator/service/media/CallSession.java @@ -200,7 +200,7 @@ public interface CallSession * @param source the initiator of the secure status change (can be local or remote) */ public void setSecureCommunicationStatus(boolean activator, - OperationSetSecuredTelephony. + OperationSetSecureTelephony. SecureStatusChangeSource source); /** diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetSecuredTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetSecureTelephony.java index faf6033..b1801ed 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetSecuredTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetSecureTelephony.java @@ -14,29 +14,29 @@ import net.java.sip.communicator.service.protocol.event.*; * @author Emanuel Onica * @author Romain Kuntz */ -public interface OperationSetSecuredTelephony +public interface OperationSetSecureTelephony extends OperationSet { /** - * Sets the secured state of the call session in which a specific participant + * Sets the secure state of the call session in which a specific participant * is involved * * @param participant the participant who toggled (or for whom is remotely * toggled) the secure status change for the call - * @param secured the new secure status + * @param secure the new secure status * @param source the source who generated the call change */ - public void setSecured(CallParticipant participant, boolean secured, + public void setSecure(CallParticipant participant, boolean secure, SecureStatusChangeSource source); /** - * Gets the secured state of the call session in which a specific participant + * Gets the secure state of the call session in which a specific participant * is involved * * @param participant the participant for who the call state is required * @return the call state */ - public boolean isSecured(CallParticipant participant); + public boolean isSecure(CallParticipant participant); /** * Use this to indicate the source of setting the secure status diff --git a/src/net/java/sip/communicator/service/protocol/SecureEvent.java b/src/net/java/sip/communicator/service/protocol/SecureEvent.java index 82b5299..8dc4b84 100644 --- a/src/net/java/sip/communicator/service/protocol/SecureEvent.java +++ b/src/net/java/sip/communicator/service/protocol/SecureEvent.java @@ -41,7 +41,7 @@ public class SecureEvent /** * The source that triggered the event - local or remote peer */ - private OperationSetSecuredTelephony.SecureStatusChangeSource source; + private OperationSetSecureTelephony.SecureStatusChangeSource source; /** * The event constructor @@ -51,7 +51,7 @@ public class SecureEvent */ public SecureEvent(CallSessionImpl callSession, int eventID, - OperationSetSecuredTelephony.SecureStatusChangeSource source) + OperationSetSecureTelephony.SecureStatusChangeSource source) { super(callSession); this.eventID = eventID; @@ -72,7 +72,7 @@ public class SecureEvent * Retrieves the source that triggered the event * (change by local peer or remote peer or reverting a previous change) */ - public OperationSetSecuredTelephony.SecureStatusChangeSource getSource() + public OperationSetSecureTelephony.SecureStatusChangeSource getSource() { return source; } |