Exceptions

All exceptions related to keystore loading or parsing derive from a common superclass type KeystoreException.

Exception types

exception jks.util.KeystoreException[source]

Bases: exceptions.Exception

Superclass for all pyjks exceptions.

exception jks.util.KeystoreSignatureException[source]

Bases: jks.util.KeystoreException

Signifies that the supplied password for a keystore integrity check is incorrect.

exception jks.util.DuplicateAliasException[source]

Bases: jks.util.KeystoreException

Signifies that duplicate aliases were encountered in a keystore.

exception jks.util.NotYetDecryptedException[source]

Bases: jks.util.KeystoreException

Signifies that an attribute of a key store entry can not be accessed because the entry has not yet been decrypted.

By default, the keystore load and loads methods automatically try to decrypt all key entries using the store password. Any keys for which that attempt fails are returned undecrypted, and will raise this exception when its attributes are accessed.

To resolve, first call decrypt() with the correct password on the entry object whose attributes you want to access.

exception jks.util.BadKeystoreFormatException[source]

Bases: jks.util.KeystoreException

Signifies that a structural error was encountered during key store parsing.

exception jks.util.BadDataLengthException[source]

Bases: jks.util.KeystoreException

Signifies that given input data was of wrong or unexpected length.

exception jks.util.BadPaddingException[source]

Bases: jks.util.KeystoreException

Signifies that bad padding was encountered during decryption.

exception jks.util.BadHashCheckException[source]

Bases: jks.util.KeystoreException

Signifies that a hash computation did not match an expected value.

exception jks.util.DecryptionFailureException[source]

Bases: jks.util.KeystoreException

Signifies failure to decrypt a value.

exception jks.util.UnsupportedKeystoreVersionException[source]

Bases: jks.util.KeystoreException

Signifies an unexpected or unsupported keystore format version.

exception jks.util.UnexpectedJavaTypeException[source]

Bases: jks.util.KeystoreException

Signifies that a serialized Java object of unexpected type was encountered.

exception jks.util.UnexpectedAlgorithmException[source]

Bases: jks.util.KeystoreException

Signifies that an unexpected cryptographic algorithm was used in a keystore.

exception jks.util.UnexpectedKeyEncodingException[source]

Bases: jks.util.KeystoreException

Signifies that a key was stored in an unexpected format or encoding.

exception jks.util.UnsupportedKeystoreTypeException[source]

Bases: jks.util.KeystoreException

Signifies that the keystore was an unsupported type.

exception jks.util.UnsupportedKeystoreEntryTypeException[source]

Bases: jks.util.KeystoreException

Signifies that the keystore entry was an unsupported type.

exception jks.util.UnsupportedKeyFormatException[source]

Bases: jks.util.KeystoreException

Signifies that the key format was an unsupported type.