NLnetLabs / rpki-rs

An RPKI library for Rust
BSD 3-Clause "New" or "Revised" License
39 stars 22 forks source link

how/where are read{cer,mft,roa} used? #288

Closed jayeye closed 7 months ago

jayeye commented 7 months ago

How are the utilities in src/bin/read{cer,mft,roa}.rs supposed to be used? When running them on all the contents of /var/lib/routinator/rpki-cache (e.g.,, with find rpki-cache -name \*.cer | xargs -n 1 readcer), all I get is an error, Can’t decode cert: missing further values (at position 0)

Could all the contents of /var/lib/routinator/... be bad? Am I missing something obvious?

partim commented 7 months ago

The files kept in the rrdp subdirectory all have a internal header file to make RRDP processing easier. Those indeed cannot be read with those binaries (or the very handy JavaScript decoder). Routinator’s dump command can be used to write the raw files somewhere.

This will change in the upcoming 0.14 release where all objects from a repository are kept in a single file.

The files in the rsync subdirectory, meanwhile, are unmodified (since they are used by rsync) and will remain so for now.

jayeye commented 7 months ago

Thanks. Skipping the first 32 bytes did the trick on crls and certs.