tpm_unseal.h revision 1.1
1/* 2 * The Initial Developer of the Original Code is International 3 * Business Machines Corporation. Portions created by IBM 4 * Corporation are Copyright (C) 2005 International Business 5 * Machines Corporation. All Rights Reserved. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the Common Public License as published by 9 * IBM Corporation; either version 1 of the License, or (at your option) 10 * any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * Common Public License for more details. 16 * 17 * You should have received a copy of the Common Public License 18 * along with this program; if not, a copy can be viewed at 19 * http://www.opensource.org/licenses/cpl1.0.php. 20 */ 21 22#ifndef __TPM_UNSEAL_H 23#define __TPM_UNSEAL_H 24 25#define TPMSEAL_FILE_ERROR -2 26#define TPMSEAL_STD_ERROR -1 27 28enum tpm_errors { 29 ENOTSSHDR = 0, 30 ENOTSSFTR, 31 EWRONGTSSTAG, 32 EWRONGEVPTAG, 33 EWRONGDATTAG, 34 EWRONGKEYTYPE, 35 EBADSEEK, 36}; 37 38extern int tpm_errno; 39 40int tpmUnsealFile(char*, unsigned char**, int*, BOOL); 41void tpmUnsealShred(unsigned char*, int); 42char* tpmUnsealStrerror(int); 43 44#endif 45