NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

rfc5208.py (1228B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\carbon\common\lib\pyasn1_modules\rfc5208.py
      2 from pyasn1.type import tag, namedtype, namedval, univ, constraint
      3 from pyasn1_modules.rfc2459 import *
      4 from pyasn1_modules import rfc2251
      5 
      6 class KeyEncryptionAlgorithms(AlgorithmIdentifier):
      7     pass
      8 
      9 
     10 class PrivateKeyAlgorithms(AlgorithmIdentifier):
     11     pass
     12 
     13 
     14 class EncryptedData(univ.OctetString):
     15     pass
     16 
     17 
     18 class EncryptedPrivateKeyInfo(univ.Sequence):
     19     componentType = namedtype.NamedTypes(namedtype.NamedType('encryptionAlgorithm', AlgorithmIdentifier()), namedtype.NamedType('encryptedData', EncryptedData()))
     20 
     21 
     22 class PrivateKey(univ.OctetString):
     23     pass
     24 
     25 
     26 class Attributes(univ.SetOf):
     27     componentType = rfc2251.Attribute()
     28 
     29 
     30 class Version(univ.Integer):
     31     namedValues = namedval.NamedValues(('v1', 0), ('v2', 1))
     32 
     33 
     34 class PrivateKeyInfo(univ.Sequence):
     35     componentType = namedtype.NamedTypes(namedtype.NamedType('version', Version()), namedtype.NamedType('privateKeyAlgorithm', AlgorithmIdentifier()), namedtype.NamedType('privateKey', PrivateKey()), namedtype.OptionalNamedType('attributes', Attributes().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))))