Age | Commit message (Collapse) | Author |
|
am: 1fab31ffd7
Change-Id: I231c58c0cdb60b8e7dcf9c017d247ee6f9f01c75
|
|
Exempt-From-Owner-Approval: upgrade library
Test: None
Change-Id: I32f32feccdfbafdd24e3c9d005c0b22f5527735f
|
|
|
|
|
|
Added `WithComponentsConstraint` along with related
`ComponentPresentConstraint` and `ComponentAbsentConstraint` classes
to be used with `Sequence`/`Set` types representing
`SET ... WITH COMPONENTS ...` like ASN.1 constructs.
|
|
|
|
This commit deprecates `subtypeSpec` attributes and keyword argument.
It is now recommended to pass `ValueSizeConstraint`, as well as all
other constraints, to `subtypeSpec`.
By way of the change mentioned above, this commit fixes a design bug
in a way of how the items assigned to constructed types are verified.
Now if `Asn1Type`-based object is assigned, its compatibility is
verified based on having all tags and constraint objects as the type
in field definition. When a bare Python value is assigned, then field
type object is cloned and initialized with the bare value (constraints
verificaton would run at this moment).
|
|
Added `isInconsistent` property to all constructed types. This property
conceptually replaces `verifySizeSpec` method to serve a more general
purpose e.g. ensuring all required fields are in a good shape. By
default this check invokes subtype constraints verification and is run
by codecs on value de/serialisation.
|
|
|
|
|
|
am: 7e6d5fd777
Change-Id: Ic18f542a2d34010f5c6bb149e015908e18785a54
|
|
Exempt-From-Owner-Approval: Upgrade library
Test: None
Change-Id: I94305762a92ba908aa8c1f78abdc44bc28e1e53a
|
|
|
|
|
|
|
|
am: 6e6b0c0c3f
Change-Id: I2d2eec8a2e13e075b570d734f9609c4b68975aa4
|
|
Bug: 124250384
Test: atest
Exempt-From-Owner-Approval: Adding dependent target tests
Change-Id: I1d9bcaacc1eff07a0100fdf3f91938e095cc4e22
|
|
Also many fixes here and there to docs and docstrings.
|
|
|
|
|
|
It seems to clutter representation printout, especially in the
rendered docs.
|
|
|
|
Also fix references to exception objects in other docstrings.
|
|
|
|
Prior to this fix, recursively encoded open types won't get
fully decoded all the way.
|
|
* Fix CER/DER encoders to respect open types
Added a bunch of unit tests to CER/DER codecs covering open types.
|
|
|
|
am: 2559a64723
Change-Id: Ida3e88d18013be67e0a63c3abc99e9e476b5b052
|
|
|
|
Exempt-From-Owner-Approval: Upgrade library
Test: build
Change-Id: I879edd58806f3b9b7fbf8cc78d02c684b5b336ae
|
|
This change adds more explanations and examples on ASN.1 ANY
DEFINED BY syntax (OpenType).
|
|
|
|
For example:
AttributeTypeAndValues ::= SEQUENCE {
type OBJECT IDENTIFIER,
values SET OF ANY DEFINED BY type
}
This patch adds support of the above ASN.1 syntax to BER/DER/CER
codecs.
It appears that to implement this feature properly, `SetOf`/`SequenceOf`
pyasn1 types need to have `.componentType` wrapped into something
similar to `NamedType` that `Set`/`Sequence` have. That additional
layer would then carry the open type meta information. Without it,
`Sequence`/`Set` codec needs to signal `SetOf`/`SequenceOf` codec
of the open type being processed, which is a slight hack.
A other inconvenience is that when `SetOf`/`SequenceOf` deal with
an open type component, they should not verify types on component
assignment. Without open type property in `SetOf`/`SequenceOf`,
the code checks for `Any` component type which is another hack.
The above shortcomings should be addressed in the follow up patch.
|
|
|
|
- Added support for subseconds CER/DER encoding edge cases in
`GeneralizedTime` codec
- Fixed 3-digit fractional seconds value CER/DER encoding of
`GeneralizedTime`
|
|
The new exception classes names are `PyAsn1UnicodeDecodeError`
and `PyAsn1UnicodeEncodeError`.
Also, unit tests added.
|
|
This change helps telling unicode-related exceptions from other PyAsn1Error exceptions.
|
|
Fixes `AnyDecoder` to accept `TagMap` as `asn1Spec`.
The use-case is to make `AnyDecoder` operational when
dumping raw value on error condition is enabled
|
|
* Add `omitEmptyOptionals` encoder option
Added `omitEmptyOptionals` option which is respected by `Sequence`
and `Set` encoders. When `omitEmptyOptionals` is set to `True`, empty
initialized optional components are not encoded. Default is `False`.
* Change `SequenceOf`/`SetOf` behaviour
- New elements to `SequenceOf`/`SetOf` objects can now be added at any
position - the requirement for the new elements to reside at the end
of the existing ones (i.e. s[len(s)] = 123) is removed.
- Removed default initializer from `SequenceOf`/`SetOf` types to ensure
consistent behaviour with the rest of ASN.1 types. Before this change,
`SequenceOf`/`SetOf` instances immediately become value objects
behaving like an empty list. With this change, `SequenceOf`/`SetOf`
objects remain schema objects unless a component is added or
`.clear()` is called.
- Added `.reset()` method to all constructed types to turn value object
into a schema object.
|
|
(#161)
|
|
am: 9812db06f0 -s ours
am skip reason: subject contains skip directive
Change-Id: I440fd956546201f1cf063281328781271c1abdd7
|
|
Bug: 120848293
Change-Id: I73e2dbe8ef6649f22055ce284f31dff6e4ec7a1a
|
|
am: 3cc4672de3
Change-Id: Ie06af065d11a36a0a89157d0978727ec0b2daa44
|
|
am: ea06e6e375
Change-Id: I83f1f069515c912322f3d0e8241dd16ea13a50f7
|
|
am: e35592b4ed
Change-Id: I841643628adc3369a2ff54b50eaa499db4472f89
|
|
Bug: 33166666
Test: gerrit uploader
Change-Id: Iaae475873005fd8ce47921f8577a8bc4f5cdf953
|
|
|
|
Also extend copyright to the year 2019
|
|
|
|
In hope to get more builds and because Trusty should be the way
to go.
|