We have seen pdf documents in the wild where the document is padded and the outermost element in the structure is of indefinate length
Description
Description
Event Timeline
Comment Actions
Actually this means that the BER encoding is broken. I would propose to not return an error in this case only if a new flag is passed to libksba.