bZRTP
bZRTP is an opensource implementation of ZRTP keys exchange protocol
zidCache.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2019 Belledonne Communications SARL.
3  *
4  * This file is part of bzrtp.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef ZIDCACHE_H
20 #define ZIDCACHE_H
21 
22 #include "typedef.h"
23 
24 
35 
54 #define BZRTP_ZIDCACHE_DONT_INSERT_ZUID 0
55 #define BZRTP_ZIDCACHE_INSERT_ZUID 1
56 BZRTP_EXPORT int bzrtp_cache_getZuid(void *dbPointer, const char *selfURI, const char *peerURI, const uint8_t peerZID[12], const uint8_t insertFlag, int *zuid, bctbx_mutex_t *zidCacheMutex);
57 
76 BZRTP_EXPORT int bzrtp_cache_write_active(bzrtpContext_t *context, const char *tableName, const char **columns, uint8_t **values, size_t *lengths, uint8_t columnsCount);
77 
78 #endif /* ZIDCACHE_H */
#define BZRTP_EXPORT
Definition: bzrtp.h:41
BZRTP_EXPORT int bzrtp_cache_getZuid(void *dbPointer, const char *selfURI, const char *peerURI, const uint8_t peerZID[12], const uint8_t insertFlag, int *zuid, bctbx_mutex_t *zidCacheMutex)
Definition: zidCache.c:1307
unsigned char uint8_t
Definition: stdint.h:78
BZRTP_EXPORT int bzrtp_getPeerAssociatedSecrets(bzrtpContext_t *context, uint8_t peerZID[12])
Parse the cache to find secrets associated to the given ZID, set them and their length in the context...
Definition: zidCache.c:1256
BZRTP_EXPORT int bzrtp_cache_write_active(bzrtpContext_t *context, const char *tableName, const char **columns, uint8_t **values, size_t *lengths, uint8_t columnsCount)
This is a convenience wrapper to the bzrtp_cache_write function which will also take care of setting ...
Definition: zidCache.c:1279
structure of the ZRTP engine context Store current state, timers, HMAC and encryption keys ...
Definition: typedef.h:202