CVSROOT:        /cvs
Module name:    src
Changes by:     clau...@cvs.openbsd.org 2022/01/28 08:30:23

Modified files:
        usr.sbin/rpki-client: extern.h main.c mft.c parser.c 

Log message:
Properly handle .mft files as intended by the RFC. Instead of always
selecting the newest file this opens both the new (from rrdp or rsync)
and old (valid) MFT. It then compares the manifest number and based on
that the 'newer' MFT is selected.
The MFT file and hash check is also changed to always try both locations
and selecting whatever matches up with the hash. The selction is passed
back to the the main process and used later on to open exactly the same
file as was checked against the hash.
The MFT parsing code has been split up into multiple steps so that the
files can be parsed, compared and then fully validated.
In most cases this makes no difference but it prevents replay attacks
using old but still valid files.
With and OK tb@

Reply via email to