limal-ca-mgm
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 LIMAL_CA_MGM_COMMON_DATA_HPP
23 #define LIMAL_CA_MGM_COMMON_DATA_HPP
24 
25 #include <blocxx/Types.hpp>
26 #include <blocxx/String.hpp>
27 #include <blocxx/List.hpp>
28 #include <blocxx/Array.hpp>
29 #include <blocxx/Map.hpp>
30 #include <errno.h>
31 
32 #define REPOSITORY "/var/lib/CAM/"
33 
34 namespace LIMAL_NAMESPACE {
35 
36 namespace CA_MGM_NAMESPACE {
37 
39  typedef blocxx::List<String> StringList;
40 
41  enum Type {
49  };
50 
51  enum FormatType {
54  };
55 
56  enum KeyAlg {
60  };
61 
62  enum SigAlg {
66  };
67 
68  enum MD {
72  };
73 
75  {
76  E_GENERIC = blocxx::Exception::UNKNOWN_ERROR_CODE, // == -1
77  E_C_EMPTY = -100, // value empty
78  E_ST_EMPTY = -101,
79  E_L_EMPTY = -102,
80  E_O_EMPTY = -103,
81  E_OU_EMPTY = -104,
82  E_CN_EMPTY = -105,
83  E_EM_EMPTY = -106,
84  E_C_NF = -110, // value not found
85  E_ST_NF = -111,
86  E_L_NF = -112,
87  E_O_NF = -113,
88  E_OU_NF = -114,
89  E_CN_NF = -115,
90  E_EM_NF = -116,
91  E_C_NM = -120, // (no match) value does not match CA
92  E_ST_NM = -121,
93  E_L_NM = -122,
94  E_O_NM = -123,
95  E_OU_NM = -124,
96  E_CN_NM = -125,
97  E_EM_NM = -126,
98  E_INVALID_PASSWD = -200, // invalid password
99  E_FILE_NOT_FOUND = ENOENT, //errno
100  E_FILE_EXISTS = EEXIST //errno
101  };
102 }
103 }
104 
105 #endif // LIMAL_CA_MGM_COMMON_DATA_HPP