| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/crypto-policies/python/policygenerators/__pycache__/ |
Upload File : |
�
��i�J � �r � d dl Z d dlZd dlZd dlZd dlZd dlmZ ddlmZ dZ G d� d� Z
G d� d e� Zy)
� N)�mkstemp� )�ConfigGeneratorz-
library=p11-kit-proxy.so
name=p11-kit-proxy
c �8 � e Zd ZdZd� Zd� Zed� � Zd� Zd� Z y)�PurposeDeduplicatora Shorten the list of enabled algorithm/purpose pairs.
For example, given a rule set of
* ('pkcs12', 'pkcs12-legacy') -> 'pkcs12'
* ('ssl', 'pkcs12') -> 'all'
it'll shorten
('hmac-md5', 'pkcs12'), ('hmac-md5', 'pkcs12-legacy'), 'hmac-md5', 'ssl')
to just 'hmac-md5'.
The order of the first insertion is preserved.
It was decided to be OK to merge all currently known purposes into '/all',
even though in the future there could be more purposes added, since:
1. the list of purposes doesn't change often, and then we should update c-p
2. this will only result in overenablement for algorithms
that the administrator already trusts for all currently known purposes,
and it's likely that they trust it for the new purpose as well
c �N � t j t � | _ || _ y �N)�collections�defaultdict�list�_alg_purpose_map�_rulemap)�self�rulemaps �9/usr/share/crypto-policies/python/policygenerators/nss.py�__init__zPurposeDeduplicator.__init__F s � � +� 7� 7�� =�����
� c �@ � | j | j |� y r )r
�append)r �alg�purposes r �addzPurposeDeduplicator.addJ s � ����c�"�)�)�'�2r c � � � g }� D ]P }d|v r�||v r�
||v xr t � fd�|D � � }|r||v r�.|j |� �@|j |� �R |S )N�allc 3 �&