Class SDesControlImpl
- java.lang.Object
-
- org.jitsi.service.neomedia.AbstractSrtpControl<SDesTransformEngine>
-
- org.jitsi.impl.neomedia.transform.sdes.SDesControlImpl
-
- All Implemented Interfaces:
SDesControl,SrtpControl
public class SDesControlImpl extends AbstractSrtpControl<SDesTransformEngine> implements SDesControl
Default implementation ofSDesControlthat supports the crypto suites of the original RFC4568 and the KDR parameter, but nothing else.- Author:
- Ingo Bauersachs
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jitsi.service.neomedia.SrtpControl
SrtpControl.TransformEngine
-
-
Field Summary
-
Fields inherited from class org.jitsi.service.neomedia.AbstractSrtpControl
transformEngine
-
Fields inherited from interface org.jitsi.service.neomedia.SDesControl
SDES_CIPHER_SUITES
-
Fields inherited from interface org.jitsi.service.neomedia.SrtpControl
RTP_SAVP, RTP_SAVPF
-
-
Constructor Summary
Constructors Constructor Description SDesControlImpl()SDESControl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SDesTransformEnginecreateTransformEngine()Initializes a new SDesTransformEngine instance to be associated with and used by this SDesControlImpl instance.ch.imvs.sdes4j.srtp.SrtpCryptoAttributegetInAttribute()Gets the crypto attribute of the incoming MediaStream.ch.imvs.sdes4j.srtp.SrtpCryptoAttribute[]getInitiatorCryptoAttributes()Returns the crypto attributes enabled on this computer.ch.imvs.sdes4j.srtp.SrtpCryptoAttributegetOutAttribute()Gets the crypto attribute of the outgoing MediaStream.booleangetSecureCommunicationStatus()Gets the default secure/insecure communication status for the supported call sessions.Iterable<String>getSupportedCryptoSuites()Gets all supported cipher suites.ch.imvs.sdes4j.srtp.SrtpCryptoAttributeinitiatorSelectAttribute(Iterable<ch.imvs.sdes4j.srtp.SrtpCryptoAttribute> peerAttributes)Select the local crypto attribute from the initial offering (@seegetInitiatorCryptoAttributes()) based on the peer's first matching cipher suite.booleanrequiresSecureSignalingTransport()Returns true, SDES always requires the secure transport of its keys.ch.imvs.sdes4j.srtp.SrtpCryptoAttributeresponderSelectAttribute(Iterable<ch.imvs.sdes4j.srtp.SrtpCryptoAttribute> peerAttributes)Chooses a supported crypto attribute from the peer's list of supplied attributes and creates the local crypto attribute.voidsetConnector(AbstractRTPConnector connector)Sets the RTPConnector which is to use or uses this SRTP engine.voidsetEnabledCiphers(Iterable<String> ciphers)Sets the enabled SDES ciphers.voidstart(org.jitsi.utils.MediaType mediaType)Starts and enables zrtp in the stream holding this control.-
Methods inherited from class org.jitsi.service.neomedia.AbstractSrtpControl
cleanup, doCleanup, getSrtpControlType, getSrtpListener, getTransformEngine, registerUser, setMasterSession, setMultistream, setSrtpListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jitsi.service.neomedia.SrtpControl
cleanup, getSrtpControlType, getSrtpListener, getTransformEngine, registerUser, setMasterSession, setMultistream, setSrtpListener
-
-
-
-
Method Detail
-
getInAttribute
public ch.imvs.sdes4j.srtp.SrtpCryptoAttribute getInAttribute()
Description copied from interface:SDesControlGets the crypto attribute of the incoming MediaStream.- Specified by:
getInAttributein interfaceSDesControl- Returns:
- the crypto attribute of the incoming MediaStream.
-
getInitiatorCryptoAttributes
public ch.imvs.sdes4j.srtp.SrtpCryptoAttribute[] getInitiatorCryptoAttributes()
Returns the crypto attributes enabled on this computer.- Specified by:
getInitiatorCryptoAttributesin interfaceSDesControl- Returns:
- The crypto attributes enabled on this computer.
-
getOutAttribute
public ch.imvs.sdes4j.srtp.SrtpCryptoAttribute getOutAttribute()
Description copied from interface:SDesControlGets the crypto attribute of the outgoing MediaStream.- Specified by:
getOutAttributein interfaceSDesControl- Returns:
- the crypto attribute of the outgoing MediaStream.
-
getSecureCommunicationStatus
public boolean getSecureCommunicationStatus()
Description copied from interface:SrtpControlGets the default secure/insecure communication status for the supported call sessions.- Specified by:
getSecureCommunicationStatusin interfaceSrtpControl- Returns:
- default secure communication status for the supported call sessions.
-
getSupportedCryptoSuites
public Iterable<String> getSupportedCryptoSuites()
Description copied from interface:SDesControlGets all supported cipher suites.- Specified by:
getSupportedCryptoSuitesin interfaceSDesControl- Returns:
- all supported cipher suites.
-
createTransformEngine
protected SDesTransformEngine createTransformEngine()
Initializes a new SDesTransformEngine instance to be associated with and used by this SDesControlImpl instance.- Specified by:
createTransformEnginein classAbstractSrtpControl<SDesTransformEngine>- Returns:
- a new SDesTransformEngine instance to be associated with and used by this SDesControlImpl instance
- See Also:
AbstractSrtpControl.createTransformEngine()
-
initiatorSelectAttribute
public ch.imvs.sdes4j.srtp.SrtpCryptoAttribute initiatorSelectAttribute(Iterable<ch.imvs.sdes4j.srtp.SrtpCryptoAttribute> peerAttributes)
Select the local crypto attribute from the initial offering (@seegetInitiatorCryptoAttributes()) based on the peer's first matching cipher suite.- Specified by:
initiatorSelectAttributein interfaceSDesControl- Parameters:
peerAttributes- The peer's crypto offers.- Returns:
- A SrtpCryptoAttribute when a matching cipher suite was found; null, otherwise.
-
requiresSecureSignalingTransport
public boolean requiresSecureSignalingTransport()
Returns true, SDES always requires the secure transport of its keys.- Specified by:
requiresSecureSignalingTransportin interfaceSrtpControl- Returns:
- true
-
responderSelectAttribute
public ch.imvs.sdes4j.srtp.SrtpCryptoAttribute responderSelectAttribute(Iterable<ch.imvs.sdes4j.srtp.SrtpCryptoAttribute> peerAttributes)
Chooses a supported crypto attribute from the peer's list of supplied attributes and creates the local crypto attribute. Used when the control is running in the role as responder.- Specified by:
responderSelectAttributein interfaceSDesControl- Parameters:
peerAttributes- The peer's crypto attribute offering.- Returns:
- The local crypto attribute for the answer of the offer or null if no matching cipher suite could be found.
-
setConnector
public void setConnector(AbstractRTPConnector connector)
Sets the RTPConnector which is to use or uses this SRTP engine. The implementation of SDesControlImpl does nothing because SDesControlImpl does not utilize the RTPConnector.- Specified by:
setConnectorin interfaceSrtpControl- Parameters:
connector- the RTPConnector which is to use or uses this SRTP engine
-
setEnabledCiphers
public void setEnabledCiphers(Iterable<String> ciphers)
Description copied from interface:SDesControlSets the enabled SDES ciphers.- Specified by:
setEnabledCiphersin interfaceSDesControl- Parameters:
ciphers- The list of enabled ciphers.
-
start
public void start(org.jitsi.utils.MediaType mediaType)
Description copied from interface:SrtpControlStarts and enables zrtp in the stream holding this control.- Specified by:
startin interfaceSrtpControl- Parameters:
mediaType- the media type of the stream this control controls.
-
-