Home
last modified time | relevance | path

Searched refs:asn1Spec (Results 1 – 25 of 46) sorted by relevance

12

/external/python/pyasn1/pyasn1/codec/cer/
Dencoder.py17 def encodeValue(self, value, asn1Spec, encodeFun, **options): argument
41 def encodeValue(self, value, asn1Spec, encodeFun, **options): argument
49 if asn1Spec is not None:
50 value = asn1Spec.clone(value)
69 self, value, asn1Spec, encodeFun, **options
90 component, asn1Spec = componentAndType
92 if asn1Spec is None:
93 asn1Spec = component
95 if asn1Spec.typeId == univ.Choice.typeId and not asn1Spec.tagSet:
96 if asn1Spec.tagSet:
[all …]
/external/python/pyasn1/pyasn1/codec/ber/
Ddecoder.py27 def valueDecoder(self, substrate, asn1Spec, argument
33 def indefLenValueDecoder(self, substrate, asn1Spec, argument
45 def _createComponent(self, asn1Spec, tagSet, value, **options): argument
48 elif asn1Spec is None:
51 return asn1Spec
53 return asn1Spec.clone(value)
59 def valueDecoder(self, substrate, asn1Spec, argument
65 self._createComponent(asn1Spec, tagSet, '', **options),
71 value, _ = decodeFun(head, asn1Spec, tagSet, length, **options)
75 def indefLenValueDecoder(self, substrate, asn1Spec, argument
[all …]
Dencoder.py59 def encodeValue(self, value, asn1Spec, encodeFun, **options): argument
62 def encode(self, value, asn1Spec=None, encodeFun=None, **options): argument
64 if asn1Spec is None:
67 tagSet = asn1Spec.tagSet
72 value, asn1Spec, encodeFun, **options
85 value, asn1Spec, encodeFun, **options
117 def encodeValue(self, value, asn1Spec, encodeFun, **options): argument
124 def encodeValue(self, value, asn1Spec, encodeFun, **options): argument
132 def encodeValue(self, value, asn1Spec, encodeFun, **options): argument
144 def encodeValue(self, value, asn1Spec, encodeFun, **options): argument
[all …]
/external/python/pyasn1-modules/tests/
Dtest_rfc2459.py43 self.asn1Spec = rfc2459.Certificate()
49 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
59 … asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
79 self.asn1Spec = rfc2459.CertificateList()
85 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
95 … asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
117 self.asn1Spec = rfc2459.DSAPrivateKey()
123 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
133 … asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
Dtest_rfc2560.py29 self.asn1Spec = rfc2560.OCSPRequest()
35 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
69 self.asn1Spec = rfc2560.OCSPResponse()
74 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
Dtest_rfc5280.py43 self.asn1Spec = rfc5280.Certificate()
49 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
69 self.asn1Spec = rfc5280.CertificateList()
75 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
Dtest_rfc5208.py35 self.asn1Spec = rfc5208.PrivateKeyInfo()
41 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
62 self.asn1Spec = rfc5208.EncryptedPrivateKeyInfo()
67 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
Dtest_rfc2315.py143 self.asn1Spec = rfc2315.ContentInfo()
149 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
159 … asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
Dtest_rfc2437.py34 self.asn1Spec = rfc2437.RSAPrivateKey()
40 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
Dtest_rfc2511.py36 self.asn1Spec = rfc2511.CertReqMessages()
42 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
Dtest_rfc4210.py116 self.asn1Spec = rfc4210.PKIMessage()
122 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
Dtest_rfc2314.py44 self.asn1Spec = rfc2314.CertificationRequest()
50 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
/external/python/pyasn1/pyasn1/codec/native/
Ddecoder.py19 def __call__(self, pyObject, asn1Spec, decodeFun=None, **options): argument
20 return asn1Spec.clone(pyObject)
24 def __call__(self, pyObject, asn1Spec, decodeFun=None, **options): argument
25 return asn1Spec.clone(univ.BitString.fromBinaryString(pyObject))
29 def __call__(self, pyObject, asn1Spec, decodeFun=None, **options): argument
30 asn1Value = asn1Spec.clone()
32 componentsTypes = asn1Spec.componentType
42 def __call__(self, pyObject, asn1Spec, decodeFun=None, **options): argument
43 asn1Value = asn1Spec.clone()
46 asn1Value.append(decodeFun(pyValue, asn1Spec.componentType), **options)
[all …]
/external/python/pyasn1/tests/codec/ber/
Dtest_decoder.py37 …assert decoder.decode(ints2octs((0x9f, 0x80, 0x00, 0x02, 0x01, 0x02)), asn1Spec=integer) == decode…
38 ints2octs((0x9f, 0x00, 0x02, 0x01, 0x02)), asn1Spec=integer)
75 ints2octs((2, 1, 12)), asn1Spec=univ.Null()
82 ints2octs((2, 1, 12)), asn1Spec=univ.Integer()
531 …ts((48, 13, 4, 11, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110)), asn1Spec=univ.SequenceOf()
540 …ints2octs((163, 15, 48, 13, 4, 11, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110)), asn1Spec=s
564 … ints2octs((48, 13, 4, 11, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110)), asn1Spec=self.s
569 …s2octs((48, 128, 4, 11, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110, 0, 0)), asn1Spec=self.s
574 …19, 36, 17, 4, 4, 113, 117, 105, 99, 4, 4, 107, 32, 98, 114, 4, 3, 111, 119, 110)), asn1Spec=self.s
579 …4, 4, 113, 117, 105, 99, 4, 4, 107, 32, 98, 114, 4, 3, 111, 119, 110, 0, 0, 0, 0)), asn1Spec=self.s
[all …]
Dtest_encoder.py71 assert encoder.encode(12, asn1Spec=univ.Integer()) == ints2octs((2, 1, 12))
74 assert encoder.encode(-12, asn1Spec=univ.Integer()) == ints2octs((2, 1, 244))
77 assert encoder.encode(0, asn1Spec=univ.Integer()) == ints2octs((2, 1, 0))
81 0xffffffffffffffff, asn1Spec=univ.Integer()
95 assert encoder.encode(True, asn1Spec=univ.Boolean()) == ints2octs((1, 1, 1))
98 assert encoder.encode(False, asn1Spec=univ.Boolean()) == ints2octs((1, 1, 0))
135 assert encoder.encode(self.b, asn1Spec=self.s) == ints2octs((3, 3, 1, 169, 138))
139 self.b, asn1Spec=self.s, defMode=False
144 self.b, asn1Spec=self.s, maxChunkSize=1
149 self.b, asn1Spec=self.s, defMode=False, maxChunkSize=1
[all …]
/external/python/pyasn1/tests/codec/native/
Dtest_decoder.py26 decoder.decode('', asn1Spec='not an Asn1Item')
35 assert decoder.decode(12, asn1Spec=univ.Integer()) == univ.Integer(12)
38 assert decoder.decode(-12, asn1Spec=univ.Integer()) == univ.Integer(-12)
43 assert decoder.decode(True, asn1Spec=univ.Boolean()) == univ.Boolean(True)
46 assert decoder.decode(False, asn1Spec=univ.Boolean()) == univ.Boolean(False)
51 … assert decoder.decode('11111111', asn1Spec=univ.BitString()) == univ.BitString(hexValue='ff')
56 …assert decoder.decode('Quick brown fox', asn1Spec=univ.OctetString()) == univ.OctetString('Quick b…
61 assert decoder.decode(None, asn1Spec=univ.Null()) == univ.Null('')
66 …assert decoder.decode('1.3.6.11', asn1Spec=univ.ObjectIdentifier()) == univ.ObjectIdentifier('1.3.…
71 assert decoder.decode(1.33, asn1Spec=univ.Real()) == univ.Real(1.33)
[all …]
/external/python/pyasn1/pyasn1/codec/der/
Dencoder.py21 component, asn1Spec = componentAndType
23 if asn1Spec is None:
26 compType = asn1Spec
29 if asn1Spec is None:
33 names = [namedType.name for namedType in asn1Spec.componentType.namedTypes
40 return asn1Spec[names[0]].tagSet
/external/python/pyasn1-modules/tools/
Dpkcs8dump.py36 asn1Spec = rfc5208.PrivateKeyInfo() variable
38 asn1Spec = rfc5208.EncryptedPrivateKeyInfo() variable
42 key, rest = decoder.decode(substrate, asn1Spec=asn1Spec)
Dpkcs1dump.py38 asn1Spec = rfc2437.RSAPrivateKey() variable
40 asn1Spec = rfc2459.DSAPrivateKey() variable
44 key, rest = decoder.decode(substrate, asn1Spec=asn1Spec)
Dcmcdump.py24 _, rest = decoder.decode(substrate, asn1Spec=rfc5652.ContentInfo())
31 layer, rest = decoder.decode(data, asn1Spec=rfc5652.ContentInfo())
42 layer, rest = decoder.decode(data, asn1Spec=rfc5652.SignedData())
53 layer, rest = decoder.decode(data, asn1Spec=rfc6402.PKIData())
Dcrldump.py25 asn1Spec = rfc2459.CertificateList() variable
34 key, rest = decoder.decode(substrate, asn1Spec=asn1Spec)
Docspclient.py109 response, asn1Spec=rfc2560.BasicOCSPResponse()
137 asn1Spec=rfc2459.Certificate()
144 asn1Spec=rfc2459.Certificate()
164 ocspRsp, _ = decoder.decode(httpRsp, asn1Spec=rfc2560.OCSPResponse())
/external/python/pyasn1/docs/source/pyasn1/codec/cer/
Dcontents.rst5 .. autofunction:: pyasn1.codec.cer.encoder.encode(value, asn1Spec=None)
7 .. autofunction:: pyasn1.codec.cer.decoder.decode(substrate, asn1Spec=None)
/external/python/pyasn1/docs/source/pyasn1/codec/der/
Dcontents.rst5 .. autofunction:: pyasn1.codec.der.encoder.encode(value, asn1Spec=None)
7 .. autofunction:: pyasn1.codec.der.decoder.decode(substrate, asn1Spec=None)
/external/python/pyasn1/docs/source/pyasn1/codec/ber/
Dcontents.rst5 .. autofunction:: pyasn1.codec.ber.encoder.encode(value, asn1Spec=None, defMode=True, maxChunkSize=…
7 .. autofunction:: pyasn1.codec.ber.decoder.decode(substrate, asn1Spec=None)

12