ZRTP configuration data.
More...
#include <ZrtpConfigure.h>
Collaboration diagram for ZrtpConfigure:
Public Member Functions
Convenience function that sets a pre-defined standard configuration.
More...
Convenience function that sets the mandatory algorithms only.
More...
Clear all configuration data.
More...
Add an algorithm to configuration data.
More...
Add an algorithm to configuration data at given index.
More...
Remove a algorithm from configuration data.
More...
Returns the number of configured algorithms.
More...
Returns the identifier of the algorithm at index.
More...
Checks if the configuration data of the algorihm type already contains a specific algorithms.
More...
Enables or disables trusted MitM processing.
More...
Check status of trusted MitM processing.
More...
Enables or disables SAS signature processing.
More...
Check status of SAS signature processing.
More...
Enables or disables paranoid mode.
More...
Check status of paranoid mode.
More...
Helper function to print some internal data.
More...
Static Public Attributes
Set the maximum number of algorithms per algorithm type that an application can configure.
More...
Private Member Functions
Private Attributes
Detailed Description
ZRTP configuration data.
This class contains data and functions to set ZRTP configuration data. An application may use this class to set configuration information for ZRTP. ZRTP uses this configuration information to announce various algorithms via its Hello message. An application may use this class to restrict or allow use of algorithms.
The constructor does not set any algorithms, thus it is an empty configuration. An application may use this empty configuration and hand it over to ZRTP. In this case ZRTP does not announce any algorithms in its Hello message and uses mandatory algorithms only.
An application can configure implemented algorithms only.
Definition at line 312 of file ZrtpConfigure.h.
Constructor & Destructor Documentation
ZrtpConfigure::ZrtpConfigure
(
)
ZrtpConfigure::~ZrtpConfigure
(
)
Member Function Documentation
int32_t ZrtpConfigure::addAlgo
(
AlgoTypes
algoType,
)
Add an algorithm to configuration data.
Adds the specified algorithm to the configuration data. If no free configuration data slot is available the function does not add the algorithm and returns -1. The methods appends the algorithm to the existing algorithms.
- Parameters
-
algoType Specifies which algorithm type to select
algo The enumeration of the algorithm to add.
- Returns
- Number of free configuration data slots or -1 on error
int32_t ZrtpConfigure::addAlgo
(
std::vector<
AlgorithmEnum * > &
a,
)
private
int32_t ZrtpConfigure::addAlgoAt
(
AlgoTypes
algoType,
int32_t
index
)
Add an algorithm to configuration data at given index.
Adds the specified algorithm to the configuration data vector at a given index. If the index is larger than the actual size of the configuration vector the method just appends the algorithm.
- Parameters
-
algoType Specifies which algorithm type to select
algo The enumeration of the algorithm to add.
index The index where to add the algorihm
- Returns
- Number of free configuration data slots or -1 on error
int32_t ZrtpConfigure::addAlgoAt
(
std::vector<
AlgorithmEnum * > &
a,
int32_t
index
)
private
void ZrtpConfigure::clear
(
)
Clear all configuration data.
The functions clears all configuration data.
bool ZrtpConfigure::containsAlgo
(
AlgoTypes
algoType,
)
Checks if the configuration data of the algorihm type already contains a specific algorithms.
- Parameters
-
algoType Specifies which algorithm type to select
algo The algorithm to check
- Returns
- True if the algorithm was found, false otherwise.
bool ZrtpConfigure::containsAlgo
(
std::vector<
AlgorithmEnum * > &
a,
)
private
Returns the identifier of the algorithm at index.
- Parameters
-
algoType Specifies which algorithm type to select
index The index in the list of the algorihm type
- Returns
- A pointer the the algorithm enumeration. If the index does not point to a configured slot then the function returns NULL.
int32_t ZrtpConfigure::getNumConfiguredAlgos
(
AlgoTypes
algoType )
Returns the number of configured algorithms.
- Parameters
-
algoType Specifies which algorithm type to select
- Returns
- The number of configured algorithms (used configuration data slots)
int32_t ZrtpConfigure::getNumConfiguredAlgos
(
std::vector<
AlgorithmEnum * > &
a )
private
bool ZrtpConfigure::isParanoidMode
(
)
Check status of paranoid mode.
- Returns
- Returns true if paranoid mode is enabled.
bool ZrtpConfigure::isSasSignature
(
)
Check status of SAS signature processing.
- Returns
- Returns true if certificate processing is enabled.
bool ZrtpConfigure::isTrustedMitM
(
)
Check status of trusted MitM processing.
- Returns
- Returns true if trusted MitM processing is enabled.
void ZrtpConfigure::printConfiguredAlgos
(
AlgoTypes
algoTyp )
Helper function to print some internal data.
void ZrtpConfigure::printConfiguredAlgos
(
std::vector<
AlgorithmEnum * > &
a )
private
int32_t ZrtpConfigure::removeAlgo
(
AlgoTypes
algoType,
)
Remove a algorithm from configuration data.
Removes the specified algorithm from configuration data. If the algorithm was not configured previously the function does not modify the configuration data and returns the number of free configuration data slots.
If an application removes all algorithms then ZRTP does not include any algorithm into the hello message and falls back to a predefined mandatory algorithm.
- Parameters
-
algoType Specifies which algorithm type to select
algo The enumeration of the algorithm to remove.
- Returns
- Number of free configuration slots.
int32_t ZrtpConfigure::removeAlgo
(
std::vector<
AlgorithmEnum * > &
a,
)
private
void ZrtpConfigure::setMandatoryOnly
(
)
Convenience function that sets the mandatory algorithms only.
Mandatory algorithms are:
-
Hash: SHA256
-
Symmetric Cipher: AES 128
-
Public Key Algorithm: DH3027, MultiStream
-
SAS type: libase 32
-
SRTP Authentication lengths: 32, 80
void ZrtpConfigure::setParanoidMode
(
bool
yesNo )
Enables or disables paranoid mode.
For further explanation of paranoid mode refer to the documentation of ZRtp class.
- Parameters
-
yesNo If set to true then paranoid mode is enabled.
void ZrtpConfigure::setSasSignature
(
bool
yesNo )
Enables or disables SAS signature processing.
For further details of trusted MitM processing refer to ZRTP specification, chapter 7.2
- Parameters
-
yesNo If set to true then certificate processing is enabled.
void ZrtpConfigure::setStandardConfig
(
)
Convenience function that sets a pre-defined standard configuration.
The standard configuration consists of the following algorithms:
-
Hash: SHA256
-
Symmetric Cipher: AES 128, AES 256
-
Public Key Algorithm: DH2048, DH3027, MultiStream
-
SAS type: libase 32
-
SRTP Authentication lengths: 32, 80
void ZrtpConfigure::setTrustedMitM
(
bool
yesNo )
Enables or disables trusted MitM processing.
For further details of trusted MitM processing refer to ZRTP specification, chapter 7.3
- Parameters
-
yesNo If set to true then trusted MitM processing is enabled.
Field Documentation
bool ZrtpConfigure::enableParanoidMode
private
bool ZrtpConfigure::enableSasSignature
private
bool ZrtpConfigure::enableTrustedMitM
private
const int ZrtpConfigure::maxNoOfAlgos = 7
static
Set the maximum number of algorithms per algorithm type that an application can configure.
Definition at line 321 of file ZrtpConfigure.h.
The documentation for this class was generated from the following file: