Skip to content
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

cacert certificate rejected by unpackCertificate #23

Open
timhemel opened this issue Apr 7, 2019 · 2 comments
Open

cacert certificate rejected by unpackCertificate #23

timhemel opened this issue Apr 7, 2019 · 2 comments

Comments

@timhemel
Copy link
Contributor

timhemel commented Apr 7, 2019

The archive at https://archive.synology.com/download/DSM/release/6.2.1/23824/DSM_DS112+_23824.pat contains a certificate file that is unpacked to

unpack/DSM_DS112+_23824.pat-tar-1/hda1.tgz-xz-1/unpacked-from-xz-tar-1/usr/lib/python2.7/ensurepip/_bundled/pip-8.1.1-py2.py3-none-any.whl-zip-1/pip/_vendor/requests/cacert.pem

unpackCertificate rejects this file and says that it is not a certificate.

@timhemel
Copy link
Contributor Author

timhemel commented Apr 7, 2019

The error is when unpacking by extension:

FAIL DSM_DS112+_23824.pat-tar-1/hda1.tgz-xz-1/unpacked-from-xz-tar-1/usr/lib/python2.7/ensurepip/_bundled/pip-8.1.1-py2.py3-none-any.whl-zip-1/pip/_vendor/requests/cacert.pem known extension .pem: not a valid certificate (no begin)

At the same time, it extracts 166 certificates from this file, which are the certificates in this file.

@armijnhemel
Copy link
Owner

The two possibilities that are tried both give errors:

$ openssl asn1parse -inform DER -in cacert.pem
0:d=0 hl=2 l= 35 prim: ENUMERATED :204973737565723A204F3D45717569666178204F553D45717569666178205365637572
37:d=0 hl=2 l= 32 cons: appl [ 5 ]
Error in encoding
139851339802432:error:0D07209B:asn1 encoding routines:ASN1_get_object:too long:crypto/asn1/asn1_lib.c:91:

$ openssl asn1parse -inform PEM -in cacert.pem
Error: offset out of range

meaning that likely another command needs to be used for it instead of asn1parse.

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

2 participants