Home
last modified time | relevance | path

Searched refs:substrate (Results 1 – 25 of 42) sorted by relevance

12

/external/python/pyasn1/pyasn1/codec/ber/
Ddecoder.py27 def valueDecoder(self, substrate, asn1Spec, argument
33 def indefLenValueDecoder(self, substrate, asn1Spec, argument
42 def substrateCollector(asn1Object, substrate, length): argument
43 return substrate[:length], substrate[length:]
59 def valueDecoder(self, substrate, asn1Spec, argument
66 substrate, length
69 head, tail = substrate[:length], substrate[length:]
75 def indefLenValueDecoder(self, substrate, asn1Spec, argument
82 substrate, length
85 value, substrate = decodeFun(substrate, asn1Spec, tagSet, length, **options)
[all …]
Dencoder.py37 substrate = tagId & 0x7f,
40 substrate = (0x80 | (tagId & 0x7f),) + substrate
42 return (encodedTag | 0x1F,) + substrate
50 substrate = ()
52 substrate = (length & 0xff,) + substrate
54 substrateLen = len(substrate)
57 return (0x80 | substrateLen,) + substrate
71 substrate, isConstructed, isOctets = self.encodeValue(
74 return substrate
84 substrate, isConstructed, isOctets = self.encodeValue(
[all …]
/external/python/pyasn1-modules/tests/
Dtest_rfc2459.py47 substrate = pem.readBase64fromText(self.pem_text)
49 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
53 assert der_encoder.encode(asn1Object) == substrate
57 substrate = pem.readBase64fromText(self.pem_text)
59 … asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
63 assert der_encoder.encode(asn1Object) == substrate
83 substrate = pem.readBase64fromText(self.pem_text)
85 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
89 assert der_encoder.encode(asn1Object) == substrate
93 substrate = pem.readBase64fromText(self.pem_text)
[all …]
Dtest_rfc2315.py147 substrate = pem.readBase64fromText(self.pem_text_unordered)
149 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
153 assert der_encoder.encode(asn1Object) == substrate
157 substrate = pem.readBase64fromText(self.pem_text_reordered)
159 … asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
163 assert der_encoder.encode(asn1Object) == substrate
Dtest_rfc2560.py33 substrate = pem.readBase64fromText(self.pem_text)
35 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
39 assert der_encoder.encode(asn1Object) == substrate
72 substrate = pem.readBase64fromText(self.pem_text)
74 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
78 assert der_encoder.encode(asn1Object) == substrate
Dtest_rfc5280.py47 substrate = pem.readBase64fromText(self.pem_text)
49 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
53 assert der_encoder.encode(asn1Object) == substrate
73 substrate = pem.readBase64fromText(self.pem_text)
75 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
79 assert der_encoder.encode(asn1Object) == substrate
Dtest_rfc5208.py39 substrate = pem.readBase64fromText(self.pem_text)
41 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
45 assert der_encoder.encode(asn1Object) == substrate
65 substrate = pem.readBase64fromText(self.pem_text)
67 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
71 assert der_encoder.encode(asn1Object) == substrate
Dtest_rfc5652.py51 substrate = pem.readBase64fromText(self.pem_text)
77 substrate, asn1Spec=layers[next_layer]
82 assert der_encoder.encode(asn1Object) == substrate
84 substrate = getNextSubstrate[next_layer](asn1Object)
Dtest_rfc2437.py38 substrate = pem.readBase64fromText(self.pem_text)
40 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
44 assert der_encoder.encode(asn1Object) == substrate
Dtest_rfc2511.py40 substrate = pem.readBase64fromText(self.pem_text)
42 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
46 assert der_encoder.encode(asn1Object) == substrate
Dtest_rfc4210.py120 substrate = pem.readBase64fromText(self.pem_text)
122 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
126 assert der_encoder.encode(asn1Object) == substrate
Dtest_rfc2314.py48 substrate = pem.readBase64fromText(self.pem_text)
50 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
54 assert der_encoder.encode(asn1Object) == substrate
/external/python/pyasn1-modules/tools/
Dx509dump-rfc5280.py32 idx, substrate = pem.readPemBlocksFromFile( variable
36 if not substrate:
39 cert, rest = decoder.decode(substrate, asn1Spec=certType)
42 substrate = substrate[:-len(rest)] variable
46 assert encoder.encode(cert) == substrate, 'cert recode fails'
Dpkcs10dump.py29 idx, substrate = pem.readPemBlocksFromFile( variable
33 if not substrate:
36 cert, rest = decoder.decode(substrate, asn1Spec=certType)
39 substrate = substrate[:-len(rest)] variable
43 assert encoder.encode(cert) == substrate, 'cert recode fails'
Dcrldump.py30 …idx, substrate = pem.readPemBlocksFromFile(sys.stdin, ('-----BEGIN X509 CRL-----', '-----END X509 … variable
31 if not substrate:
34 key, rest = decoder.decode(substrate, asn1Spec=asn1Spec)
37 substrate = substrate[:-len(rest)] variable
41 assert encoder.encode(key) == substrate, 'pkcs8 recode fails'
Dx509dump.py30 idx, substrate = pem.readPemBlocksFromFile( variable
34 if not substrate:
37 cert, rest = decoder.decode(substrate, asn1Spec=certType)
40 substrate = substrate[:-len(rest)] variable
44 assert encoder.encode(cert) == substrate, 'cert recode fails'
Dpkcs8dump.py27 idx, substrate = pem.readPemBlocksFromFile( variable
32 if not substrate:
42 key, rest = decoder.decode(substrate, asn1Spec=asn1Spec)
45 substrate = substrate[:-len(rest)] variable
49 assert encoder.encode(key) == substrate, 'pkcs8 recode fails'
Dpkcs1dump.py29 idx, substrate = pem.readPemBlocksFromFile( variable
34 if not substrate:
44 key, rest = decoder.decode(substrate, asn1Spec=asn1Spec)
47 substrate = substrate[:-len(rest)] variable
51 assert encoder.encode(key) == substrate, 'pkcs8 recode fails'
Dpkcs7dump.py24 idx, substrate = pem.readPemBlocksFromFile( variable
28 assert substrate, 'bad PKCS7 data on input'
30 contentInfo, rest = decoder.decode(substrate, asn1Spec=rfc2315.ContentInfo())
33 substrate = substrate[:-len(rest)] variable
37 assert encoder.encode(contentInfo) == substrate, 're-encode fails'
Dcrmfdump.py26 substrate = pem.readBase64FromFile(sys.stdin) variable
27 if not substrate:
30 cr, rest = decoder.decode(substrate, asn1Spec=certReq)
34 assert encoder.encode(cr) == substrate, 'crmf recode fails'
Docsprspdump.py26 substrate = pem.readBase64FromFile(sys.stdin) variable
27 if not substrate:
30 cr, rest = decoder.decode(substrate, asn1Spec=ocspReq)
34 assert encoder.encode(cr) == substrate, 'OCSP request recode fails'
Docspreqdump.py26 substrate = pem.readBase64FromFile(sys.stdin) variable
27 if not substrate:
30 cr, rest = decoder.decode(substrate, asn1Spec=ocspReq)
34 assert encoder.encode(cr) == substrate, 'OCSP request recode fails'
Dcmpdump.py29 substrate = pem.readBase64FromFile(sys.stdin) variable
30 if not substrate:
33 pkiMsg, rest = decoder.decode(substrate, asn1Spec=pkiMessage)
37 assert encoder.encode(pkiMsg) == substrate, 'CMP message recode fails'
/external/python/pyasn1/pyasn1/codec/cer/
Dencoder.py19 substrate = (0,)
21 substrate = (255,)
22 return substrate, False, False
105 substrate = null
166 substrate += chunk
168 return substrate, True, True
192 substrate = null.join(components)
194 return substrate, True, True
212 substrate = null
215 substrate += encodeFun(value[idx], asn1Spec, **options)
[all …]
/external/python/pyasn1-modules/pyasn1_modules/
Dpem.py21 substrate = ''
42 substrate = ''.join([base64.b64decode(x) for x in certLines])
44 substrate = ''.encode().join([base64.b64decode(x.encode()) for x in certLines])
46 return idx, substrate
53 idx, substrate = readPemBlocksFromFile(fileObj, (startMarker, endMarker))
54 return substrate

12