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

Zgrab2 cannot automatically load the root certificate of the operating system #420

Open
jiaocoll opened this issue Apr 12, 2024 · 1 comment

Comments

@jiaocoll
Copy link
Contributor

Using the tls function of zgrab2, it was found that almost all tls requests were unable to verify the certificate chain, with surprisingly consistent error codes of x509: failed to load system roots and no roots provided.
What I expect is that zgrab2 can automatically load the root certificate of the operating system itself when I do not specify the root certificate parameters. But it didn't load. Later, by looking at the code, it was discovered that zcrypto seemed to have removed the part of the code that loaded the root certificate based on the system?
I think the parameters should be optional, not mandatory. When I don't specify a certificate, zgrab2 should automatically load the root certificate of the operating system.

@jiaocoll jiaocoll changed the title Zgrab2 cannot automatically load the certificate library of the operating system Zgrab2 cannot automatically load the root certificate of the operating system Apr 12, 2024
@mzpqnxow
Copy link
Contributor

mzpqnxow commented Aug 4, 2024

Using the tls function of zgrab2, it was found that almost all tls requests were unable to verify the certificate chain, with surprisingly consistent error codes of x509: failed to load system roots and no roots provided.

What I expect is that zgrab2 can automatically load the root certificate of the operating system itself when I do not specify the root certificate parameters. But it didn't load. Later, by looking at the code, it was discovered that zcrypto seemed to have removed the part of the code that loaded the root certificate based on the system?

I think the parameters should be optional, not mandatory. When I don't specify a certificate, zgrab2 should automatically load the root certificate of the operating system.

Personally I prefer that it doesn't try to automatically do anything not explicitly asked of it (like search for/guess where the CA bundle is on my system)

If you're saying that even when explicitly specified, it doesn't load the bundle, that may be an issue you can create in the zcrypto project

Maybe there's a reason it was removed, but seems it would be harmless to have it reference a bundle, but only if explicitly specified. There may be complications to changing that though, I'm not familiar with the code

tl; dr; this is probably better as an issue in the zcrypto repo

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