summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client
AgeCommit message (Collapse)Author
2022-08-19Check the resources in ROAs and RSCs against EE certsTheo Buehler
The resources delegated in the RFC 3779 extensions of the EE cert for ROAs or RSCs can be a subset of the resources in the auth chain. So far we compared that the resources of ROAs and RSCs are covered by the auth chain, which is not entirely correct. Extract the necessary data from the EE cert into rpki-client's own data structures, then verify that the EE cert's resources cover the ones claimed in the ROA or RSC. Do this as part or ROA and RSC parsing, that the EE cert's resources are covered by the auth chain is checked in valid_x509() later on. All this is a bit more annoying and intrusive than it should be... ok claudio job
2022-08-18Remove dangling ASPA references until we land real supportJob Snijders
OK tb@
2022-08-17Clarify and tidy up some commentsJob Snijders
OK tb@
2022-08-12No need to make a deep copy of the EE certTheo Buehler
The EE Cert has just been allocated as part of deserializing the cms. There is no need for an expensive copy, we can just keep a reference. ok job
2022-08-10Clarify warning related to ROA eContentJob Snijders
2022-08-10Disallow AS Resources extension on ROA EE certificatesJob Snijders
The ROA specification (RFC 6482 section 4) is a bit underspecified, however in the wild the RFC 3779 AS Resources extension never ever appears on ROA EE certificates, as it serves no purpose in the validation process. OK tb@
2022-08-10Decrease how long to wait for the remote peer to send IO before giving upJob Snijders
If a repository is uncommunicative, rpki-client will try other transports, or come back later (because of a next crontab invocation). OK claudio@
2022-08-09Make the http code respect MAX_CONN_TIMEOUT and fail connects once theyClaudio Jeker
hit this timeout. This is in line with the rsync code. OK tb@ job@
2022-08-08Unify the maximum idle IO timeout for RSYNC & HTTPSJob Snijders
OK claudio@
2022-08-08Set rsync connection timeout to 15 seconds.Job Snijders
OK sthen@
2022-08-04Once all files from argv have been read the main process can unveil toClaudio Jeker
the cachedir and if output files are written to outputdir. In -f mode the unveil can be read-only in normal operation rwc is required because the main process writes the RRDP files and also does the cleanup at the end of the run. Input from tb@ and mestre@, OK tb@
2022-07-28Fix RFC number in commentTheo Buehler
2022-07-17infromation -> informationJonathan Gray
2022-07-14Fix JSON output in filemode for TALsJob Snijders
OK claudio@
2022-07-12Bump version number to 7.9Claudio Jeker
2022-06-30zap whitespaceJob Snijders
2022-06-28Remove superfluous 'any'Job Snijders
2022-06-27Add skiplist option to steer clear of skiplisted hostsJob Snijders
Blocking outbound connections towards RPKI publication servers based on IP or IPv6 address in external instrumentation like HTTP proxies or pf(4) rules is somewhat unwieldy. It might be easier for operators if we offer a mechanism that cuts at the CA cert SIA parsing step. OK claudio@ tb@
2022-06-25Don't add unknown filetypes to the entity queue. Otherwise we bail outTheo Buehler
without good reason. Regression introduced in a recent refactoring found by job ok claudio job
2022-06-16RRDP serial numbers should only increase.Claudio Jeker
Warn if the serial number decreases between syncs. On top of this only allow a small window of up to 2 deltas from the current one to consider our cache to be in sync. The number 2 is probably to conservative and should be adjusted once some data points got collected. It seems to happen that CAs restore RRDP snapshots instead of building a fresh snapshot with a new session-id. Which results in rpki-client to ignore the repo until the serial number is bigger again. OK tb@
2022-06-10Unify error messages on d2i failure for econtentTheo Buehler
2022-06-10Dedup econtent version checksTheo Buehler
Since the ASN.1 template conversions, we have three copies of mostly dead code that validates that the econtent version is at its default value 0. Until a new standard bumps this version and we decide to support that, we're better off with only one copy of this code. ok claudio
2022-06-07Fix path validation of AS numbersTheo Buehler
If a certificate along the chain does not have an AS numbers extension, this is a failure condition according to RFC 3779, section 3.3. ok job
2022-06-05Revert accidentally committed checkTheo Buehler
2022-06-04KNF nitTheo Buehler
2022-06-01Remove a confusing comment that has been stale since e2k19 (r1.26).Theo Buehler
2022-06-01Limit the number of RSC checklist FileNameAndHash entries the same wayTheo Buehler
as mft FileAndHash entries are checked. ok claudio job
2022-06-01Fix off-by-one in MAX_MANIFEST_ENTRIES checkTheo Buehler
ok claudio job
2022-05-31I made non-trivial contributions to these files.Theo Buehler
2022-05-31Shuffle two helper functions down.Theo Buehler
This way the helper functions appear in the order they are used in rsc_parse_econtent().
2022-05-31Update reference to RSC draft 08Theo Buehler
ok claudio job
2022-05-31Remove now unused ASN1_frame() and cms_econtent_version()Theo Buehler
ok claudio job
2022-05-31Rewrite rsc.c using ASN.1 templatesTheo Buehler
This implements the constrained versions of the RFC 3779 structures since OpenSSL's 3779 API doesn't expose IPAddrBlocks. This way we can also avoid extra checks after walking the structs. Use the previously exposed sbgp_as_{id,range}() and sbgp_addr{,_range}() to remove a lot of copy-pasted code. While parsing ConstrainedASIdentifiers allocate only once and for ConstrainedIPAddrBlocks allocate once per address family instead of doing a reallocation for each asid or prefix. This removes the last explicit use of ASN1_TYPE and ASN1_SEQUENCE_ANY from rpki-client. ok claudio job
2022-05-31Prepare rewrite of rsc.c with templated ASN.1Theo Buehler
Change signatures of various functions to avoid using struct parse and expose sbgp_as_{id,range}() and sbgp_addr{,_range}() so they can be used from rsc.c. This is a mostly mechanical diff. ok claudio job
2022-05-24While not strictly required clear all pfds in the poll loop and not justClaudio Jeker
once at the start. OK tb@
2022-05-24Introduce MAX_HTTP_REQUESTS and MAX_RSYNC_REQUESTS.Claudio Jeker
These just replace MAX_CONNECTIONS and MAX_RSYNC_PROCESSES to be more unified. OK tb@
2022-05-23Improve #ifdefs for STACK_OF() helpers.Theo Buehler
Discussed with claudio
2022-05-23There is no need to be quiet by default anymore and also stdout isClaudio Jeker
perfectly fine. So switch the stats output at the end of the run to simply use printtf(3) and no longer depend on -v flag. OK tb@
2022-05-20Add RFC 7318Job Snijders
2022-05-19Remove unused macro (log_debuginfo)Claudio Jeker
2022-05-19Adjust or remove some stale commentsTheo Buehler
2022-05-19Rewrite mft.c and roa.c with ASN.1 templatesTheo Buehler
The ASN.1 templates are a rather direct translation of the ASN.1 in the relevant RFCs and they allow deserializing the Manifest and ROA eContent in a single step instead of numerous opaque d2i_ASN1_SEQUENCE_ANY() calls. Once the eContent is deserialized, we can walk the structs, validate it as before and populate the internal data structures. Positive feedback job ok claudio
2022-05-15More KNF and whitespace fixes.Theo Buehler
2022-05-15Remove misplaced continueTheo Buehler
ok job
2022-05-15whitespace spotted during read-thruTheo de Raadt
2022-05-15Specify which version of RPKI RSC draft is supported.Job Snijders
2022-05-13Fix unused bits handling for ip addressesTheo Buehler
If ASN1_STRING_FLAG_BITS_LEFT is set, only the lower three bits of the flags represent the unused bits. Other flags have nothing to with lengths, so stop interpreting them as such and throwing strange errors. ok claudio
2022-05-12Remove verify callbackTheo Buehler
It is no longer possible to build rpki-client with LibreSSL < 3.5 or with OpenSSL built with OPENSSL_NO_RFC3779, so this compat code can be retired. ok claudio job
2022-05-12nuke tabsTheo Buehler
2022-05-12Align parsing of ipAddrBlock with autnomousSysNumTheo Buehler
We now do one allocation per address family instead of one per prefix or range. ok claudio