Current File : //kunden/usr/share/crypto-policies/python/cryptopolicies/__pycache__/cryptopolicies.cpython-39.pyc |
a
�
�goG � @ s. d dl Z d dlZd dlZd dlZd dlZd dlZddlmZmZ e �
dd �ddiB Zddd �Zd
Z
dZdd
hh d�h d�ddhh d�h d�h d�h d�h d�h d�d�
ZG dd� d�ZG dd� dej�Zdd� Ze �dd �Zd!d"� Zd0d$d%�ZG d&d'� d'e�Zd(d)� ZG d*d+� d+�Zd,d-� ZG d.d/� d/�ZdS )1� N� )� alg_lists�
validation)Zarbitrary_dh_groupsZmin_dh_sizeZmin_dsa_sizeZmin_rsa_sizeZ
sha1_in_certsZ ssh_certsZmin_ec_size� )�ANYZDISABLE_ETMZDISABLE_NON_ETM)ZDEFAULTZENFORCEZRELAX)ZetmZ__ems�*)�tls�ssl�openssl�nss�gnutls�java-tls�ssh�openssh�openssh-server�openssh-client�libssh�ipsec�ike� libreswan�kerberos�krb5�dnssec�bindr r > r r r > r r r
r r > r r r > r r r > r r r > r r r > r r r > r
r r )
r r r
r r r r r r r
c @ s( e Zd Zefdd�Zdd� Zdd� ZdS )�
ScopeSelectorc C s� |� � | _}|�d� | _| jr&|n
|dd� }tjj|| jd� tjj|| jd� |�d�rr|dd� �d�n|g| _ tjj
| j t| jd� dS )a=
Initialize a scope selector.
An example would be `ssh` in `ciphers@ssh = -NULL`.
When openssh backend will request the configuration,
it'll offer (`{'ssh', 'openssh'}`) as scopes
and the rule above will be taken into account.
Both patterns and scopes are cast to lowercase.
For more examples, refer to tests/unit/parsing/test_scope_selector.py
>>> ss = ScopeSelector('!{SSH,IPsec}')
>>> ss.matches({'ipsec', 'libreswan'})
False
>>> ss.matches({'tls', 'openssl'})
True
�!r N)Zoriginal_pattern�{����,)�lower�pattern�
startswith� _positiver �scopeZillegal_charactersZcurly_brackets�split�_globsZresulting_globs�
ALL_SCOPES)�selfr �p� r) �B/usr/share/crypto-policies/python/cryptopolicies/cryptopolicies.py�__init__>