=head1 NAME TPMLIB_GetTPMProperty - Get a runtime property of the TPM =head1 LIBRARY TPM library (libtpms, -ltpms) =head1 SYNOPSIS B<#include > B =head1 DESCRIPTION The B call is used to retrieve run-time parameters of the TPM such as the number of authorization sessions it can hold or the maximum sizes of the permanent state, savestate or volatile state blobs. This function can be called before or after the TPM has been created. The current implementation of libtpms will return the same value before and after the TPM was started. With the introduction of the function B, the call to this function should be executed after the TPM version has been chosen. The reason is that different TPM versions may return different values. The following properties have been defined: =over 4 =item B The maximum size of an RSA key. =item B The maximum sizes of the TPM command and result buffers. =item B The number of key slots. =item B The number of owner-evict keys. =item B The number of authorization sessions. =item B The number of transport sessions. =item B The number of DAA sessions. =item B The size of the session list. =item B The number of monotonic counters. =item B The number of family entries. =item B The number of delegate entries. =item B The space safety margin used for the worst-case sizes of the savestate and volatile state blobs. This safety margin is not used for the size of the permanent data blob. =item B The maximum size of the permanent data blob. =item B The maximum size of the savestate blob (includes the space safety margin). =item B The maximum size of the volatile state blob (includes the space saferty margin). =back =head1 ERRORS =over 4 =item B The function completed successfully. =item B An undefined property was queried. =back For a complete list of TPM error codes please consult the include file B =head1 EXAMPLE #include #include #include int main(void) { TPM_RESULT res; int result; int rc = 0; if (TPMLIB_MainInit() != TPM_SUCCESS) { fprintf(stderr, "Could not start the TPM.\n"); return 1; } if (TPMLIB_GetTPMProperty(TPMPROP_TPM_RSA_KEY_LENGTH_MAX, &result) != TPM_SUCCESS) { fprintf(stderr, "Could not read the max. size of RSA keys.\n"); goto err_exit; } fprintf(stdout, "Max. size of RSA keys: %d\n", result); err_exit: TPMLIB_Terminate(); return 0; } =head1 SEE ALSO B(3), B(3), B(3), B(3), B(3), B(3) =cut