aboutsummaryrefslogtreecommitdiff
path: root/pyasn1_modules/rfc7191.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-07-31 10:36:45 +0200
committerGitHub <noreply@github.com>2019-07-31 10:36:45 +0200
commit3e2e4419553287df3f6a4071b49c6049f78be4be (patch)
tree5385178e4699ee2fe1b1c4ce446564aefde5a1f2 /pyasn1_modules/rfc7191.py
parenta2a8bbbcf2dff6e625ce6d601f1af9e84270c049 (diff)
downloadpyasn1-modules-3e2e4419553287df3f6a4071b49c6049f78be4be.tar.gz
Make SIZE OF constraint operational (#46)
Changes `ValueSizeConstraint` erroneously applied to `SequenceOf` and `SetOf` objects via `subtypeConstraint` attribute to be applied via `sizeSpec` attribute. Although `sizeSpec` takes the same constraint objects as `subtypeConstraint`, the former is only verified on de/serialization i.e. when the [constructed] object at hand is fully populated, while the latter is applied to [scalar] types at the moment of instantiation. This change also bumps pyasn1 requirement to 0.4.6.
Diffstat (limited to 'pyasn1_modules/rfc7191.py')
-rw-r--r--pyasn1_modules/rfc7191.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyasn1_modules/rfc7191.py b/pyasn1_modules/rfc7191.py
index 167f17a..4f90be1 100644
--- a/pyasn1_modules/rfc7191.py
+++ b/pyasn1_modules/rfc7191.py
@@ -75,7 +75,7 @@ class SIREntityNames(univ.SequenceOf):
pass
SIREntityNames.componentType = SIREntityName()
-SIREntityNames.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
+SIREntityNames.sizeSpec=constraint.ValueSizeConstraint(1, MAX)
id_dn = univ.ObjectIdentifier('2.16.840.1.101.2.1.16.0')
@@ -254,4 +254,4 @@ cmsAttributesMapUpdate = {
cmsContentTypesMapUpdate = {
id_ct_KP_keyPackageError: KeyPackageError(),
id_ct_KP_keyPackageReceipt: KeyPackageReceipt(),
-} \ No newline at end of file
+}