File: //usr/lib/python3/dist-packages/josepy/__pycache__/util.cpython-38.pyc
U
��]� � @ s� d Z zddlmZmZ W n$ ek
r< ddlmZmZ Y nX ddlZddlZddlm Z G dd� de
�ZG dd� de�Z
G d d
� d
e�ZG dd� de�ZG d
d� dee�ZG dd� dee�ZdS )zJOSE utilities.� )�Hashable�MappingN)�rsac s$ e Zd ZdZdZ� fdd�Z� ZS )�abstractclassmethoda� Descriptor for an abstract classmethod.
It augments the :mod:`abc` framework with an abstract
classmethod. This is implemented as :class:`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.
Tc s d|_ tt| ��|� d S )NT)�__isabstractmethod__�superr �__init__)�self�target�� __class__� �-/usr/lib/python3/dist-packages/josepy/util.pyr s zabstractclassmethod.__init__)�__name__�
__module__�__qualname__�__doc__r r �
__classcell__r
r
r r r s r c @ sP e Zd ZdZdd� Zdd� Zejjfdd�Z dd � Z
d
d� Zdd
� Zdd� Z
dS )�ComparableX509z�Wrapper for OpenSSL.crypto.X509** objects that supports __eq__.
:ivar wrapped: Wrapped certificate or certificate request.
:type wrapped: `OpenSSL.crypto.X509` or `OpenSSL.crypto.X509Req`.
c C s* t |tjj�s t |tjj�s t�|| _d S �N)�
isinstance�OpenSSL�crypto�X509ZX509Req�AssertionError�wrapped�r r r
r
r r '