← Back
Editing: test_util.cpython-312.pyc
� n�h- � � � d Z ddlZddlZddlmZ ddlmZ ddlm Z ddl mZ ddlZ ddlmZ ddlmZ d � Zd ededed efd�Zd ededed efd�Zded ej. fd�Zded ej2 fd�Zd� Zd� Zd� Zy)zJTest utilities. .. warning:: This module is not part of the public API. � N)�Callable)�x509)�default_backend)� serialization)�ComparableECKey)�cryptoc � � t j j t � j dg| ��� }|j � S )zLoad contents of a test vector.�testdata)� importlib� resources�files�__package__�joinpath� read_bytes)�names� vector_refs �C/usr/lib/python3.12/site-packages/acme/_internal/tests/test_util.py�load_vectorr s9 � � �$�$�*�*�;�7�@�@��T�e�T�J�� � �"�"� �filename� loader_pem� loader_der�returnc � � t j j | � \ }}|j � dk( r|S |j � dk( r|S t d� �)N�.pemz.der�1Loader could not be recognized based on extension��os�path�splitext�lower� ValueError�r r r �_�exts r � _guess_loaderr&