/external/python/pyasn1/tests/type/ |
D | test_univ.py | 19 from pyasn1.type import univ 31 assert univ.NoValue() is univ.NoValue(), 'NoValue is not a singleton' 35 repr(univ.noValue) 42 assert isinstance(univ.noValue, univ.NoValue), 'isinstance() on NoValue() object fails' 49 str(univ.noValue) 59 len(univ.noValue) 69 univ.noValue == 1 79 univ.noValue[0] 89 univ.noValue['key'] 99 univ.noValue['key'] = 123 [all …]
|
D | test_namedtype.py | 18 from pyasn1.type import univ 25 self.e = namedtype.NamedType('age', univ.Integer(0)) 29 assert n == 'age' or t == univ.Integer(), 'unpack fails' 40 namedtype.NamedType('first-name', univ.OctetString('')), 41 namedtype.OptionalNamedType('age', univ.Integer(0)), 42 namedtype.NamedType('family-name', univ.OctetString('')) 54 assert self.e[0] == namedtype.NamedType('first-name', univ.OctetString('')) 60 assert self.e.getTypeByPosition(0) == univ.OctetString(''), \ 73 univ.OctetString.tagSet: univ.OctetString('') 76 univ.Integer.tagSet: univ.Integer(0), [all …]
|
/external/python/pyasn1-modules/pyasn1_modules/ |
D | rfc2459.py | 22 from pyasn1.type import univ 32 ub_name = univ.Integer(32768) 33 ub_common_name = univ.Integer(64) 34 ub_locality_name = univ.Integer(128) 35 ub_state_name = univ.Integer(128) 36 ub_organization_name = univ.Integer(64) 37 ub_organizational_unit_name = univ.Integer(64) 38 ub_title = univ.Integer(64) 39 ub_match = univ.Integer(128) 40 ub_emailaddress_length = univ.Integer(128) [all …]
|
D | rfc6402.py | 19 from pyasn1.type import univ 32 if isinstance(x, univ.ObjectIdentifier): 37 return univ.ObjectIdentifier(output) 40 class ChangeSubjectName(univ.Sequence): 50 class AttributeValue(univ.Any): 54 class CMCStatus(univ.Integer): 69 class PendInfo(univ.Sequence): 74 namedtype.NamedType('pendToken', univ.OctetString()), 78 bodyIdMax = univ.Integer(4294967295) 81 class BodyPartID(univ.Integer): [all …]
|
D | rfc3279.py | 11 from pyasn1.type import univ 17 if isinstance(x, univ.ObjectIdentifier): 22 return univ.ObjectIdentifier(output) 31 class DSAPublicKey(univ.Integer): 35 class Dss_Parms(univ.Sequence): 37 namedtype.NamedType('p', univ.Integer()), 38 namedtype.NamedType('q', univ.Integer()), 39 namedtype.NamedType('g', univ.Integer()) 46 class Dss_Sig_Value(univ.Sequence): 48 namedtype.NamedType('r', univ.Integer()), [all …]
|
D | rfc1902.py | 15 from pyasn1.type import univ 18 class Integer(univ.Integer): 19 subtypeSpec = univ.Integer.subtypeSpec + constraint.ValueRangeConstraint( 24 class Integer32(univ.Integer): 25 subtypeSpec = univ.Integer.subtypeSpec + constraint.ValueRangeConstraint( 30 class OctetString(univ.OctetString): 31 subtypeSpec = univ.Integer.subtypeSpec + constraint.ValueSizeConstraint( 36 class IpAddress(univ.OctetString): 37 tagSet = univ.OctetString.tagSet.tagImplicitly( 40 subtypeSpec = univ.OctetString.subtypeSpec + constraint.ValueSizeConstraint( [all …]
|
D | rfc3280.py | 20 from pyasn1.type import univ 29 if isinstance(x, univ.ObjectIdentifier): 34 return univ.ObjectIdentifier(output) 37 unformatted_postal_address = univ.Integer(16) 39 ub_organizational_units = univ.Integer(4) 41 ub_organizational_unit_name_length = univ.Integer(32) 51 class OrganizationalUnitNames(univ.SequenceOf): 59 class AttributeType(univ.ObjectIdentifier): 67 ub_pds_parameter_length = univ.Integer(30) 70 class PDSParameter(univ.Set): [all …]
|
D | rfc5280.py | 21 from pyasn1.type import univ 30 if isinstance(x, univ.ObjectIdentifier): 35 return univ.ObjectIdentifier(output) 38 ub_e163_4_sub_address_length = univ.Integer(40) 40 ub_e163_4_number_length = univ.Integer(15) 42 unformatted_postal_address = univ.Integer(16) 45 class TerminalType(univ.Integer): 59 class Extension(univ.Sequence): 64 namedtype.NamedType('extnID', univ.ObjectIdentifier()), 65 namedtype.DefaultedNamedType('critical', univ.Boolean().subtype(value=0)), [all …]
|
D | rfc2511.py | 19 id_pkix = univ.ObjectIdentifier('1.3.6.1.5.5.7') 20 id_pkip = univ.ObjectIdentifier('1.3.6.1.5.5.7.5') 21 id_regCtrl = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.1') 22 id_regCtrl_regToken = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.1.1') 23 id_regCtrl_authenticator = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.1.2') 24 id_regCtrl_pkiPublicationInfo = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.1.3') 25 id_regCtrl_pkiArchiveOptions = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.1.4') 26 id_regCtrl_oldCertID = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.1.5') 27 id_regCtrl_protocolEncrKey = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.1.6') 28 id_regInfo = univ.ObjectIdentifier('1.3.6.1.5.5.7.5.2') [all …]
|
D | rfc2437.py | 16 from pyasn1.type import univ 20 pkcs_1 = univ.ObjectIdentifier('1.2.840.113549.1.1') 21 rsaEncryption = univ.ObjectIdentifier('1.2.840.113549.1.1.1') 22 md2WithRSAEncryption = univ.ObjectIdentifier('1.2.840.113549.1.1.2') 23 md4WithRSAEncryption = univ.ObjectIdentifier('1.2.840.113549.1.1.3') 24 md5WithRSAEncryption = univ.ObjectIdentifier('1.2.840.113549.1.1.4') 25 sha1WithRSAEncryption = univ.ObjectIdentifier('1.2.840.113549.1.1.5') 26 rsaOAEPEncryptionSET = univ.ObjectIdentifier('1.2.840.113549.1.1.6') 27 id_RSAES_OAEP = univ.ObjectIdentifier('1.2.840.113549.1.1.7') 28 id_mgf1 = univ.ObjectIdentifier('1.2.840.113549.1.1.8') [all …]
|
D | rfc2251.py | 19 from pyasn1.type import univ 21 maxInt = univ.Integer(2147483647) 24 class LDAPString(univ.OctetString): 28 class LDAPOID(univ.OctetString): 48 class AttributeDescriptionList(univ.SequenceOf): 52 class AttributeValue(univ.OctetString): 56 class AssertionValue(univ.OctetString): 60 class AttributeValueAssertion(univ.Sequence): 67 class Attribute(univ.Sequence): 70 namedtype.NamedType('vals', univ.SetOf(componentType=AttributeValue())) [all …]
|
D | rfc2560.py | 27 from pyasn1.type import univ 37 class CRLReason(univ.Enumerated): 56 class GeneralName(univ.OctetString): 62 id_kp_OCSPSigning = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 3, 9)) 63 id_pkix_ocsp = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 48, 1)) 64 id_pkix_ocsp_basic = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 48, 1, 1)) 65 id_pkix_ocsp_nonce = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 48, 1, 2)) 66 id_pkix_ocsp_crl = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 48, 1, 3)) 67 id_pkix_ocsp_response = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 48, 1, 4)) 68 id_pkix_ocsp_nocheck = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 48, 1, 5)) [all …]
|
D | rfc2315.py | 18 class Attribute(univ.Sequence): 21 namedtype.NamedType('values', univ.SetOf(componentType=AttributeValue())) 25 class AttributeValueAssertion(univ.Sequence): 33 pkcs_7 = univ.ObjectIdentifier('1.2.840.113549.1.7') 34 data = univ.ObjectIdentifier('1.2.840.113549.1.7.1') 35 signedData = univ.ObjectIdentifier('1.2.840.113549.1.7.2') 36 envelopedData = univ.ObjectIdentifier('1.2.840.113549.1.7.3') 37 signedAndEnvelopedData = univ.ObjectIdentifier('1.2.840.113549.1.7.4') 38 digestedData = univ.ObjectIdentifier('1.2.840.113549.1.7.5') 39 encryptedData = univ.ObjectIdentifier('1.2.840.113549.1.7.6') [all …]
|
D | rfc4210.py | 16 from pyasn1.type import univ 26 class KeyIdentifier(univ.OctetString): 42 class PKIFreeText(univ.SequenceOf): 47 subtypeSpec = univ.SequenceOf.subtypeSpec + constraint.ValueSizeConstraint(1, MAX) 50 class PollRepContent(univ.SequenceOf): 59 class CertReq(univ.Sequence): 61 namedtype.NamedType('certReqId', univ.Integer()), 62 namedtype.NamedType('checkAfter', univ.Integer()), 69 class PollReqContent(univ.SequenceOf): 77 class CertReq(univ.Sequence): [all …]
|
D | rfc3852.py | 18 from pyasn1.type import univ 30 if isinstance(x, univ.ObjectIdentifier): 35 return univ.ObjectIdentifier(output) 38 class AttributeValue(univ.Any): 42 class Attribute(univ.Sequence): 47 namedtype.NamedType('attrType', univ.ObjectIdentifier()), 48 namedtype.NamedType('attrValues', univ.SetOf(componentType=AttributeValue())) 52 class SignedAttributes(univ.SetOf): 60 class OtherRevocationInfoFormat(univ.Sequence): 65 namedtype.NamedType('otherRevInfoFormat', univ.ObjectIdentifier()), [all …]
|
D | rfc5652.py | 18 from pyasn1.type import univ 30 if isinstance(x, univ.ObjectIdentifier): 35 return univ.ObjectIdentifier(output) 38 class AttCertVersionV1(univ.Integer): 47 class AttributeCertificateInfoV1(univ.Sequence): 54 'subject', univ.Choice( 65 namedtype.NamedType('attributes', univ.SequenceOf(componentType=rfc5280.Attribute())), 71 class AttributeCertificateV1(univ.Sequence): 78 namedtype.NamedType('signature', univ.BitString()) 82 class AttributeValue(univ.Any): [all …]
|
D | rfc1155.py | 18 from pyasn1.type import univ 21 class ObjectName(univ.ObjectIdentifier): 25 class SimpleSyntax(univ.Choice): 27 namedtype.NamedType('number', univ.Integer()), 28 namedtype.NamedType('string', univ.OctetString()), 29 namedtype.NamedType('object', univ.ObjectIdentifier()), 30 namedtype.NamedType('empty', univ.Null()) 34 class IpAddress(univ.OctetString): 35 tagSet = univ.OctetString.tagSet.tagImplicitly( 38 subtypeSpec = univ.Integer.subtypeSpec + constraint.ValueSizeConstraint( [all …]
|
D | rfc3281.py | 19 from pyasn1.type import univ 30 if isinstance(x, univ.ObjectIdentifier): 35 return univ.ObjectIdentifier(output) 38 class ObjectDigestInfo(univ.Sequence): 43 namedtype.NamedType('digestedObjectType', univ.Enumerated( 45 namedtype.OptionalNamedType('otherObjectTypeID', univ.ObjectIdentifier()), 47 namedtype.NamedType('objectDigest', univ.BitString()) 51 class IssuerSerial(univ.Sequence): 62 class TargetCert(univ.Sequence): 73 class Target(univ.Choice): [all …]
|
D | rfc4211.py | 20 from pyasn1.type import univ 31 if isinstance(x, univ.ObjectIdentifier): 36 return univ.ObjectIdentifier(output) 46 class SinglePubInfo(univ.Sequence): 51 namedtype.NamedType('pubMethod', univ.Integer( 61 class PKMACValue(univ.Sequence): 67 namedtype.NamedType('value', univ.BitString()) 71 class POPOSigningKeyInput(univ.Sequence): 77 'authInfo', univ.Choice( 92 class POPOSigningKey(univ.Sequence): [all …]
|
/external/python/pyasn1/tests/codec/native/ |
D | test_decoder.py | 18 from pyasn1.type import univ 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 …]
|
D | test_encoder.py | 18 from pyasn1.type import univ 38 assert encoder.encode(univ.Integer(12)) == 12 41 assert encoder.encode(univ.Integer(-12)) == -12 46 assert encoder.encode(univ.Boolean(1)) is True 49 assert encoder.encode(univ.Boolean(0)) is False 55 self.b = univ.BitString((1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1)) 64 self.o = univ.OctetString('Quick brown fox') 72 assert encoder.encode(univ.Null('')) is None 77 assert encoder.encode(univ.ObjectIdentifier((1, 3, 6, 0, 12345))) == '1.3.6.0.12345' 82 assert encoder.encode(univ.Real((123, 10, 11))) == 1.23e+13 [all …]
|
/external/python/pyasn1/tests/codec/ber/ |
D | test_encoder.py | 20 from pyasn1.type import univ 31 self.o = univ.Integer().subtype( 41 assert encoder.encode(univ.Integer(12)) == ints2octs((2, 1, 12)) 44 assert encoder.encode(univ.Integer(-12)) == ints2octs((2, 1, 244)) 47 assert encoder.encode(univ.Integer(0)) == ints2octs((2, 1, 0)) 51 substrate = encoder.encode(univ.Integer(0)) 56 assert encoder.encode(univ.Integer(-1)) == ints2octs((2, 1, 255)) 60 univ.Integer(0xffffffffffffffff) 65 univ.Integer(-0xffffffffffffffff) 71 assert encoder.encode(12, asn1Spec=univ.Integer()) == ints2octs((2, 1, 12)) [all …]
|
/external/python/pyasn1/tests/codec/cer/ |
D | test_encoder.py | 18 from pyasn1.type import univ 27 assert encoder.encode(univ.Boolean(1)) == ints2octs((1, 1, 255)) 30 assert encoder.encode(univ.Boolean(0)) == ints2octs((1, 1, 0)) 36 univ.BitString((1, 0) * 5) 40 …assert encoder.encode(univ.BitString((1, 0) * 501)) == ints2octs((3, 127, 6) + (170,) * 125 + (128… 46 univ.OctetString('Quick brown fox') 51 univ.OctetString('Q' * 1001) 157 s = univ.SequenceOf() 161 s = univ.SequenceOf() 162 s.append(univ.OctetString('a')) [all …]
|
/external/python/pyasn1/docs/source/pyasn1/type/univ/ |
D | contents.rst | 2 .. _type.univ: 13 Example of simple types include :ref:`Integer <univ.Integer>` or 14 :ref:`OctetString <univ.OctetString>`. Constructed types like 15 :ref:`Sequence <univ.Sequence>` embed other types, both simple 21 /pyasn1/type/univ/integer 22 /pyasn1/type/univ/boolean 23 /pyasn1/type/univ/bitstring 24 /pyasn1/type/univ/octetstring 25 /pyasn1/type/univ/null 26 /pyasn1/type/univ/objectidentifier [all …]
|
/external/python/pyasn1/tests/codec/der/ |
D | test_encoder.py | 19 from pyasn1.type import univ 27 univ.OctetString('Quick brown fox') 32 univ.OctetString('Q' * 10000) 39 univ.BitString((1,)) 44 univ.BitString((1,) * 80000) 52 self.s = univ.SetOf(componentType=univ.OctetString()) 87 c = univ.Choice(componentType=namedtype.NamedTypes( 88 namedtype.NamedType('name', univ.OctetString()), 89 namedtype.NamedType('amount', univ.Boolean())) 92 self.s = univ.Set(componentType=namedtype.NamedTypes( [all …]
|