rusticata / x509-parser

X.509 parser written in pure Rust. Fast, zero-copy, safe.
Other
206 stars 67 forks source link

Update to x509-parser 0.15.0 #140

Closed serpilliere closed 1 year ago

serpilliere commented 1 year ago

Hi Pierre,

First of all, great work for x509-parser! The package x509-parser is a dependency of the Sanzu project (https://github.com/cea-sec/sanzu). Recently, dependabot made a pull request for the update of x509-parser to version 0.15.

But the update generates the following compilation error on the x509-parser dependency (windows, debian, alma8/9 and alpine):

   ...
   Compiling x509-parser v0.15.0
error[E0425]: cannot find value `OID_PKCS9_CHALLENGE_PASSWORD` in this scope
  --> /SRC/target/.cargo/registry/src/github.com-1ecc6299db9ec823/x509-parser-0.15.0/src/cri_attributes.rs:99:17
   |
99 |                 OID_PKCS9_CHALLENGE_PASSWORD,
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `x509-parser` due to previous error
warning: build failed, waiting for other jobs to finish...
cargo-deb: build failed
make: *** [Makefile:9: debian] Error 1
Error: Process completed with exit code 2.

As far as I see, the OID_PKCS9_CHALLENGE_PASSWORD has been introduced in the version 0.15 and was not present in the 0.14. Question: I don't find the definition anyware. Did I made something wrong, or is something missing?

Thank you for your help

Coding-Badly commented 1 year ago

I suspect this should have been this (note the 0.6.1)...

oid-registry = { version="0.6.1", features=["crypto", "x509", "x962"] }

Running cargo update --package oid-registry should get you past this problem.

serpilliere commented 1 year ago

Hi @Coding-Badly, That was exactly that! Thank you for the hint and sorry for the issue