diff 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
line wrap: on
line diff
--- a/common/listutil.h	Tue Mar 18 18:26:14 2014 +0000
+++ b/common/listutil.h	Tue Mar 18 18:28:15 2014 +0000
@@ -26,6 +26,10 @@
     IncompatibleVersion = 7 // The Format Version does not match
 } list_status_t;
 
+/* Definitions based on the format */
+#define MAX_LINE_LENGTH 1000
+#define MAX_LINES 1000
+
 /**
  * @brief Obtain the complete and verified Certificate list.
  *
@@ -52,7 +56,39 @@
  *
  *  @returns 0 if the list is valid a polarssl error or -1 otherwise
  */
-int verify_list(char *data, size_t size);
+int verify_list(const char *data, const size_t size);
+
+/** @brief get a list of the certificates marked with I:
+ *
+ * Get a list of certificates that should be installed by the
+ * certificatelist pointed to by data.
+ * On Success this function makes a copy of the certificates
+ * and the certificates need to be freed by the caller.
+ *
+ * @param [in] data the certificatelist to parse
+ * @param [in] size the size of the certificatelist
+ *
+ * @returns a newly allocated array of strings containing the encoded
+ * certificates or NULL on error.
+ * */
+char **get_certs_to_install(const char *data, const size_t size);
+
+/** @brief get a list of the certificates marked with R:
+ *
+ * Get a list of certificates that should be removed by the
+ * certificatelist pointed to by data.
+ * On Success this function makes a copy of the certificates
+ * and the certificates need to be freed by the caller.
+ *
+ * @param [in] data the certificatelist to parse
+ * @param [in] size the size of the certificatelist
+ *
+ * @returns a newly allocated array of strings containing the encoded
+ * certificates or NULL on error.
+ * */
+char **get_certs_to_remove(const char *data, const size_t size);
+
+
 #ifdef __cplusplus
 }
 #endif

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