free hmac_signature string after use
[strongswan.git] / src / libstrongswan / fips / fips.h
1 /**
2 * @file fips.h
3 *
4 * @brief Interface of the libstrongswan integrity test
5 *
6 * @ingroup fips
7 */
8
9 /*
10 * Copyright (C) 2007 Bruno Krieg, Daniel Wydler
11 * Hochschule fuer Technik Rapperswil
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 */
23
24 #ifndef FIPS_H_
25 #define FIPS_H_
26
27 #include <library.h>
28
29 /**
30 * @brief compute SHA-1 HMAC signature over RODATA and TEXT sections of libstrongswan
31 *
32 * @param key key used for SHA-1 HMAC signature in string format
33 * @return SHA-1 HMAC signature in HEX format
34 */
35 char* fips_compute_hmac_signature(const char *key);
36
37 /**
38 * @brief verify HMAC signature over RODATA and TEXT sections of libstrongswan
39 *
40 * @param signature signature value from fips_hmac.h in HEX format
41 * @param key key used for SHA-1 HMAC signature in string format
42 * @return SUCCESS if signatures agree
43 */
44 status_t fips_verify_hmac_signature(const char *signature, const char *key);
45
46 #endif /*FIPS_H_*/