Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/twisted/conch/test/__pycache__/ |
Upload File : |
o 5�@g_ � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZm Z m Z mZmZ ddl mZ ddlmZ ddlmZ ed�r[ed �r[dd lmZmZmZmZmZ ddlmZmZmZmZ ndZd d� ZG dd� de�Z dS )z- Tests for L{twisted.conch.scripts.ckeygen}. � N)�StringIO)�privateECDSA_openssh�privateEd25519_openssh_new�privateRSA_openssh�privateRSA_openssh_encrypted�publicRSA_openssh)�FilePath)� requireModule)�TestCase�cryptography�pyasn1)�_saveKey�changePassPhrase�displayPublicKey�enumrepresentation�printFingerprint)�BadFingerPrintFormat�BadKeyError�FingerprintFormats�KeyzBcryptography and pyasn1 required for twisted.conch.scripts.ckeygenc s t � �� � fdd�}|S )a@ Return a callable to patch C{getpass.getpass}. Yields a passphrase each time called. Use case is to provide an old, then new passphrase(s) as if requested interactively. @param passphrases: The list of passphrases returned, one per each call. @return: A callable to patch C{getpass.getpass}. c s t � �S �N)�next��_��passphrases� �A/usr/lib/python3/dist-packages/twisted/conch/test/test_ckeygen.py�fakeGetpass7 � z makeGetpass.<locals>.fakeGetpass)�iter)r r r r r �makeGetpass+ s r! c @ s" e Zd ZdZdd� ZdGdd�Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zd1d2� Zd3d4� Zd5d6� Zd7d8� Zd9d:� Zd;d<� Z d=d>� Z!d?d@� Z"dAdB� Z#dCdD� Z$dEdF� Z%dS )H�KeyGenTestszN Tests for various functions used to implement the I{ckeygen} script. c C s t � | _| �td| j� dS )zX Patch C{sys.stdout} so tests can make assertions about what's printed. �stdoutN)r r# �patch�sys��selfr r r �setUpB s zKeyGenTests.setUpNc C s� | � � }dd|d|dg}|d ur|�d|g� |d ur"|�d|g� zt�|� W n ty; d|d<