8000 Error encoding a local GeneralizedTime object (without time zone) · Issue #46 · pyasn1/pyasn1 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Error encoding a local GeneralizedTime object (without time zone) #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
salarshad opened this issue Oct 12, 2023 · 0 comments
Open

Comments

@salarshad
Copy link

Hi,

I am getting the following error while encoding an object:

pyasn1.error.PyAsn1Error: Missing "Z" time zone specifier: <GeneralizedTime value object, tagSet <TagSet object, tags 128:0:0>, encoding us-ascii, payload [20230519154003]>

The asn1 object was previously created by decoding from bytes without any error. I am simply decoding from bytes, and then encoding again.

I have gone through the code, and find that the encoder class in the DER package uses the encoder class in the CER package where the time zone is a forced requirement in a datetime object.

But timezone is optional in the ASN.1 GeneralizedTime specification.

Is there a simple way to bypass the timezone requirement or does the code have to be modified?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0