/external/python/pyasn1-modules/tools/ |
crldump.py | 30 idx, substrate = pem.readPemBlocksFromFile(sys.stdin, ('-----BEGIN X509 CRL-----', '-----END X509 CRL-----')) 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'
|
pkcs10dump.py | 9 # parse each into plain text, then build substrate from it 29 idx, substrate = pem.readPemBlocksFromFile( 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'
|
pkcs1dump.py | 29 idx, substrate = pem.readPemBlocksFromFile( 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'
|
pkcs8dump.py | 9 # format on stdin, parse each into plain text, then build substrate from it 27 idx, substrate = pem.readPemBlocksFromFile( 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'
|
x509dump-rfc5280.py | 11 # then build substrate from it (using RFC5280) 32 idx, substrate = pem.readPemBlocksFromFile( 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'
|
x509dump.py | 9 # then build substrate from it 30 idx, substrate = pem.readPemBlocksFromFile( 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'
|
crmfdump.py | 9 # plain text, then build substrate from it 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'
|
ocspreqdump.py | 9 # plain text, then build substrate from it 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'
|
ocsprspdump.py | 9 # plain text, then build substrate from it 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'
|
cmpdump.py | 9 # plain text, then build substrate from it 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'
|
pkcs7dump.py | 9 # then build substrate from it 24 idx, substrate = pem.readPemBlocksFromFile( 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'
|
/external/python/pyasn1-modules/tests/ |
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...] |
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
|
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
|
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
|
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
|
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)
|
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
|
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
|
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
|
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
|
/external/python/pyasn1-modules/pyasn1_modules/ |
pem.py | 14 # Return is (marker-index, substrate) 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
|
/external/python/pyasn1/pyasn1/codec/ber/ |
decoder.py | 27 def valueDecoder(self, substrate, asn1Spec, 33 def indefLenValueDecoder(self, substrate, asn1Spec, 42 def substrateCollector(asn1Object, substrate, length): 43 return substrate[:length], substrate[length:] 59 def valueDecoder(self, substrate, asn1Spec, 66 substrate, length 69 head, tail = substrate[:length], substrate[length:] 75 def indefLenValueDecoder(self, substrate, asn1Spec [all...] |
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 [all...] |
/external/python/pyasn1/pyasn1/codec/cer/ |
decoder.py | 18 def valueDecoder(self, substrate, asn1Spec, 22 head, tail = substrate[:length], substrate[length:] 72 #: substrate: :py:class:`bytes` (Python 3) or :py:class:`str` (Python 2) 85 #: A tuple of pyasn1 object recovered from CER substrate (:py:class:`~pyasn1.type.base.PyAsn1Item` derivative) 86 #: and the unprocessed trailing portion of the *substrate* (may be empty)
|