PKCS#11 support

exception paramiko.pkcs11.PKCS11AuthenticationException

Exception raised when pkcs11 authentication failed for some reason.

exception paramiko.pkcs11.PKCS11Exception

Exception raised by failures in the PKCS11 API or related logic errors.

paramiko.pkcs11.pkcs11_close_session(pkcs11session)
Parameters:pkcs11session (str) – pkcs11 session obtained by calling pkcs11_open_session
paramiko.pkcs11.pkcs11_get_public_key(keyid='01')
Parameters:pkcs11keyid (str) – The keyid to use for the pkcs11 session.
paramiko.pkcs11.pkcs11_open_session(pkcs11provider, pkcs11pin, pkcs11keyid='01', pkcs11slot=0, pkcs11publickey=None)
Parameters:
  • pkcs11provider (str) – If using PKCS11, this will be the provider for the PKCS11 interface. Example: /usr/local/lib/opensc-pkcs11.so.
  • pkcs11pin (str) – If using PKCS11, this will be the pin of your token or smartcard.
  • pkcs11keyid (str) – The keyid to use for the pkcs11 session.
  • pkcs11slot (int) – The slot id used for establishing the session.
  • pkcs11publickey (str) – If left the default (None), the public key will be detected using OpenSC pkcs15-tool. Alternatively you can provide it manually using this argument.