Class DtlsControlImpl

    • Field Detail

      • PROP_SIGNATURE_ALGORITHM

        public static final String PROP_SIGNATURE_ALGORITHM
        The name of the property which specifies the signature algorithm used during certificate creation. When a certificate is created and this property is not set, a default value of "SHA1withRSA" will be used.
        See Also:
        Constant Field Values
      • RSA_KEY_SIZE_PNAME

        public static final String RSA_KEY_SIZE_PNAME
        The name of the property to specify RSA Key length.
        See Also:
        Constant Field Values
      • DEFAULT_RSA_KEY_SIZE

        public static final int DEFAULT_RSA_KEY_SIZE
        The default RSA key size when configuration properties are not found.
        See Also:
        Constant Field Values
      • RSA_KEY_SIZE

        public static final int RSA_KEY_SIZE
        The RSA key size to use. The default value is DEFAULT_RSA_KEY_SIZE but may be overridden by the ConfigurationService and/or System property RSA_KEY_SIZE_PNAME.
      • RSA_KEY_SIZE_CERTAINTY_PNAME

        public static final String RSA_KEY_SIZE_CERTAINTY_PNAME
        The name of the property to specify RSA key size certainty. https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html
        See Also:
        Constant Field Values
      • RSA_KEY_SIZE_CERTAINTY

        public static final int RSA_KEY_SIZE_CERTAINTY
        The RSA key size certainty to use. The default value is DEFAULT_RSA_KEY_SIZE_CERTAINTY but may be overridden by the ConfigurationService and/or System property RSA_KEY_SIZE_CERTAINTY_PNAME. For more on certainty, look at the three parameter constructor here: https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html
      • DEFAULT_RSA_KEY_SIZE_CERTAINTY

        public static final int DEFAULT_RSA_KEY_SIZE_CERTAINTY
        The default RSA key size certainty when config properties are not found.
        See Also:
        Constant Field Values
      • CERT_CACHE_EXPIRE_TIME_PNAME

        public static final String CERT_CACHE_EXPIRE_TIME_PNAME
        The name of the property to specify DTLS certificate cache expiration.
        See Also:
        Constant Field Values
      • CERT_CACHE_EXPIRE_TIME

        public static final long CERT_CACHE_EXPIRE_TIME
        The certificate cache expiration time to use, in milliseconds. The default value is DEFAULT_CERT_CACHE_EXPIRE_TIME but may be overridden by the ConfigurationService and/or System property CERT_CACHE_EXPIRE_TIME_PNAME.
      • DEFAULT_CERT_CACHE_EXPIRE_TIME

        public static final long DEFAULT_CERT_CACHE_EXPIRE_TIME
        The default certificate cache expiration time, when config properties are not found.
        See Also:
        Constant Field Values
      • RSA_KEY_PUBLIC_EXPONENT

        public static final BigInteger RSA_KEY_PUBLIC_EXPONENT
        The public exponent to always use for RSA key generation.
    • Constructor Detail

      • DtlsControlImpl

        public DtlsControlImpl()
        Initializes a new DtlsControlImpl instance.
      • DtlsControlImpl

        public DtlsControlImpl​(boolean srtpDisabled)
        Initializes a new DtlsControlImpl instance.
        Parameters:
        srtpDisabled - true if pure DTLS mode without SRTP extensions is to be used; otherwise, false
    • Method Detail

      • createTransformEngine

        protected DtlsTransformEngine createTransformEngine()
        Initializes a new DtlsTransformEngine instance to be associated with and used by this DtlsControlImpl instance. The method is implemented as a factory.
        Specified by:
        createTransformEngine in class AbstractSrtpControl<DtlsTransformEngine>
        Returns:
        a new DtlsTransformEngine instance to be associated with and used by this DtlsControlImpl instance
      • getLocalFingerprint

        public String getLocalFingerprint()
        Gets the fingerprint of the local certificate that this instance uses to authenticate its ends of DTLS sessions.
        Specified by:
        getLocalFingerprint in interface DtlsControl
        Returns:
        the fingerprint of the local certificate that this instance uses to authenticate its ends of DTLS sessions
      • getLocalFingerprintHashFunction

        public String getLocalFingerprintHashFunction()
        Gets the hash function with which the fingerprint of the local certificate is computed i.e. the digest algorithm of the signature algorithm of the local certificate.
        Specified by:
        getLocalFingerprintHashFunction in interface DtlsControl
        Returns:
        the hash function with which the fingerprint of the local certificate is computed
      • getSecureCommunicationStatus

        public boolean getSecureCommunicationStatus()
        Gets the default secure/insecure communication status for the supported call sessions.
        Specified by:
        getSecureCommunicationStatus in interface SrtpControl
        Returns:
        default secure communication status for the supported call sessions.
      • getSetup

        public DtlsControl.Setup getSetup()
        Gets the value of the setup SDP attribute defined by RFC 4145 "TCP-Based Media Transport in the Session Description Protocol (SDP)" which determines whether this instance acts as a DTLS client or a DTLS server.
        Specified by:
        getSetup in interface DtlsControl
        Returns:
        the value of the setup SDP attribute defined by RFC 4145 "TCP-Based Media Transport in the Session Description Protocol (SDP)" which determines whether this instance acts as a DTLS client or a DTLS server
      • requiresSecureSignalingTransport

        public boolean requiresSecureSignalingTransport()
        Indicates if the key exchange method is dependent on secure transport of the signaling channel. The implementation of DtlsControlImpl always returns true.
        Specified by:
        requiresSecureSignalingTransport in interface SrtpControl
        Returns:
        true when secure signaling is required to make the encryption secure; false, otherwise.
      • setConnector

        public void setConnector​(AbstractRTPConnector connector)
        Sets the RTPConnector which is to use or uses this SRTP engine.
        Specified by:
        setConnector in interface SrtpControl
        Parameters:
        connector - the RTPConnector which is to use or uses this SRTP engine
      • setRemoteFingerprints

        public void setRemoteFingerprints​(Map<String,​String> remoteFingerprints)
        Sets the certificate fingerprints presented by the remote endpoint via the signaling path.
        Specified by:
        setRemoteFingerprints in interface DtlsControl
        Parameters:
        remoteFingerprints - a Map of hash functions to certificate fingerprints that have been presented by the remote endpoint via the signaling path
      • setRtcpmux

        public void setRtcpmux​(boolean rtcpmux)
        Enables/disables rtcp-mux.
        Specified by:
        setRtcpmux in interface DtlsControl
        Parameters:
        rtcpmux - whether to enable or disable.
      • setSetup

        public void setSetup​(DtlsControl.Setup setup)
        Sets the value of the setup SDP attribute defined by RFC 4145 "TCP-Based Media Transport in the Session Description Protocol (SDP)" which determines whether this instance is to act as a DTLS client or a DTLS server.
        Specified by:
        setSetup in interface DtlsControl
        Parameters:
        setup - the value of the setup SDP attribute to set on this instance in order to determine whether this instance is to act as a DTLS client or a DTLS server
      • start

        public void start​(org.jitsi.utils.MediaType mediaType)
        Starts and enables zrtp in the stream holding this control.
        Specified by:
        start in interface SrtpControl
        Parameters:
        mediaType - the media type of the stream this control controls.