You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpyasn1_modulesfrompyasn1_modulesimportrfc5280print(pyasn1_modules.__version__)
nonempty_san=rfc5280.SubjectAltName()
nonempty_san.append(rfc5280.GeneralName())
# This works fine.bool(nonempty_san)
empty_san=rfc5280.SubjectAltName()
# This crashes.bool(empty_san)
$ python test.py
0.3.0
Traceback (most recent call last):
File "/tmp/test.py", line 13, in <module>
bool(empty_san)
File "/tmp/venv.QYC/lib/python3.9/site-packages/pyasn1/type/base.py", line 571, in __bool__
return bool(self.components)
File "/tmp/venv.QYC/lib/python3.9/site-packages/pyasn1/type/univ.py", line 1944, in components
for idx in sorted(self._componentValues)]
File "/tmp/venv.QYC/lib/python3.9/site-packages/pyasn1/type/base.py", line 213, in plug
raise error.PyAsn1Error('Attempted "%s" operation on ASN.1 schema object' % name)
pyasn1.error.PyAsn1Error: Attempted "__iter__" operation on ASN.1 schema object
The text was updated successfully, but these errors were encountered:
Here's an example script demonstrating the crash:
The text was updated successfully, but these errors were encountered: