Home
last modified time | relevance | path

Searched refs:asn1Object (Results 1 – 25 of 100) sorted by relevance

1234

/external/python/pyasn1-modules/tests/
Dtest_rfc4055.py34 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
36 assert asn1Object.prettyPrint()
37 assert asn1Object[0] == rfc4055.id_RSASSA_PSS
38 assert der_encoder.encode(asn1Object) == substrate
39 assert substrate == der_encoder.encode(asn1Object)
43 asn1Object, rest = der_decoder.decode(substrate,
47 assert asn1Object.prettyPrint()
48 assert der_encoder.encode(asn1Object) == substrate
49 assert not asn1Object['parameters'].hasValue()
60 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
[all …]
Dtest_rfc3279.py61 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
63 assert asn1Object.prettyPrint()
64 assert der_encode(asn1Object) == substrate
66 spki_a = asn1Object['tbsCertificate']['subjectPublicKeyInfo']['algorithm']
69 … spki_pk = asn1Object['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey'].asOctets()
76 … assert asn1Object['tbsCertificate']['signature']['algorithm'] == rfc3279.sha1WithRSAEncryption
77 assert asn1Object['signatureAlgorithm']['algorithm'] == rfc3279.sha1WithRSAEncryption
81 asn1Object, rest = der_decode(substrate,
85 assert asn1Object.prettyPrint()
86 assert der_encode(asn1Object) == substrate
[all …]
Dtest_rfc8419.py32 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
34 assert asn1Object.prettyPrint()
35 assert asn1Object['algorithm'] == rfc8419.id_Ed25519
36 assert not asn1Object['parameters'].isValue
37 assert der_encode(asn1Object) == substrate
48 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
50 assert asn1Object.prettyPrint()
51 assert asn1Object['algorithm'] == rfc8419.id_Ed448
52 assert not asn1Object['parameters'].isValue
53 assert der_encode(asn1Object) == substrate
[all …]
Dtest_rfc7191.py66 asn1Object, rest = der_decode (substrate, asn1Spec=self.asn1Spec)
68 assert asn1Object.prettyPrint()
69 assert der_encode(asn1Object) == substrate
71 assert asn1Object['contentType'] == rfc5652.id_signedData
72 sd, rest = der_decode (asn1Object['content'],
92 asn1Object, rest = der_decode (substrate,
96 assert asn1Object.prettyPrint()
97 assert der_encode(asn1Object) == substrate
99 assert asn1Object['contentType'] == rfc5652.id_signedData
101 assert asn1Object['content']['version'] == v3
[all …]
Dtest_rfc5280.py51 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
54 assert asn1Object.prettyPrint()
55 assert der_encode(asn1Object) == substrate
77 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
80 assert asn1Object.prettyPrint()
81 assert der_encode(asn1Object) == substrate
117 asn1Object, rest = der_decode(substrate,
122 assert asn1Object.prettyPrint()
123 assert der_encode(asn1Object) == substrate
125 sig_alg = asn1Object['tbsCertificate']['signature']
[all …]
Dtest_rfc6486.py81 asn1Object, rest = der_decode(substrate, asn1Spec=layers[next_layer])
83 assert asn1Object.prettyPrint()
84 assert der_encode(asn1Object) == substrate
86 substrate = getNextSubstrate[next_layer](asn1Object)
87 next_layer = getNextLayer[next_layer](asn1Object)
89 assert asn1Object['version'] == 0
90 for f in asn1Object['fileList']:
95 asn1Object, rest = der_decode(substrate,
99 assert asn1Object.prettyPrint()
100 assert der_encode(asn1Object) == substrate
[all …]
Dtest_rfc6482.py79 asn1Object, rest = der_decode(substrate, asn1Spec=layers[next_layer])
81 assert asn1Object.prettyPrint()
82 assert der_encode(asn1Object) == substrate
84 substrate = getNextSubstrate[next_layer](asn1Object)
85 next_layer = getNextLayer[next_layer](asn1Object)
87 assert asn1Object['version'] == 0
88 assert asn1Object['asID'] == 58363
92 asn1Object, rest = der_decode(substrate,
96 assert asn1Object.prettyPrint()
97 assert der_encode(asn1Object) == substrate
[all …]
Dtest_rfc2459.py49 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
52 assert asn1Object.prettyPrint()
53 assert der_encoder.encode(asn1Object) == substrate
59asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
62 assert asn1Object.prettyPrint()
63 assert der_encoder.encode(asn1Object) == substrate
85 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
88 assert asn1Object.prettyPrint()
89 assert der_encoder.encode(asn1Object) == substrate
95asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec, decodeOpenTypes=True)
[all …]
Dtest_rfc6960.py39 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
41 assert asn1Object.prettyPrint()
42 assert der_encode(asn1Object) == substrate
44 assert asn1Object['tbsRequest']['version'] == 0
47 for extn in asn1Object['tbsRequest']['requestExtensions']:
60 asn1Object, rest = der_decode(substrate,
64 assert asn1Object.prettyPrint()
65 assert der_encode(asn1Object) == substrate
67 assert asn1Object['tbsRequest']['version'] == 0
68 for req in asn1Object['tbsRequest']['requestList']:
[all …]
Dtest_rfc4073.py75 asn1Object, rest = der_decode(substrate, asn1Spec=layers[content_type])
77 assert asn1Object.prettyPrint()
78 assert der_encode(asn1Object) == substrate
81 for attr in asn1Object['attrs']:
84 return asn1Object
107 asn1Object = test_layer(substrate, this_layer)
108 for ci in asn1Object:
112 asn1Object = test_layer(substrate, this_layer)
113 substrate = getNextSubstrate[this_layer](asn1Object)
114 this_layer = getNextLayer[this_layer](asn1Object)
[all …]
Dtest_rfc8398.py30 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
32 assert asn1Object.prettyPrint()
33 assert der_encode(asn1Object) == substrate
35 assert asn1Object['otherName']['type-id'] in rfc5280.anotherNameMap.keys()
36 assert asn1Object['otherName']['type-id'] == rfc8398.id_on_SmtpUTF8Mailbox
38 eai, rest = der_decode(asn1Object['otherName']['value'],
39 asn1Spec=rfc5280.anotherNameMap[asn1Object['otherName']['type-id']])
42 assert der_encode(eai) == asn1Object['otherName']['value']
49 asn1Object, rest = der_decode(substrate,
53 assert asn1Object.prettyPrint()
[all …]
Dtest_rfc3560.py32 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
34 assert asn1Object.prettyPrint()
35 assert asn1Object[0] == rfc3560.id_RSAES_OAEP
36 assert der_encoder.encode(asn1Object) == substrate
37 assert substrate == der_encoder.encode(asn1Object)
48 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
50 assert asn1Object.prettyPrint()
51 assert asn1Object[0] == rfc3560.id_RSAES_OAEP
52 assert der_encoder.encode(asn1Object) == substrate
53 assert substrate == der_encoder.encode(asn1Object)
[all …]
Dtest_rfc5035.py64 asn1Object, rest = der_decode (substrate, asn1Spec=self.asn1Spec)
66 assert asn1Object.prettyPrint()
67 assert der_encode(asn1Object) == substrate
69 assert asn1Object['contentType'] == rfc5652.id_signedData
70 sd, rest = der_decode(asn1Object['content'], asn1Spec=rfc5652.SignedData())
73 assert der_encode(sd) == asn1Object['content']
119 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
121 assert asn1Object.prettyPrint()
122 assert der_encode(asn1Object) == substrate
124 assert asn1Object['contentType'] == rfc5652.id_signedData
[all …]
Dtest_rfc3565.py33 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
35 assert asn1Object.prettyPrint()
36 assert asn1Object[0] == rfc3565.id_aes256_wrap
37 assert der_encoder.encode(asn1Object) == substrate
48 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
50 assert asn1Object.prettyPrint()
51 assert asn1Object[0] == rfc3565.id_aes256_CBC
52 assert asn1Object[1].isValue
53 assert der_encoder.encode(asn1Object) == substrate
57 asn1Object, rest = der_decoder.decode(substrate,
[all …]
Dtest_rfc2634.py61 asn1Object, rest = der_decode (substrate, asn1Spec=self.asn1Spec)
63 assert asn1Object.prettyPrint()
64 assert der_encode(asn1Object) == substrate
66 assert asn1Object['contentType'] == rfc5652.id_signedData
67 sd, rest = der_decode(asn1Object['content'], asn1Spec=rfc5652.SignedData())
70 assert der_encode(sd) == asn1Object['content']
119 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
121 assert asn1Object.prettyPrint()
122 assert der_encode(asn1Object) == substrate
124 assert asn1Object['contentType'] == rfc5652.id_signedData
[all …]
Dtest_rfc6010.py32 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
34 assert asn1Object.prettyPrint()
35 assert der_encode(asn1Object) == substrate
37 assert asn1Object['extnID'] == rfc6010.id_pe_cmsContentConstraints
38 evalue, rest = der_decode(asn1Object['extnValue'],
42 assert der_encode(evalue) == asn1Object['extnValue']
60 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
62 assert asn1Object.prettyPrint()
63 assert der_encode(asn1Object) == substrate
65 assert asn1Object['extnID'] == rfc6010.id_pe_cmsContentConstraints
[all …]
Dtest_rfc5755.py53 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
55 assert asn1Object.prettyPrint()
56 assert der_encode(asn1Object) == substrate
57 assert asn1Object['acinfo']['version'] == 1
60 for attr in asn1Object['acinfo']['attributes']:
73 asn1Object, rest = der_decode(substrate,
77 assert asn1Object.prettyPrint()
78 assert der_encode(asn1Object) == substrate
79 assert asn1Object['acinfo']['version'] == 1
82 for attr in asn1Object['acinfo']['attributes']:
[all …]
Dtest_rfc3709.py47 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
49 assert asn1Object.prettyPrint()
50 assert der_encode(asn1Object) == substrate
53 for extn in asn1Object['tbsCertificate']['extensions']:
70 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
72 assert asn1Object.prettyPrint()
73 assert der_encode(asn1Object) == substrate
75 for extn in asn1Object['tbsCertificate']['extensions']:
140 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
142 assert asn1Object.prettyPrint()
[all …]
Dtest_rfc6031.py37 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
39 assert asn1Object.prettyPrint()
40 assert der_encode(asn1Object) == substrate
42 assert asn1Object['contentType'] in rfc5652.cmsContentTypesMap
43 asn1Spec = rfc5652.cmsContentTypesMap[asn1Object['contentType']]
44 skp, rest = der_decode(asn1Object['content'], asn1Spec=asn1Spec)
47 assert der_encode(skp) == asn1Object['content']
58 asn1Object, rest = der_decode(substrate,
62 assert asn1Object.prettyPrint()
63 assert der_encode(asn1Object) == substrate
[all …]
Dtest_rfc5934.py159 asn1Object, rest = der_decode(substrate, asn1Spec=layers[next_layer])
161 assert asn1Object.prettyPrint()
162 assert der_encode(asn1Object) == substrate
164 substrate = getNextSubstrate[next_layer](asn1Object)
165 next_layer = getNextLayer[next_layer](asn1Object)
169 asn1Object, rest = der_decode(substrate,
173 assert asn1Object.prettyPrint()
174 assert der_encode(asn1Object) == substrate
176 eci = asn1Object['content']['encapContentInfo']
260 asn1Object, rest = der_decode(substrate, asn1Spec=layers[next_layer])
[all …]
Dtest_rfc5958.py39 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
41 assert asn1Object.prettyPrint()
42 assert asn1Object['privateKeyAlgorithm']['algorithm'] == rfc8410.id_Ed25519
43 assert asn1Object['privateKey'].isValue
44 assert asn1Object['privateKey'].prettyPrint()[0:10] == "0x0420d4ee"
45 assert asn1Object['publicKey'].isValue
46 assert asn1Object['publicKey'].prettyPrint()[0:10] == "1164575857"
47 assert der_encode(asn1Object) == substrate
62 asn1Object, rest = der_decode(substrate,
65 assert asn1Object.prettyPrint()
[all …]
Dtest_rfc8619.py32 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
35 assert asn1Object.prettyPrint()
36 assert der_encoder.encode(asn1Object) == substrate
38 assert asn1Object['algorithm'] == rfc8619.id_alg_hkdf_with_sha256
51 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
54 assert asn1Object.prettyPrint()
55 assert der_encoder.encode(asn1Object) == substrate
57 assert asn1Object['algorithm'] == rfc8619.id_alg_hkdf_with_sha384
70 asn1Object, rest = der_decoder.decode(substrate, asn1Spec=self.asn1Spec)
73 assert asn1Object.prettyPrint()
[all …]
Dtest_rfc5084.py33 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
35 assert asn1Object.prettyPrint()
36 assert der_encode(asn1Object) == substrate
47 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
49 assert asn1Object.prettyPrint()
50 assert der_encode(asn1Object) == substrate
98 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
100 assert asn1Object.prettyPrint()
101 assert der_encode(asn1Object) == substrate
103 assert asn1Object['contentType'] == rfc5083.id_ct_authEnvelopedData
[all …]
Dtest_rfc5990.py35 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
37 assert asn1Object.prettyPrint()
38 assert der_encode(asn1Object) == substrate
40 assert asn1Object['algorithm'] == rfc5990.id_rsa_kem
41 rsa_kem_p, rest = der_decode(asn1Object['parameters'],
45 assert der_encode(rsa_kem_p) == asn1Object['parameters']
64 asn1Object, rest = der_decode(substrate,
68 assert asn1Object.prettyPrint()
69 assert der_encode(asn1Object) == substrate
71 assert asn1Object['algorithm'] == rfc5990.id_rsa_kem
[all …]
Dtest_rfc6032.py42 asn1Object, rest = der_decode(substrate, asn1Spec=self.asn1Spec)
44 assert asn1Object.prettyPrint()
45 assert der_encode(asn1Object) == substrate
46 assert asn1Object['contentType'] == rfc6032.id_ct_KP_encryptedKeyPkg
48 content, rest = der_decode(asn1Object['content'], rfc6032.EncryptedKeyPackage())
51 assert der_encode(content) == asn1Object['content']
67 asn1Object, rest = der_decode(substrate,
71 assert asn1Object.prettyPrint()
72 assert der_encode(asn1Object) == substrate
74 assert asn1Object['contentType'] in rfc5652.cmsContentTypesMap
[all …]

1234