yubihsm.backends package

Submodules

yubihsm.backends.http module

class yubihsm.backends.http.HttpBackend(url='http://localhost:12345', timeout=None)[source]

Bases: YhsmBackend

A backend for communicating with a YubiHSM connector over HTTP.

close()[source]

Closes the connection to the YubiHSM.

transceive(msg)[source]

Send a verbatim message.

yubihsm.backends.usb module

class yubihsm.backends.usb.UsbBackend(serial=None, timeout=None)[source]

Bases: YhsmBackend

A backend for communicating with a YubiHSM directly over USB.

close()[source]

Closes the connection to the YubiHSM.

transceive(msg)[source]

Send a verbatim message.

Module contents

class yubihsm.backends.YhsmBackend[source]

Bases: ABC

Provides low-level communication with a YubiHSM.

abstract close()[source]

Closes the connection to the YubiHSM.

Return type:

None

abstract transceive(msg)[source]

Send a verbatim message.

Return type:

bytes

yubihsm.backends.get_backend(url=None)[source]

Returns a backend suitable for the given URL.

Return type:

YhsmBackend