comparison common/listutil.h @ 286:881ce5126f07

Add helper function to get all certificates in a list
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 02 Apr 2014 13:47:24 +0000
parents 571f68c7a38f
children 17e1c8f37d72
comparison
equal deleted inserted replaced
285:f23e0ccd5d14 286:881ce5126f07
57 * 57 *
58 * @returns 0 if the list is valid a polarssl error or -1 otherwise 58 * @returns 0 if the list is valid a polarssl error or -1 otherwise
59 */ 59 */
60 int verify_list(const char *data, const size_t size); 60 int verify_list(const char *data, const size_t size);
61 61
62 /** @brief get a list of the certificates marked with I: 62 /** @brief get a list of the certificates marked with I: or R:
63 * 63 *
64 * Get a list of certificates that should be installed by the 64 * Get a list of certificates that are contained in the
65 * certificatelist pointed to by data. 65 * certificatelist pointed to by data.
66 * On Success this function makes a copy of the certificates 66 * On Success this function makes a copy of the certificates
67 * and the certificates need to be freed by the caller. 67 * and the certificates need to be freed by the caller.
68 * 68 *
69 * @param [in] data the certificatelist to parse 69 * @param [in] data the certificatelist to parse
70 * @param [in] size the size of the certificatelist 70 * @param [in] size the size of the certificatelist
71 * 71 *
72 * @returns a newly allocated array of strings containing the encoded 72 * @returns a newly allocated array of strings containing the encoded
73 * certificates or NULL on error. 73 * certificates or NULL on error.
74 * */ 74 * */
75 char **get_certs_to_install(const char *data, const size_t size); 75 char **get_certs_from_list (char *data, const size_t size);
76
77 /** @brief get a list of the certificates marked with R:
78 *
79 * Get a list of certificates that should be removed by the
80 * certificatelist pointed to by data.
81 * On Success this function makes a copy of the certificates
82 * and the certificates need to be freed by the caller.
83 *
84 * @param [in] data the certificatelist to parse
85 * @param [in] size the size of the certificatelist
86 *
87 * @returns a newly allocated array of strings containing the encoded
88 * certificates or NULL on error.
89 * */
90 char **get_certs_to_remove(const char *data, const size_t size);
91
92 76
93 #ifdef __cplusplus 77 #ifdef __cplusplus
94 } 78 }
95 #endif 79 #endif
96 #endif 80 #endif

http://wald.intevation.org/projects/trustbridge/