관리-도구
편집 파일: encode_asn1.cpython-36.opt-1.pyc
3 l�_\ � @ s� d dl mZmZmZ d dlZd dlZd dlZd dlmZm Z d dl mZmZm Z d dlmZ d dlmZmZmZ dd� Zd d � Zdd� Zd d� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Z d!d"� Z!d#d$� Z"d%d&� Z#d'd(� Z$d)d*� Z%d+d,� Z&d-d.� Z'd/d0� Z(d1d2� Z)d3d4� Z*d5d6� Z+d7d8� Z,d9d:� Z-d;d<� Z.d=d>� Z/d?d@� Z0e j1j2dAe j1j3dBe j1j4dCe j1j5dDe j1j6dEe j1j7dFe j1j8dGe j1j9dHiZ:dIdJ� Z;dKdL� Z<dMdN� Z=dOdP� Z>dQdR� Z?dSdT� Z@dUdV� ZAdWdX� ZBejCe)ejDe-ejEe'ejFe,ejGe,ejHe0ejIe(ejJe"ejKe*ejLe*ejMe>ejNe>ejOeejPe&ejQe?ejRe@iZSejGe,ejIe(ejKe*ejTeejUeejVeejNe>iZWejXe,ejYe ejZe!iZ[ej\eBiZ]ej\eBiZ^dS )Y� )�absolute_import�division�print_functionN)�utils�x509)�_CRL_ENTRY_REASON_ENUM_TO_CODE�_DISTPOINT_TYPE_FULLNAME�_DISTPOINT_TYPE_RELATIVENAME)� _ASN1Type)�CRLEntryExtensionOID�ExtensionOID�OCSPExtensionOIDc C sD | j |�}| jj|| jj�}| jj|| jj�}| j|| jjk� |S )a Converts a python integer to an ASN1_INTEGER. The returned ASN1_INTEGER will not be garbage collected (to support adding them to structs that take ownership of the object). Be sure to register it for GC if it will be discarded after use. )Z _int_to_bn�_ffi�gc�_libZBN_freeZBN_to_ASN1_INTEGER�NULL�openssl_assert)�backend�x�i� r �#/usr/lib64/python3.6/encode_asn1.py�_encode_asn1_int s r c C s t | |�}| jj|| jj�}|S )N)r r r r ZASN1_INTEGER_free)r r r r r r �_encode_asn1_int_gc. s r c C s0 | j j� }| j j||t|��}| j|dk� |S )z@ Create an ASN1_OCTET_STRING from a Python byte string. � )r ZASN1_OCTET_STRING_newZASN1_OCTET_STRING_set�lenr )r �data�s�resr r r �_encode_asn1_str4 s r c C s<