File: //lib64/python3.6/site-packages/M2Crypto/SSL/__pycache__/Checker.cpython-36.opt-1.pyc
3
���[;+ � @ s� d Z dddddgZddlZddlZddlmZmZmZmZ ej rPdd l
mZmZ G d
d� de
�ZG dd� de�ZG dd� de�ZG d
d� de�ZG dd� de�Zedkr�ddlZej� dS )z�
SSL peer certificate checking routines
Copyright (c) 2004-2007 Open Source Applications Foundation.
All rights reserved.
Copyright 2008 Heikki Toivonen. All rights reserved.
�SSLVerificationError�
NoCertificate�WrongCertificate� WrongHost�Checker� N)�X509�m2�six�util)�AnyStr�Optionalc @ s e Zd ZdS )r N)�__name__�
__module__�__qualname__� r r �/usr/lib64/python3.6/Checker.pyr s c @ s e Zd ZdS )r N)r
r r r r r r r s c @ s e Zd ZdS )r N)r
r r r r r r r s c @ s e Zd Zddd�Zdd� ZdS )r �
commonNamec C s0 |dkrt d��tj| � || _|| _|| _dS )ar
This exception will be raised if the certificate returned by the
peer was issued for a different host than we tried to connect to.
This could be due to a server misconfiguration or an active attack.
:param expectedHost: The name of the host we expected to find in the
certificate.
:param actualHost: The name of the host we actually found in the
certificate.
:param fieldName: The field name where we noticed the error. This
should be either 'commonName' or 'subjectAltName'.
r �subjectAltNamez/Unknown fieldName, should be either commonName zor subjectAltNameN)r r z@Unknown fieldName, should be either commonName or subjectAltName)�
ValueErrorr �__init__�expectedHost�
actualHost� fieldName)�selfr r r r r r r "