libcamgm
CommonData.hpp
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | _ _ _ _ __ _ |
4 | | | | | | \_/ | / \ | | |
5 | | | | | | |_| | / /\ \ | | |
6 | | |__ | | | | | | / ____ \ | |__ |
7 | |____||_| |_| |_|/ / \ \|____| |
8 | |
9 | ca-mgm library |
10 | |
11 | (C) SUSE Linux Products GmbH |
12 \----------------------------------------------------------------------/
13 
14  File: CommonData.hpp
15 
16  Author: <Michael Calmer> <mc@suse.de>
17  Maintainer: <Michael Calmer> <mc@suse.de>
18 
19  Purpose:
20 
21 /-*/
22 #ifndef CA_MGM_COMMON_DATA_HPP
23 #define CA_MGM_COMMON_DATA_HPP
24 
25 
26 #include <ca-mgm/String.hpp>
27 #include <list>
28 #include <vector>
29 #include <map>
30 #include <errno.h>
31 #include <stdint.h>
32 
33 #define REPOSITORY "/var/lib/CAM/"
34 
35 namespace CA_MGM_NAMESPACE {
36 
37  typedef std::list<std::string> StringList;
38 
39  enum Type {
47  };
48 
49  enum FormatType {
52  };
53 
54  enum KeyAlg {
58  };
59 
60  enum SigAlg {
64  };
65 
66  enum MD {
70  };
71 
73  {
74  E_GENERIC = -1,
75  E_C_EMPTY = -100, // value empty
76  E_ST_EMPTY = -101,
77  E_L_EMPTY = -102,
78  E_O_EMPTY = -103,
79  E_OU_EMPTY = -104,
80  E_CN_EMPTY = -105,
81  E_EM_EMPTY = -106,
82  E_C_NF = -110, // value not found
83  E_ST_NF = -111,
84  E_L_NF = -112,
85  E_O_NF = -113,
86  E_OU_NF = -114,
87  E_CN_NF = -115,
88  E_EM_NF = -116,
89  E_C_NM = -120, // (no match) value does not match CA
90  E_ST_NM = -121,
91  E_L_NM = -122,
92  E_O_NM = -123,
93  E_OU_NM = -124,
94  E_CN_NM = -125,
95  E_EM_NM = -126,
96  E_INVALID_PASSWD = -200, // invalid password
97  E_FILE_NOT_FOUND = ENOENT, //errno
98  E_FILE_EXISTS = EEXIST //errno
99  };
100 }
101 
102 #endif // CA_MGM_COMMON_DATA_HPP