comparison ui/listutil.h @ 4:9849250f50f2

Start implementation of certificatelist parser
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 11 Feb 2014 16:46:02 +0000
parents
children 992c0ec57660
comparison
equal deleted inserted replaced
3:b684e25adbbb 4:9849250f50f2
1
2 #include <stddef.h>
3
4 /**
5 * @file listutil.h
6 * @brief Functions to work with the certificate list.
7 *
8 * This file definies the function
9 */
10
11 /* Status of the List Operations */
12 typedef enum {
13 Unknown = 0, // Not yet parsed
14 UnknownError = 1, // The expected unexpected
15 TooLarge = 2, // Failed because the file exeeds the limit
16 InvalidFormat = 3, // File does not appear to be in list format
17 InvalidSignature = 4, // Signature was invalid
18 StatFailed = 5, // Could not stat the file
19 ReadFailed = 6, // Could not read the file
20 IncompatibleVersion = 7, // The Format Version does not match
21 Valid = 8 // List is valid
22 } list_status_t;
23
24 /**
25 * @brief Obtain the complete and verified Certificate list.
26 *
27 * This checks if the file fileName is a valid certificate
28 * list signed by the key specified in pubkey.h
29 *
30 * The caller has to free data.
31 *
32 * @param[in] fileName Name of the file (UTF-8 encoded).
33 * @param[out] data Newly allocated pointer to the file content.
34 * @param[out] size Size in Bytes of the file content.
35 *
36 * @return status of the operation.
37 */
38 list_status_t readAndVerifyList(char* fileName, void *data, size_t *size);
39

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