Bayonne2 / Common C++ 2 Framework: ZrtpCWrapper.h Source File

Bayonne2 / Common C++ 2 Framework
ZrtpCWrapper.h
Go to the documentation of this file.
1 /*
2  This file defines the GNU ZRTP C-to-C++ wrapper.
3  Copyright (C) 2010 Werner Dittmann
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 */
19 
20 #ifndef ZRTPCWRAPPER_H
21 #define ZRTPCWRAPPER_H
22 
38 #include <stdint.h>
39 
55 /*
56  * Keep the following defines in sync with Role enumeration in ZrtpCallback.h
57  */
58  #define Responder 1
59  #define Initiator 2
61  #define CRC_SIZE 4
62  #define ZRTP_MAGIC 0x5a525450
63  #define MAX_ZRTP_SIZE 3072
65 /*
66  * IMPORTANT: keep the following enums in synch with ZrtpCodes. We copy them here
67  * to avoid any C++ header includes and defines. The protocol states are located
68  * ZrtpStateClass.h .
69  */
70 
103  enum zrtp_MessageSeverity {
104   zrtp_Info = 1,
105   zrtp_Warning,
106   zrtp_Severe,
107   zrtp_ZrtpError
108 };
109 
113  enum zrtp_InfoCodes {
114   zrtp_InfoHelloReceived = 1,
115   zrtp_InfoCommitDHGenerated,
116   zrtp_InfoRespCommitReceived,
117   zrtp_InfoDH1DHGenerated,
118   zrtp_InfoInitDH1Received,
119   zrtp_InfoRespDH2Received,
120   zrtp_InfoInitConf1Received,
121   zrtp_InfoRespConf2Received,
122   zrtp_InfoRSMatchFound,
123   zrtp_InfoSecureStateOn,
124   zrtp_InfoSecureStateOff
125 };
126 
130  enum zrtp_WarningCodes {
131   zrtp_WarningDHAESmismatch = 1,
132   zrtp_WarningGoClearReceived,
133   zrtp_WarningDHShort,
134   zrtp_WarningNoRSMatch,
135   zrtp_WarningCRCmismatch,
136   zrtp_WarningSRTPauthError,
137   zrtp_WarningSRTPreplayError,
138   zrtp_WarningNoExpectedRSMatch
139 };
140 
144  enum zrtp_SevereCodes {
145   zrtp_SevereHelloHMACFailed = 1,
146   zrtp_SevereCommitHMACFailed,
147   zrtp_SevereDH1HMACFailed,
148   zrtp_SevereDH2HMACFailed,
149   zrtp_SevereCannotSend,
150   zrtp_SevereProtocolError,
151   zrtp_SevereNoTimer,
152   zrtp_SevereTooMuchRetries
153 };
154 
166  enum zrtp_ZrtpErrorCodes {
167   zrtp_MalformedPacket = 0x10,
168   zrtp_CriticalSWError = 0x20,
169   zrtp_UnsuppZRTPVersion = 0x30,
170   zrtp_HelloCompMismatch = 0x40,
171   zrtp_UnsuppHashType = 0x51,
172   zrtp_UnsuppCiphertype = 0x52,
173   zrtp_UnsuppPKExchange = 0x53,
174   zrtp_UnsuppSRTPAuthTag = 0x54,
175   zrtp_UnsuppSASScheme = 0x55,
176   zrtp_NoSharedSecret = 0x56,
177   zrtp_DHErrorWrongPV = 0x61,
178   zrtp_DHErrorWrongHVI = 0x62,
179   zrtp_SASuntrustedMiTM = 0x63,
180   zrtp_ConfirmHMACWrong = 0x70,
181   zrtp_NonceReused = 0x80,
182   zrtp_EqualZIDHello = 0x90,
183   zrtp_GoCleatNotAllowed = 0x100,
184   zrtp_IgnorePacket = 0x7fffffff
185 };
186 
190  enum zrtp_InfoEnrollment {
191   zrtp_EnrollmentRequest,
192   zrtp_EnrollmentCanceled,
193   zrtp_EnrollmentFailed,
194   zrtp_EnrollmentOk
195 };
196 
197 /* The ZRTP protocol states */
198  enum zrtpStates {
199   Initial,
200   Detect,
201   AckDetected,
202   AckSent,
203   WaitCommit,
204   CommitSent,
205   WaitDHPart2,
206   WaitConfirm1,
207   WaitConfirm2,
208   WaitConfAck,
209   WaitClearAck,
210   SecureState,
211   WaitErrorAck,
212   numberOfStates
213 };
214 
216  typedef enum {
217   zrtp_Aes = 1,
218   zrtp_TwoFish,
219   zrtp_Sha1,
220   zrtp_Skein
221 } zrtp_SrtpAlgorithms;
222 
231  typedef struct c_srtpSecrets
232 {
233   zrtp_SrtpAlgorithms symEncAlgorithm;
234   const uint8_t* keyInitiator;
235   int32_t initKeyLen;
236   const uint8_t* saltInitiator;
237   int32_t initSaltLen;
238   const uint8_t* keyResponder;
239   int32_t respKeyLen;
240   const uint8_t* saltResponder;
241   int32_t respSaltLen;
242   zrtp_SrtpAlgorithms authAlgorithm;
243   int32_t srtpAuthTagLen;
244   char* sas;
245   int32_t role;
246 } C_SrtpSecret_t;
247 
248 /*
249  * Keep the following defines in sync with enum EnableSecurity in ZrtpCallback.h
250  */
251  #define ForReceiver 1
252  #define ForSender 2
254 #ifdef __cplusplus
255 #pragma GCC visibility push(default)
256 extern "C"
257 {
258 #endif
259 
260   typedef struct ZRtp ZRtp;
261   typedef struct ZrtpCallbackWrapper ZrtpCallbackWrapper;
262   typedef struct ZrtpConfigure ZrtpConfigure;
263 
264 
265   typedef struct zrtpContext
266  {
267   ZRtp* zrtpEngine;
268   ZrtpCallbackWrapper* zrtpCallback;
269   ZrtpConfigure* configure;
270   void* userData;
271  } ZrtpContext;
272 
294   typedef struct zrtp_Callbacks
295  {
311   int32_t (*zrtp_sendDataZRTP) (ZrtpContext* ctx, const uint8_t* data, int32_t length ) ;
312 
323   int32_t (*zrtp_activateTimer) (ZrtpContext* ctx, int32_t time ) ;
324 
333   int32_t (*zrtp_cancelTimer)(ZrtpContext* ctx) ;
334 
351   void (*zrtp_sendInfo) (ZrtpContext* ctx, int32_t severity, int32_t subCode ) ;
352 
384   int32_t (*zrtp_srtpSecretsReady) (ZrtpContext* ctx, C_SrtpSecret_t* secrets, int32_t part ) ;
385 
394   void (*zrtp_srtpSecretsOff) (ZrtpContext* ctx, int32_t part ) ;
395 
416   void (*zrtp_rtpSecretsOn) (ZrtpContext* ctx, char* c, char* s, int32_t verified ) ;
417 
430   void (*zrtp_handleGoClear)(ZrtpContext* ctx) ;
431 
446   void (*zrtp_zrtpNegotiationFailed) (ZrtpContext* ctx, int32_t severity, int32_t subCode ) ;
447 
457   void (*zrtp_zrtpNotSuppOther)(ZrtpContext* ctx) ;
458 
471   void (*zrtp_synchEnter)(ZrtpContext* ctx) ;
472 
479   void (*zrtp_synchLeave)(ZrtpContext* ctx) ;
480 
495   void (*zrtp_zrtpAskEnrollment) (ZrtpContext* ctx, int32_t info) ;
496 
511   void (*zrtp_zrtpInformEnrollment) (ZrtpContext* ctx, int32_t info ) ;
512 
532   void (*zrtp_signSAS)(ZrtpContext* ctx, uint8_t* sas) ;
533 
558   int32_t (*zrtp_checkSASSignature) (ZrtpContext* ctx, uint8_t* sas ) ;
559  } zrtp_Callbacks;
560 
568  ZrtpContext* zrtp_CreateWrapper();
569 
604  void zrtp_initializeZrtpEngine(ZrtpContext* zrtpContext,
605  zrtp_Callbacks *cb,
606  const char* id,
607  const char* zidFilename,
608  void* userData,
609  int32_t mitmMode);
610 
614  void zrtp_DestroyWrapper (ZrtpContext* zrtpContext);
615 
629  int32_t zrtp_CheckCksum(uint8_t* buffer, uint16_t length, uint32_t crc);
630 
641  uint32_t zrtp_GenerateCksum(uint8_t* buffer, uint16_t length);
642 
650  uint32_t zrtp_EndCksum(uint32_t crc);
651 
665  void zrtp_startZrtpEngine(ZrtpContext* zrtpContext);
666 
676  void zrtp_stopZrtpEngine(ZrtpContext* zrtpContext);
677 
696  void zrtp_processZrtpMessage(ZrtpContext* zrtpContext, uint8_t *extHeader, uint32_t peerSSRC);
697 
710  void zrtp_processTimeout(ZrtpContext* zrtpContext);
711 
712  /*
713  * Check for and handle GoClear ZRTP packet header.
714  *
715  * This method checks if this is a GoClear packet. If not, just return
716  * false. Otherwise handle it according to the specification.
717  *
718  * @param zrtpContext
719  * Pointer to the opaque ZrtpContext structure.
720  * @param extHeader
721  * A pointer to the first byte of the extension header. Refer to
722  * RFC3550.
723  * @return
724  * False if not a GoClear, true otherwise.
725  *
726  int32_t zrtp_handleGoClear(ZrtpContext* zrtpContext, uint8_t *extHeader);
727  */
728 
742  void zrtp_setAuxSecret(ZrtpContext* zrtpContext, uint8_t* data, int32_t length);
743 
757  int32_t zrtp_inState(ZrtpContext* zrtpContext, int32_t state);
758 
768  void zrtp_SASVerified(ZrtpContext* zrtpContext);
769 
776  void zrtp_resetSASVerified(ZrtpContext* zrtpContext);
777 
797  char* zrtp_getHelloHash(ZrtpContext* zrtpContext);
798 
814  char* zrtp_getPeerHelloHash(ZrtpContext* zrtpContext);
815 
839  char* zrtp_getMultiStrParams(ZrtpContext* zrtpContext, int32_t *length);
840 
860  void zrtp_setMultiStrParams(ZrtpContext* zrtpContext, char* parameters, int32_t length);
861 
873  int32_t zrtp_isMultiStream(ZrtpContext* zrtpContext);
874 
886  int32_t zrtp_isMultiStreamAvailable(ZrtpContext* zrtpContext);
887 
902  void zrtp_acceptEnrollment(ZrtpContext* zrtpContext, int32_t accepted);
903 
915  int32_t zrtp_isEnrollmentMode(ZrtpContext* zrtpContext);
916 
930  void zrtp_setEnrollmentMode(ZrtpContext* zrtpContext, int32_t enrollmentMode);
931 
941  int32_t isPeerEnrolled(ZrtpContext* zrtpContext);
942 
955  int32_t zrtp_sendSASRelayPacket(ZrtpContext* zrtpContext, uint8_t* sh, char* render);
956 
964  const char* zrtp_getSasType(ZrtpContext* zrtpContext);
965 
978  uint8_t* zrtp_getSasHash(ZrtpContext* zrtpContext);
979 
1001  int32_t zrtp_setSignatureData(ZrtpContext* zrtpContext, uint8_t* data, int32_t length);
1002 
1017  const uint8_t* zrtp_getSignatureData(ZrtpContext* zrtpContext);
1018 
1031  int32_t zrtp_getSignatureLength(ZrtpContext* zrtpContext);
1032 
1046  void zrtp_conf2AckSecure(ZrtpContext* zrtpContext);
1047 
1068  int32_t zrtp_getPeerZid(ZrtpContext* zrtpContext, uint8_t* data);
1069 
1070 
1075  /* Keep in synch with enumeration in ZrtpConfigure.h */
1076 
1077   typedef enum zrtp_AlgoTypes {
1078   zrtp_HashAlgorithm = 1, zrtp_CipherAlgorithm, zrtp_PubKeyAlgorithm, zrtp_SasType, zrtp_AuthLength
1079  } Zrtp_AlgoTypes;
1080 
1105  int32_t zrtp_InitializeConfig (ZrtpContext* zrtpContext);
1106 
1120  char** zrtp_getAlgorithmNames(ZrtpContext* zrtpContext, Zrtp_AlgoTypes type);
1121 
1131  void zrtp_freeAlgorithmNames(char** names);
1132 
1148  void zrtp_setStandardConfig(ZrtpContext* zrtpContext);
1149 
1165  void zrtp_setMandatoryOnly(ZrtpContext* zrtpContext);
1166 
1175  void zrtp_confClear(ZrtpContext* zrtpContext);
1176 
1194  int32_t zrtp_addAlgo(ZrtpContext* zrtpContext, Zrtp_AlgoTypes algoType, const char* algo);
1195 
1214  int32_t zrtp_addAlgoAt(ZrtpContext* zrtpContext, Zrtp_AlgoTypes algoType, const char* algo, int32_t index);
1215 
1237  int32_t zrtp_removeAlgo(ZrtpContext* zrtpContext, Zrtp_AlgoTypes algoType, const char* algo);
1238 
1250  int32_t zrtp_getNumConfiguredAlgos(ZrtpContext* zrtpContext, Zrtp_AlgoTypes algoType);
1251 
1267  const char* zrtp_getAlgoAt(ZrtpContext* zrtpContext, Zrtp_AlgoTypes algoType, int32_t index);
1268 
1283  int32_t zrtp_containsAlgo(ZrtpContext* zrtpContext, Zrtp_AlgoTypes algoType, const char* algo);
1284 
1296  void zrtp_setTrustedMitM(ZrtpContext* zrtpContext, int32_t yesNo);
1297 
1306  int32_t zrtp_isTrustedMitM(ZrtpContext* zrtpContext);
1307 
1319  void zrtp_setSasSignature(ZrtpContext* zrtpContext, int32_t yesNo);
1320 
1329  int32_t zrtp_isSasSignature(ZrtpContext* zrtpContext);
1330 
1331 #ifdef __cplusplus
1332 }
1333 #pragma GCC visibility pop
1334 #endif
1335 
1339 #endif
ZrtpConfigure
ZRTP configuration data.
Definition: ZrtpConfigure.h:312
zrtp_conf2AckSecure
void zrtp_conf2AckSecure(ZrtpContext *zrtpContext)
Emulate a Conf2Ack packet.
zrtp_addAlgo
int32_t zrtp_addAlgo(ZrtpContext *zrtpContext, Zrtp_AlgoTypes algoType, const char *algo)
Add an algorithm to configuration data.
zrtp_SevereCodes
zrtp_SevereCodes
Sub-codes for Severe.
Definition: ZrtpCWrapper.h:144
zrtp_EnrollmentFailed
Enrollment process failed, no PBX secret available.
Definition: ZrtpCWrapper.h:193
zrtp_Callbacks::zrtp_srtpSecretsOff
void(* zrtp_srtpSecretsOff)(ZrtpContext *ctx, int32_t part)
Switch off the security for the defined part.
Definition: ZrtpCWrapper.h:394
c_srtpSecrets::saltInitiator
const uint8_t * saltInitiator
Definition: ZrtpCWrapper.h:236
zrtp_setSasSignature
void zrtp_setSasSignature(ZrtpContext *zrtpContext, int32_t yesNo)
Enables or disables SAS signature processing.
zrtp_inState
int32_t zrtp_inState(ZrtpContext *zrtpContext, int32_t state)
Check current state of the ZRTP state engine.
c_srtpSecrets::initKeyLen
int32_t initKeyLen
Definition: ZrtpCWrapper.h:235
zrtp_getSasType
const char * zrtp_getSasType(ZrtpContext *zrtpContext)
Get the commited SAS rendering algorithm for this ZRTP session.
zrtp_Callbacks::zrtp_zrtpNotSuppOther
void(* zrtp_zrtpNotSuppOther)(ZrtpContext *ctx)
ZRTP calls this method if the other side does not support ZRTP.
Definition: ZrtpCWrapper.h:457
zrtp_getHelloHash
char * zrtp_getHelloHash(ZrtpContext *zrtpContext)
Get the ZRTP Hello Hash data.
zrtp_processTimeout
void zrtp_processTimeout(ZrtpContext *zrtpContext)
Process a timeout event.
zrtp_CheckCksum
int32_t zrtp_CheckCksum(uint8_t *buffer, uint16_t length, uint32_t crc)
Computes the ZRTP checksum over a received ZRTP packet buffer and compares the result with received c...
zrtp_stopZrtpEngine
void zrtp_stopZrtpEngine(ZrtpContext *zrtpContext)
Stop ZRTP security.
zrtp_setMandatoryOnly
void zrtp_setMandatoryOnly(ZrtpContext *zrtpContext)
Convenience function that sets the mandatory algorithms only.
zrtp_isMultiStream
int32_t zrtp_isMultiStream(ZrtpContext *zrtpContext)
Check if this ZRTP session is a Multi-stream session.
c_srtpSecrets::initSaltLen
int32_t initSaltLen
Definition: ZrtpCWrapper.h:237
c_srtpSecrets::saltResponder
const uint8_t * saltResponder
Definition: ZrtpCWrapper.h:240
C_SrtpSecret_t
struct c_srtpSecrets C_SrtpSecret_t
This structure contains pointers to the SRTP secrets and the role info.
zrtp_EnrollmentOk
Enrollment process for this PBX was ok.
Definition: ZrtpCWrapper.h:194
zrtp_ZrtpErrorCodes
zrtp_ZrtpErrorCodes
Error codes according to the ZRTP specification chapter 6.9.
Definition: ZrtpCWrapper.h:166
info
__EXPORT AppLog & info(AppLog &sl)
Manipulator for info level.
Definition: applog.h:581
zrtp_EnrollmentRequest
Aks user to confirm or deny an Enrollemnt request.
Definition: ZrtpCWrapper.h:191
zrtpContext::userData
void * userData
Definition: ZrtpCWrapper.h:270
zrtp_getSignatureLength
int32_t zrtp_getSignatureLength(ZrtpContext *zrtpContext)
Get length of signature data.
zrtp_getNumConfiguredAlgos
int32_t zrtp_getNumConfiguredAlgos(ZrtpContext *zrtpContext, Zrtp_AlgoTypes algoType)
Returns the number of configured algorithms.
zrtp_initializeZrtpEngine
void zrtp_initializeZrtpEngine(ZrtpContext *zrtpContext, zrtp_Callbacks *cb, const char *id, const char *zidFilename, void *userData, int32_t mitmMode)
Initialize the ZRTP protocol engine.
zrtp_Callbacks::zrtp_zrtpInformEnrollment
void(* zrtp_zrtpInformEnrollment)(ZrtpContext *ctx, int32_t info)
Inform about PBX enrollment result.
Definition: ZrtpCWrapper.h:511
zrtp_getSignatureData
const uint8_t * zrtp_getSignatureData(ZrtpContext *zrtpContext)
Get signature data.
zrtp_getPeerHelloHash
char * zrtp_getPeerHelloHash(ZrtpContext *zrtpContext)
Get the peer's ZRTP Hello Hash data.
zrtp_removeAlgo
int32_t zrtp_removeAlgo(ZrtpContext *zrtpContext, Zrtp_AlgoTypes algoType, const char *algo)
Remove a algorithm from configuration data.
zrtp_AlgoTypes
zrtp_AlgoTypes
This enumerations list all configurable algorithm types.
Definition: ZrtpCWrapper.h:1077
c_srtpSecrets
This structure contains pointers to the SRTP secrets and the role info.
Definition: ZrtpCWrapper.h:231
zrtp_Callbacks::zrtp_cancelTimer
int32_t(* zrtp_cancelTimer)(ZrtpContext *ctx)
Cancel the active timer.
Definition: ZrtpCWrapper.h:333
zrtp_EnrollmentCanceled
User did not confirm the PBX enrollement.
Definition: ZrtpCWrapper.h:192
c_srtpSecrets::respKeyLen
int32_t respKeyLen
Definition: ZrtpCWrapper.h:239
zrtp_getPeerZid
int32_t zrtp_getPeerZid(ZrtpContext *zrtpContext, uint8_t *data)
Get other party's ZID (ZRTP Identifier) data.
zrtpContext::zrtpCallback
ZrtpCallbackWrapper * zrtpCallback
Definition: ZrtpCWrapper.h:268
Zrtp_AlgoTypes
enum zrtp_AlgoTypes Zrtp_AlgoTypes
This enumerations list all configurable algorithm types.
c_srtpSecrets::keyResponder
const uint8_t * keyResponder
Definition: ZrtpCWrapper.h:238
zrtp_Callbacks::zrtp_signSAS
void(* zrtp_signSAS)(ZrtpContext *ctx, uint8_t *sas)
Request a SAS signature.
Definition: ZrtpCWrapper.h:532
zrtp_GenerateCksum
uint32_t zrtp_GenerateCksum(uint8_t *buffer, uint16_t length)
Computes the ZRTP checksum over a newly created ZRTP packet buffer.
zrtp_Callbacks::zrtp_sendInfo
void(* zrtp_sendInfo)(ZrtpContext *ctx, int32_t severity, int32_t subCode)
Send information messages to the hosting environment.
Definition: ZrtpCWrapper.h:351
zrtp_Callbacks::zrtp_srtpSecretsReady
int32_t(* zrtp_srtpSecretsReady)(ZrtpContext *ctx, C_SrtpSecret_t *secrets, int32_t part)
SRTP crypto data ready for the sender or receiver.
Definition: ZrtpCWrapper.h:384
c_srtpSecrets::symEncAlgorithm
zrtp_SrtpAlgorithms symEncAlgorithm
Definition: ZrtpCWrapper.h:233
zrtp_setMultiStrParams
void zrtp_setMultiStrParams(ZrtpContext *zrtpContext, char *parameters, int32_t length)
Set Multi-stream parameters.
zrtp_processZrtpMessage
void zrtp_processZrtpMessage(ZrtpContext *zrtpContext, uint8_t *extHeader, uint32_t peerSSRC)
Process RTP extension header.
zrtp_getSasHash
uint8_t * zrtp_getSasHash(ZrtpContext *zrtpContext)
Get the computed SAS hash for this ZRTP session.
zrtp_SASVerified
void zrtp_SASVerified(ZrtpContext *zrtpContext)
Set SAS as verified.
zrtp_CreateWrapper
ZrtpContext * zrtp_CreateWrapper()
Create the GNU ZRTP C wrapper.
zrtp_setTrustedMitM
void zrtp_setTrustedMitM(ZrtpContext *zrtpContext, int32_t yesNo)
Enables or disables trusted MitM processing.
isPeerEnrolled
int32_t isPeerEnrolled(ZrtpContext *zrtpContext)
Check if a peer's cache entry has a vaild MitM key.
zrtp_setAuxSecret
void zrtp_setAuxSecret(ZrtpContext *zrtpContext, uint8_t *data, int32_t length)
Set the auxilliary secret.
zrtp_startZrtpEngine
void zrtp_startZrtpEngine(ZrtpContext *zrtpContext)
Kick off the ZRTP protocol engine.
c_srtpSecrets::role
int32_t role
Definition: ZrtpCWrapper.h:245
zrtp_Callbacks::zrtp_rtpSecretsOn
void(* zrtp_rtpSecretsOn)(ZrtpContext *ctx, char *c, char *s, int32_t verified)
Switch on the security.
Definition: ZrtpCWrapper.h:416
zrtp_isMultiStreamAvailable
int32_t zrtp_isMultiStreamAvailable(ZrtpContext *zrtpContext)
Check if the other ZRTP client supports Multi-stream.
zrtp_freeAlgorithmNames
void zrtp_freeAlgorithmNames(char **names)
Free storage used to store the algorithm names.
zrtp_setStandardConfig
void zrtp_setStandardConfig(ZrtpContext *zrtpContext)
Convenience function that sets a pre-defined standard configuration.
zrtp_EndCksum
uint32_t zrtp_EndCksum(uint32_t crc)
Prepares the ZRTP checksum for appending to ZRTP packet.
zrtp_resetSASVerified
void zrtp_resetSASVerified(ZrtpContext *zrtpContext)
Reset the SAS verfied flag for the current active user's retained secrets.
zrtp_isEnrollmentMode
int32_t zrtp_isEnrollmentMode(ZrtpContext *zrtpContext)
Check the state of the enrollment mode.
zrtp_SrtpAlgorithms
zrtp_SrtpAlgorithms
Definition: ZrtpCWrapper.h:216
c_srtpSecrets::srtpAuthTagLen
int32_t srtpAuthTagLen
Definition: ZrtpCWrapper.h:243
c_srtpSecrets::sas
char * sas
Definition: ZrtpCWrapper.h:244
zrtp_DestroyWrapper
void zrtp_DestroyWrapper(ZrtpContext *zrtpContext)
Destroy the ZRTP wrapper and its underlying objects.
ZRtp
struct ZRtp ZRtp
Definition: ZrtpCWrapper.h:260
zrtp_InfoEnrollment
zrtp_InfoEnrollment
Information codes for the Enrollment user callbacks.
Definition: ZrtpCWrapper.h:190
zrtp_isTrustedMitM
int32_t zrtp_isTrustedMitM(ZrtpContext *zrtpContext)
Check status of trusted MitM processing.
zrtp_Callbacks::zrtp_zrtpNegotiationFailed
void(* zrtp_zrtpNegotiationFailed)(ZrtpContext *ctx, int32_t severity, int32_t subCode)
Handle ZRTP negotiation failed.
Definition: ZrtpCWrapper.h:446
zrtp_confClear
void zrtp_confClear(ZrtpContext *zrtpContext)
Clear all configuration data.
zrtp_Callbacks
struct zrtp_Callbacks zrtp_Callbacks
This structure defines the callback functions required by GNU ZRTP.
zrtp_setEnrollmentMode
void zrtp_setEnrollmentMode(ZrtpContext *zrtpContext, int32_t enrollmentMode)
Check the state of the enrollment mode.
c_srtpSecrets::authAlgorithm
zrtp_SrtpAlgorithms authAlgorithm
Definition: ZrtpCWrapper.h:242
zrtp_WarningCodes
zrtp_WarningCodes
Sub-codes for Warning.
Definition: ZrtpCWrapper.h:130
c_srtpSecrets::respSaltLen
int32_t respSaltLen
Definition: ZrtpCWrapper.h:241
zrtp_Callbacks::zrtp_checkSASSignature
int32_t(* zrtp_checkSASSignature)(ZrtpContext *ctx, uint8_t *sas)
ZRTPQueue calls this method to request a SAS signature check.
Definition: ZrtpCWrapper.h:558
zrtp_Callbacks::zrtp_handleGoClear
void(* zrtp_handleGoClear)(ZrtpContext *ctx)
This method handles GoClear requests.
Definition: ZrtpCWrapper.h:430
zrtpContext::zrtpEngine
ZRtp * zrtpEngine
Definition: ZrtpCWrapper.h:267
zrtp_acceptEnrollment
void zrtp_acceptEnrollment(ZrtpContext *zrtpContext, int32_t accepted)
Accept a PBX enrollment request.
ZrtpContext
struct zrtpContext ZrtpContext
zrtp_setSignatureData
int32_t zrtp_setSignatureData(ZrtpContext *zrtpContext, uint8_t *data, int32_t length)
Set signature data.
zrtp_isSasSignature
int32_t zrtp_isSasSignature(ZrtpContext *zrtpContext)
Check status of SAS signature processing.
zrtp_Callbacks
This structure defines the callback functions required by GNU ZRTP.
Definition: ZrtpCWrapper.h:294
zrtp_Callbacks::zrtp_activateTimer
int32_t(* zrtp_activateTimer)(ZrtpContext *ctx, int32_t time)
Activate timer.
Definition: ZrtpCWrapper.h:323
zrtp_Callbacks::zrtp_zrtpAskEnrollment
void(* zrtp_zrtpAskEnrollment)(ZrtpContext *ctx, int32_t info)
Inform about a PBX enrollment request.
Definition: ZrtpCWrapper.h:495
ZrtpCallbackWrapper
struct ZrtpCallbackWrapper ZrtpCallbackWrapper
Definition: ZrtpCWrapper.h:261
zrtp_Callbacks::zrtp_synchLeave
void(* zrtp_synchLeave)(ZrtpContext *ctx)
Leave synchronization mutex.
Definition: ZrtpCWrapper.h:479
zrtp_Callbacks::zrtp_synchEnter
void(* zrtp_synchEnter)(ZrtpContext *ctx)
Enter synchronization mutex.
Definition: ZrtpCWrapper.h:471
zrtp_InitializeConfig
int32_t zrtp_InitializeConfig(ZrtpContext *zrtpContext)
Initialize the GNU ZRTP Configure data.
zrtpContext::configure
ZrtpConfigure * configure
Definition: ZrtpCWrapper.h:269
zrtpStates
zrtpStates
Definition: ZrtpCWrapper.h:198
zrtp_InfoCodes
zrtp_InfoCodes
Sub-codes for Info.
Definition: ZrtpCWrapper.h:113
c_srtpSecrets::keyInitiator
const uint8_t * keyInitiator
Definition: ZrtpCWrapper.h:234
zrtp_MessageSeverity
zrtp_MessageSeverity
This enum defines the information message severity.
Definition: ZrtpCWrapper.h:103
zrtp_getMultiStrParams
char * zrtp_getMultiStrParams(ZrtpContext *zrtpContext, int32_t *length)
Get Multi-stream parameters.
zrtp_getAlgorithmNames
char ** zrtp_getAlgorithmNames(ZrtpContext *zrtpContext, Zrtp_AlgoTypes type)
Get names of all available algorithmes of a given algorithm type.
zrtp_getAlgoAt
const char * zrtp_getAlgoAt(ZrtpContext *zrtpContext, Zrtp_AlgoTypes algoType, int32_t index)
Returns the identifier of the algorithm at index.
zrtp_sendSASRelayPacket
int32_t zrtp_sendSASRelayPacket(ZrtpContext *zrtpContext, uint8_t *sh, char *render)
Send the SAS relay packet.
zrtp_addAlgoAt
int32_t zrtp_addAlgoAt(ZrtpContext *zrtpContext, Zrtp_AlgoTypes algoType, const char *algo, int32_t index)
Add an algorithm to configuration data at given index.
zrtp_Callbacks::zrtp_sendDataZRTP
int32_t(* zrtp_sendDataZRTP)(ZrtpContext *ctx, const uint8_t *data, int32_t length)
Send a ZRTP packet via RTP.
Definition: ZrtpCWrapper.h:311
zrtp_containsAlgo
int32_t zrtp_containsAlgo(ZrtpContext *zrtpContext, Zrtp_AlgoTypes algoType, const char *algo)
Checks if the configuration data of the algorihm type already contains a specific algorithms...

Generated on Dec 21, 2017 for commoncpp2-1.8.1, ccrtp-1.7.2, libzrtpcpp-2.3.4, ccscript3-1.1.7, ccaudio2-1.0.0 and bayonne2-2.3.2 (after installation in /usr/local/) by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /