-
Notifications
You must be signed in to change notification settings - Fork 624
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
Add: NASL bultin functions for certificate handling #1702
Conversation
77e4ee9
to
97a3201
Compare
97a3201
to
9acb47b
Compare
54611f6
to
2808ff5
Compare
2808ff5
to
1652b10
Compare
1652b10
to
1d8eb80
Compare
23428c9
to
7c2330e
Compare
7c2330e
to
53ed558
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good functionality wise. I had a few remarks about the code, which you can ignore if you want.
A random comment: This code makes me desperately want
https://doc.rust-lang.org/std/ops/trait.Try.html
We could just implement Try
for NaslValue
, making NaslValue::Null
the early return variant and make this code a joy to write. Unfortunately, it's still unstable :(
94573d7
to
3a755fa
Compare
3a755fa
to
d8a1ae8
Compare
d8a1ae8
to
91ca092
Compare
91ca092
to
51abb5a
Compare
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issuesrust/Cargo.toml
rust/Cargo.lock
Allowed Licenses: 0BSD, AGPL-3.0-or-later, Apache-2.0, BlueOak-1.0.0, BSD-2-Clause, BSD-3-Clause-Clear, BSD-3-Clause, BSL-1.0, CAL-1.0, CC-BY-3.0, CC-BY-4.0, CC-BY-SA-4.0, CC0-1.0, EPL-2.0, GPL-2.0-only, GPL-2.0-or-later, GPL-2.0, GPL-3.0-or-later, ISC, LGPL-2.0-only, LGPL-2.0-or-later, LGPL-2.1-only, LGPL-2.1-or-later, LGPL-2.1, LGPL-3.0-only, LGPL-3.0, LGPL-3.0-or-later, MIT, MPL-1.1, MPL-2.0, OFL-1.1, PSF-2.0, Python-2.0, Python-2.0.1, Unicode-DFS-2016, Unlicense OpenSSF ScorecardScorecard details
Scanned Files
|
311f804
to
b52e6e1
Compare
b52e6e1
to
cabb946
Compare
Added functions: cert_open, cert_query, cert_close
cabb946
to
2a23134
Compare
Added functions: cert_open, cert_query, cert_close
SC-1140
Currently the queries for
subject
andhostnames
are not complete and produce different results than in the c implementation.I wrote a NASL script with an example certificate to compare results between c and rust:
Currently the following query commands do not work like in the c implementation:subjecthostnamesThe issue here is, that the library I used does not contain the Subject Alternative Name extension.I also checked for other libraries handling certificates (rustls and x509-parser), but they all come with their drawbacks. Maybe the best solution would be to combine two of these libraries?All query parameters are now implemented.