Skip to content

Cannot use swtpm with unix socket #661

Description

@susnux

When trying to simply connect to a swtpm instance using an unix socket, the parsing fails and falls back to default TCP.

Given:

let device = TctiNameConf::from_str("swtpm:path=/tmp/vtpm").unwrap();

// create the context for the TPM device
let mut context = Context::new(device)
	.expect("Failed to create context for TPM device");

It returns this error:

WARNING:tcti:src/util-io/io.c:262:socket_connect() Failed to connect to host 127.0.0.1, port 2321: errno 111: Connection refused
ERROR:tcti:src/tss2-tcti/tcti-swtpm.c:617:Tss2_Tcti_Swtpm_Init() Cannot connect to swtpm TPM socket
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:149:tcti_from_file() Could not initialize TCTI file: swtpm
ERROR:tcti:src/tss2-tcti/tctildr.c:477:tctildr_init_context_data() Failed to instantiate TCTI

ℹ️ I use the latest released version (v7.7.0).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions