mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Add properties file handling routines
In preparation for a new feature, introduce property file handling routines. A property file stores key value pairs in a text file. Optionally a hash of all keys and values contained in the properties file can be generated to ensure integrity of the properties file and to detect manual modifications. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
f642019bcc
commit
340da73bb7
36
zkey/properties.h
Normal file
36
zkey/properties.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* zkey - Generate, re-encipher, and validate secure keys
|
||||
*
|
||||
* Properties file handling functions
|
||||
*
|
||||
* Copyright IBM Corp. 2018
|
||||
*
|
||||
* s390-tools is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef PROPFILE_H
|
||||
#define PROPFILE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
struct properties;
|
||||
|
||||
struct properties *properties_new(void);
|
||||
|
||||
void properties_free(struct properties *properties);
|
||||
|
||||
int properties_set(struct properties *properties,
|
||||
const char *name, const char *value);
|
||||
|
||||
char *properties_get(struct properties *properties, const char *name);
|
||||
|
||||
int properties_remove(struct properties *properties, const char *name);
|
||||
|
||||
int properties_save(struct properties *properties, const char *filename,
|
||||
bool check_integrity);
|
||||
|
||||
int properties_load(struct properties *properties, const char *filename,
|
||||
bool check_integrity);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user