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

Extended folder path to intermediate certs causes guard to fail with "malformed path in archive" error #3

Open
gmmd001 opened this issue Oct 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@gmmd001
Copy link

gmmd001 commented Oct 7, 2024

Describe the bug

Certs that have a folder structure more than one level deep to the "intermediate" folder in the certificates.tgz fail.

Expected behavior

Should be able to parse the path to the intermediate or root folder

Current behavior

Error: guard.py throws "malformed file path in archive"

Possible solution

Nuke the empty folder structure during tgz creation in chain, or allow traversing multiple folder levels in guard

Steps to reproduce

  1. Select all four root stores (apple, mozilla, microsoft and google) - not sure which one is pulling in the problematic certs
  2. Run chain and then examine the certificates.tgz folder structure. Look at these certs:
    "9231_I.CA_Root_CA/ECC_05/2022","3808CE3E961CA532682FFB8708B544E8F175AA065601A45902DF92128FC38532"
    "9232_I.CA_Root_CA/ECC_12/2016","B8692148FF49C3799FA2347AE28BCC5289623512B67DC19170452ADE24BA51D5"
    "9233_I.CA_Root_CA/RSA","D3D607A9FF24A19523B6DA9D2C649446F8788CB96D9FD130972E120C13677730"
    "9234_I.CA_Root_CA/RSA_05/2022","D279C01A12E8DD9A6230E459FAA447CEB336998477338C2EE4135C96737418EB"
    "9235_I.CA_TLS_Root_CA/RSA_05/2022","F9A17A00E5C294BA9614A715819AF57F3FD48CC413453FBB8A5FC7E97964E2BC"
    All five of these have multiple empty folders between the root folder and the certificate
  3. Run guard and get the malformed path error

Screenshots

(https://github.com/user-attachments/assets/c708236b-31f1-4f71-8ec3-93d054aea848)

Context

Prevents a full load of the certificates

Your Environment

  • Version used:
  • python 3.10.12
  • Ubuntu 22.04.5 LTS
@gmmd001 gmmd001 added the bug Something isn't working label Oct 7, 2024
@kevinsteves
Copy link
Collaborator

Thank you. I can duplicate this bug, and will work on a fix.

@gmmd001
Copy link
Author

gmmd001 commented Oct 9, 2024

Excellent, thanks!

kevinsteves added a commit that referenced this issue Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants