Utilities

JOSE utilities.

class josepy.util.abstractclassmethod(target)[source]

Descriptor for an abstract classmethod.

It augments the abc framework with an abstract classmethod. This is implemented as abc.abstractclassmethod in the standard Python library starting with version 3.2.

This particular implementation, allegedly based on Python 3.3 source code, is stolen from http://stackoverflow.com/questions/11217878/python-2-7-combine-abc-abstractmethod-and-classmethod.

class josepy.util.ComparableX509(wrapped)[source]

Wrapper for OpenSSL.crypto.X509** objects that supports __eq__.

Variables

wrapped – Wrapped certificate or certificate request.

class josepy.util.ComparableKey(wrapped)[source]

Comparable wrapper for cryptography keys.

See https://github.com/pyca/cryptography/issues/2122.

public_key()[source]

Get wrapped public key.

class josepy.util.ComparableRSAKey(wrapped)[source]

Wrapper for cryptography RSA keys.

Wraps around:

class josepy.util.ImmutableMap(**kwargs)[source]

Immutable key to value mapping with attribute access.

update(**kwargs)[source]

Return updated map.

class josepy.util.frozendict(*args, **kwargs)[source]

Frozen dictionary.