1 /*
2 Copyright (C) 2006-2010 Werner Dittmann
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef _ZRTPCALLBACK_H_
19 #define _ZRTPCALLBACK_H_
20
28 #include <string>
29 #include <stdint.h>
31
32 #ifndef __EXPORT
33 #if __GNUC__ >= 4
34 #define __EXPORT __attribute__ ((visibility("default")))
35 #define __LOCAL __attribute__ ((visibility("hidden")))
36 #elif defined _WIN32 || defined __CYGWIN__
37 #define __EXPORT __declspec(dllimport)
38 #define __LOCAL
39 #else
42 #endif
43 #endif
44
64
73
98
102 };
103
120
121 protected:
123
125
138 virtual int32_t sendDataZRTP(const uint8_t* data, int32_t length) =0;
139
148 virtual int32_t activateTimer(int32_t time) =0;
149
156 virtual int32_t cancelTimer() =0;
157
173
204
212
231 virtual void srtpSecretsOn(std::string c, std::string s, bool verified) =0;
232
243 virtual void handleGoClear() =0;
244
258
266 virtual void zrtpNotSuppOther() =0;
267
277 virtual void synchEnter() =0;
278
282 virtual void synchLeave() =0;
283
297
311
329 virtual void signSAS(uint8_t* sasHash) =0;
330
353 virtual bool checkSASSignature(uint8_t* sasHash) =0;
354 };
355
356 #endif // ZRTPCALLBACK
357
SrtpAlgorithms symEncAlgorithm
symmetrical cipher algorithm
Enable security for SRTP receiver.
The ZRTP info, warning, and error codes.
Use Skein as authentication algorithm.
__EXPORT AppLog & info(AppLog &sl)
Manipulator for info level.
This abstract class defines the callback functions required by GNU ZRTP.
This client is in ZRTP Initiator mode.
This structure contains pointers to the SRTP secrets and the role info.
Enable security for SRTP sender.
int32_t initKeyLen
Initiator's key length.
InfoEnrollment
Information codes for the Enrollment user callbacks.
Role role
ZRTP role of this client.
Use TwoFish as symmetrical cipher algorithm.
Role
This enum defines which role a ZRTP peer has.
int32_t respKeyLen
Responder's key length.
const uint8_t * keyInitiator
Initiator's key.
const uint8_t * saltInitiator
Initiator's salt.
int32_t respSaltLen
Responder's salt length.
const uint8_t * keyResponder
Responder's key.
SrtpAlgorithms
The algorihms that we support in SRTP and that ZRTP can negotiate.
Use AES as symmetrical cipher algorithm.
const uint8_t * saltResponder
Responder's salt.
SrtpAlgorithms authAlgorithm
SRTP authentication algorithm.
int32_t srtpAuthTagLen
SRTP authentication length.
This client is in ZRTP Responder mode.
int32_t initSaltLen
Initiator's salt length.
std::string sas
The SAS string.
Use Sha1 as authentication algorithm.
struct srtpSecrets SrtpSecret_t
This structure contains pointers to the SRTP secrets and the role info.