diff options
author | Ilya Etingof <etingof@gmail.com> | 2019-07-06 14:04:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-06 14:04:53 +0200 |
commit | b5e2eebe53736eb96f3baf5c17ae953261e09d6c (patch) | |
tree | dac2f96248bee477ef0a25a67fb34090bd1eca65 /CHANGES.rst | |
parent | ba302699d8fc791760829aa9a6b014563eedbf2c (diff) | |
download | pyasn1-git-b5e2eebe53736eb96f3baf5c17ae953261e09d6c.tar.gz |
Add `SET|SEQUENCE OF ANY` encoding support (#165)
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.
Diffstat (limited to 'CHANGES.rst')
-rw-r--r-- | CHANGES.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 448e372..26d4978 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,7 @@ Revision 0.4.6, released XX-06-2019 ----------------------------------- +- Added previously missing `SET OF ANY` construct encoding/decoding support. - 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`. |