swtpm_setup: Implement get_swtpm_capabilities() and call from two functions

Implement get_swtpm_capabilities() and call it from two existing functions
that now become a lot simpler.

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