Return to tcg_pts_attr_aik.h CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / libimcv / tcg / pts |
1.1 misho 1: /* 2: * Copyright (C) 2011 Sansar Choinyambuu 3: * Copyright (C) 2014 Andreas Steffen 4: * HSR Hochschule fuer Technik Rapperswil 5: * 6: * This program is free software; you can redistribute it and/or modify it 7: * under the terms of the GNU General Public License as published by the 8: * Free Software Foundation; either version 2 of the License, or (at your 9: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. 10: * 11: * This program is distributed in the hope that it will be useful, but 12: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14: * for more details. 15: */ 16: 17: /** 18: * @defgroup tcg_pts_attr_aik tcg_pts_attr_aik 19: * @{ @ingroup tcg_attr 20: */ 21: 22: #ifndef TCG_PTS_ATTR_AIK_H_ 23: #define TCG_PTS_ATTR_AIK_H_ 24: 25: typedef struct tcg_pts_attr_aik_t tcg_pts_attr_aik_t; 26: 27: #include "tcg/tcg_attr.h" 28: #include "pa_tnc/pa_tnc_attr.h" 29: 30: #include <credentials/certificates/certificate.h> 31: 32: /** 33: * Class implementing the TCG PTS Attestation Identity Key attribute 34: * 35: */ 36: struct tcg_pts_attr_aik_t { 37: 38: /** 39: * Public PA-TNC attribute interface 40: */ 41: pa_tnc_attr_t pa_tnc_attribute; 42: 43: /** 44: * Get AIK 45: * 46: * @return AIK Certificate or Public Key 47: */ 48: certificate_t* (*get_aik)(tcg_pts_attr_aik_t *this); 49: 50: }; 51: 52: /** 53: * Creates an tcg_pts_attr_aik_t object 54: * 55: * @param aik Attestation Identity Key 56: */ 57: pa_tnc_attr_t* tcg_pts_attr_aik_create(certificate_t *aik); 58: 59: /** 60: * Creates an tcg_pts_attr_aik_t object from received data 61: * 62: * @param length Total length of attribute value 63: * @param value Unparsed attribute value (might be a segment) 64: */ 65: pa_tnc_attr_t* tcg_pts_attr_aik_create_from_data(size_t length, chunk_t value); 66: 67: #endif /** TCG_PTS_ATTR_AIK_H_ @}*/