-
Notifications
You must be signed in to change notification settings - Fork 621
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
base: main
Are you sure you want to change the base?
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
Added functions: cert_open, cert_query, cert_close
91ca092
to
51abb5a
Compare
Dependency ReviewThe following issues were found:
|
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.