swtpm: Move locking of storage into tpmlib_start()

Move the locking of the storage into tpmlib_start() after the call to
TPMLIB_MainInit() which was previously doing the locking when the prepare
function was called in the SWTPM_NVRAM_Init() callback invoked by
TPMLIB_MainInit().

This allows for conditional locking in tpmlib_start() using a flag later
on.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
4 files changed