5 * Key management error codes
7 * (c) 2004 Straylight/Edgeware
10 /*----- Licensing notice --------------------------------------------------*
12 * This file is part of Catacomb.
14 * Catacomb is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Library General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
19 * Catacomb is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Library General Public License for more details.
24 * You should have received a copy of the GNU Library General Public
25 * License along with Catacomb; if not, write to the Free
26 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
30 #ifndef CATACOMB_KEY_ERROR_H
31 #define CATACOMB_KEY_ERROR_H
37 /*----- Error codes -------------------------------------------------------*/
40 KERR_OK
= 0, /* No error */
41 KERR_BADTAG
= -1, /* Malformed tag string */
42 KERR_BADTYPE
= -2, /* Malformed type string */
43 KERR_BADCOMMENT
= -3, /* Malformed comment string */
44 KERR_DUPID
= -4, /* Duplicate keyid */
45 KERR_DUPTAG
= -5, /* Duplicate key tag string */
46 KERR_READONLY
= -6, /* Key file is read-only */
47 KERR_WILLEXPIRE
= -7, /* Key will eventually expire */
48 KERR_EXPIRED
= -8, /* Key has already expired */
49 KERR_BADFLAGS
= -9, /* Error in flags string */
50 KERR_BADPASS
= -10, /* Error decrypting locked key */
51 KERR_WRONGTYPE
= -11, /* Key has incorrect type */
52 KERR_NOTFOUND
= -12, /* Key couldn't be found */
53 KERR_BADATTR
= -13, /* Malformed attribute name */
54 KERR_MALFORMED
= -14, /* Key data is malformed */
55 KERR_IO
= -15, /* I/O error of some kind */
56 KERR_MAX
= -16 /* Not useful */
59 /*----- Functions provided ------------------------------------------------*/
61 /* --- @key_strerror@ --- *
63 * Arguments: @int err@ = error code from @key_new@
65 * Returns: Pointer to error string.
67 * Use: Translates a @KERR@ error code into a human-readable string.
70 extern const char *key_strerror(int /*err*/);
72 /*----- That's all, folks -------------------------------------------------*/