logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tpmUnsealFile, tpmUnsealShred, tpmUnsealStrerror - unseal routines

Description

       The functions in the tpmUnseal family allow access to a piece of sensitive data that has been sealed to
       the TPM configuration of a given system if the conditions are right, that is the SRK has not changed and
       the PCRS (if any) specified at seal time are of the appropriate value.

       The tpmUnsealFile function returns the contents of the file unsealed in the data buffer.  The memory at
       *data must be freed by the caller.

       The tpmUnsealShred function will zero and free the memory.

       The tpmUnsealStrerror function will convert the return code from tpmUnsealFile into a human
       comprehensible string using and internal errno variable.

Name

       tpmUnsealFile, tpmUnsealShred, tpmUnsealStrerror - unseal routines

Reporting Bugs

       Report bugs to <trousers-users@lists.sourceforge.net>

TPM Management                                     2005-08-10                                    tpm_sealdata(3)

Return Value

       The tpmUnsealFile function returns 0 on success and a negative number on error.  The tpmUnsealStrerror
       function returns the error string on success and the empty string on an error.

See Also

tpm_sealdata(1)

Synopsis

#include<tpm_unseal/tpm_unseal.h>inttpmUnsealFile(char*file,char**data,int*size);voidtpmUnsealShred(char*data,intsize);char*tpmUnsealStrerror(intrc);

See Also