Added SSH public key support to SKR
[crypto.git] / lib / silcskr / silcskr_i.h
1 /*
2
3   silcskr_i.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 2005 - 2008 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 #ifndef SILCSKR_I_H
21 #define SILCSKR_I_H
22
23 #ifndef SILCSKR_H
24 #error "Do not include this header directly"
25 #endif
26
27 /* Internal representation of SilcSKRKey context. */
28 typedef struct {
29   struct SilcSKRKeyStruct key;             /* Key data */
30   SilcInt32 refcnt;                        /* Reference counter */
31 } *SilcSKRKeyInternal;
32
33 /* Key Repository context */
34 struct SilcSKRObject {
35   SilcSchedule scheduler;
36   SilcMutex lock;                         /* Repository lock */
37   SilcHashTable keys;                     /* All keys in repository */
38 };
39
40 /* Find context */
41 struct SilcSKRFindStruct {
42   SilcHashTable constr;                    /* Search constraints */
43 };
44
45 /* Backwards support */
46 #define SILC_SKR_OK SILC_OK
47 #define SILC_SKR_ERROR SILC_ERR
48 #define SILC_SKR_ALREADY_EXIST SILC_ERR_ALREADY_EXISTS
49 #define SILC_SKR_NOT_FOUND SILC_ERR_NOT_FOUND
50 #define SILC_SKR_NO_MEMORY SILC_ERR_OUT_OF_MEMORY
51 #define SILC_SKR_UNSUPPORTED_TYPE SILC_ERR_NOT_SUPPORTED
52
53 #endif /* SILCSKR_I_H */