/external/python/pyasn1/pyasn1/codec/ber/ |
D | decoder.py | 27 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 …]
|
D | encoder.py | 37 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/ |
D | test_rfc2459.py | 47 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 …]
|
D | test_rfc2315.py | 147 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
|
D | test_rfc2560.py | 33 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
|
D | test_rfc5280.py | 47 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
|
D | test_rfc5208.py | 39 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
|
D | test_rfc5652.py | 51 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)
|
D | test_rfc2437.py | 38 substrate = pem.readBase64fromText(self.pem_text) 40 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec) 44 assert der_encoder.encode(asn1Object) == substrate
|
D | test_rfc2511.py | 40 substrate = pem.readBase64fromText(self.pem_text) 42 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec) 46 assert der_encoder.encode(asn1Object) == substrate
|
D | test_rfc4210.py | 120 substrate = pem.readBase64fromText(self.pem_text) 122 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec) 126 assert der_encoder.encode(asn1Object) == substrate
|
D | test_rfc2314.py | 48 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/ |
D | x509dump-rfc5280.py | 32 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'
|
D | pkcs10dump.py | 29 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'
|
D | crldump.py | 30 …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'
|
D | x509dump.py | 30 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'
|
D | pkcs8dump.py | 27 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'
|
D | pkcs1dump.py | 29 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'
|
D | pkcs7dump.py | 24 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'
|
D | crmfdump.py | 26 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'
|
D | ocsprspdump.py | 26 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'
|
D | ocspreqdump.py | 26 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'
|
D | cmpdump.py | 29 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/ |
D | encoder.py | 19 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/ |
D | pem.py | 21 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
|