Mercurial > trustbridge
comparison common/listutil.h @ 68:8ffbb48528ae
Add certificate installation for windows
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 18 Mar 2014 18:28:15 +0000 |
parents | 3f6378647371 |
children | 64c8c6350e60 |
comparison
equal
deleted
inserted
replaced
67:1bf41957418f | 68:8ffbb48528ae |
---|---|
24 SeekFailed = 5, // Could not seek in the file | 24 SeekFailed = 5, // Could not seek in the file |
25 ReadFailed = 6, // File exists but could not read the file | 25 ReadFailed = 6, // File exists but could not read the file |
26 IncompatibleVersion = 7 // The Format Version does not match | 26 IncompatibleVersion = 7 // The Format Version does not match |
27 } list_status_t; | 27 } list_status_t; |
28 | 28 |
29 /* Definitions based on the format */ | |
30 #define MAX_LINE_LENGTH 1000 | |
31 #define MAX_LINES 1000 | |
32 | |
29 /** | 33 /** |
30 * @brief Obtain the complete and verified Certificate list. | 34 * @brief Obtain the complete and verified Certificate list. |
31 * | 35 * |
32 * This checks if the file fileName is a valid certificate | 36 * This checks if the file fileName is a valid certificate |
33 * list signed by the key specified in pubkey.h | 37 * list signed by the key specified in pubkey.h |
50 * @param [in] data the list data | 54 * @param [in] data the list data |
51 * @param [in] size the size of the data | 55 * @param [in] size the size of the data |
52 * | 56 * |
53 * @returns 0 if the list is valid a polarssl error or -1 otherwise | 57 * @returns 0 if the list is valid a polarssl error or -1 otherwise |
54 */ | 58 */ |
55 int verify_list(char *data, size_t size); | 59 int verify_list(const char *data, const size_t size); |
60 | |
61 /** @brief get a list of the certificates marked with I: | |
62 * | |
63 * Get a list of certificates that should be installed by the | |
64 * certificatelist pointed to by data. | |
65 * On Success this function makes a copy of the certificates | |
66 * and the certificates need to be freed by the caller. | |
67 * | |
68 * @param [in] data the certificatelist to parse | |
69 * @param [in] size the size of the certificatelist | |
70 * | |
71 * @returns a newly allocated array of strings containing the encoded | |
72 * certificates or NULL on error. | |
73 * */ | |
74 char **get_certs_to_install(const char *data, const size_t size); | |
75 | |
76 /** @brief get a list of the certificates marked with R: | |
77 * | |
78 * Get a list of certificates that should be removed by the | |
79 * certificatelist pointed to by data. | |
80 * On Success this function makes a copy of the certificates | |
81 * and the certificates need to be freed by the caller. | |
82 * | |
83 * @param [in] data the certificatelist to parse | |
84 * @param [in] size the size of the certificatelist | |
85 * | |
86 * @returns a newly allocated array of strings containing the encoded | |
87 * certificates or NULL on error. | |
88 * */ | |
89 char **get_certs_to_remove(const char *data, const size_t size); | |
90 | |
91 | |
56 #ifdef __cplusplus | 92 #ifdef __cplusplus |
57 } | 93 } |
58 #endif | 94 #endif |
59 #endif | 95 #endif |