xref: /openbsd/usr.sbin/rpki-client/extern.h (revision 73471bf0)
1 /*	$OpenBSD: extern.h,v 1.98 2021/11/25 14:03:40 job Exp $ */
2 /*
3  * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 #ifndef EXTERN_H
18 #define EXTERN_H
19 
20 #include <sys/queue.h>
21 #include <sys/tree.h>
22 #include <sys/time.h>
23 
24 #include <openssl/x509.h>
25 
26 enum cert_as_type {
27 	CERT_AS_ID, /* single identifier */
28 	CERT_AS_INHERIT, /* inherit from parent */
29 	CERT_AS_RANGE, /* range of identifiers */
30 };
31 
32 /*
33  * An AS identifier range.
34  * The maximum AS identifier is an unsigned 32 bit integer (RFC 6793).
35  */
36 struct cert_as_range {
37 	uint32_t	 min; /* minimum non-zero */
38 	uint32_t	 max; /* maximum */
39 };
40 
41 /*
42  * An autonomous system (AS) object.
43  * AS identifiers are unsigned 32 bit integers (RFC 6793).
44  */
45 struct cert_as {
46 	enum cert_as_type type; /* type of AS specification */
47 	union {
48 		uint32_t id; /* singular identifier */
49 		struct cert_as_range range; /* range */
50 	};
51 };
52 
53 /*
54  * AFI values are assigned by IANA.
55  * In rpki-client, we only accept the IPV4 and IPV6 AFI values.
56  */
57 enum afi {
58 	AFI_IPV4 = 1,
59 	AFI_IPV6 = 2
60 };
61 
62 /*
63  * An IP address as parsed from RFC 3779, section 2.2.3.8.
64  * This is either in a certificate or an ROA.
65  * It may either be IPv4 or IPv6.
66  */
67 struct ip_addr {
68 	unsigned char	 addr[16]; /* binary address prefix */
69 	unsigned char	 prefixlen; /* number of valid bits in address */
70 };
71 
72 /*
73  * An IP address (IPv4 or IPv6) range starting at the minimum and making
74  * its way to the maximum.
75  */
76 struct ip_addr_range {
77 	struct ip_addr min; /* minimum ip */
78 	struct ip_addr max; /* maximum ip */
79 };
80 
81 enum cert_ip_type {
82 	CERT_IP_ADDR, /* IP address range w/shared prefix */
83 	CERT_IP_INHERIT, /* inherited IP address */
84 	CERT_IP_RANGE /* range of IP addresses */
85 };
86 
87 /*
88  * A single IP address family (AFI, address or range) as defined in RFC
89  * 3779, 2.2.3.2.
90  * The RFC specifies multiple address or ranges per AFI; this structure
91  * encodes both the AFI and a single address or range.
92  */
93 struct cert_ip {
94 	enum afi		afi; /* AFI value */
95 	enum cert_ip_type	type; /* type of IP entry */
96 	unsigned char		min[16]; /* full range minimum */
97 	unsigned char		max[16]; /* full range maximum */
98 	union {
99 		struct ip_addr ip; /* singular address */
100 		struct ip_addr_range range; /* range */
101 	};
102 };
103 
104 enum cert_purpose {
105 	CERT_PURPOSE_INVALID,
106 	CERT_PURPOSE_CA,
107 	CERT_PURPOSE_BGPSEC_ROUTER
108 };
109 
110 /*
111  * Parsed components of a validated X509 certificate stipulated by RFC
112  * 6847 and further (within) by RFC 3779.
113  * All AS numbers are guaranteed to be non-overlapping and properly
114  * inheriting.
115  */
116 struct cert {
117 	struct cert_ip	*ips; /* list of IP address ranges */
118 	size_t		 ipsz; /* length of "ips" */
119 	struct cert_as	*as; /* list of AS numbers and ranges */
120 	size_t		 asz; /* length of "asz" */
121 	int		 talid; /* cert is covered by which TAL */
122 	char		*repo; /* CA repository (rsync:// uri) */
123 	char		*mft; /* manifest (rsync:// uri) */
124 	char		*notify; /* RRDP notify (https:// uri) */
125 	char		*crl; /* CRL location (rsync:// or NULL) */
126 	char		*aia; /* AIA (or NULL, for trust anchor) */
127 	char		*aki; /* AKI (or NULL, for trust anchor) */
128 	char		*ski; /* SKI */
129 	enum cert_purpose	 purpose; /* BGPSec or CA */
130 	char		*pubkey; /* Subject Public Key Info */
131 	X509		*x509; /* the cert */
132 	time_t		 expires; /* do not use after */
133 };
134 
135 /*
136  * The TAL file conforms to RFC 7730.
137  * It is the top-level structure of RPKI and defines where we can find
138  * certificates for TAs (trust anchors).
139  * It also includes the public key for verifying those trust anchor
140  * certificates.
141  */
142 struct tal {
143 	char		**uri; /* well-formed rsync URIs */
144 	size_t		 urisz; /* number of URIs */
145 	unsigned char	*pkey; /* DER-encoded public key */
146 	size_t		 pkeysz; /* length of pkey */
147 	char		*descr; /* basename of tal file */
148 	int		 id; /* ID of this TAL */
149 };
150 
151 /*
152  * Files specified in an MFT have their bodies hashed with SHA256.
153  */
154 struct mftfile {
155 	char		*file; /* filename (CER/ROA/CRL, no path) */
156 	unsigned char	 hash[SHA256_DIGEST_LENGTH]; /* sha256 of body */
157 };
158 
159 /*
160  * A manifest, RFC 6486.
161  * This consists of a bunch of files found in the same directory as the
162  * manifest file.
163  */
164 struct mft {
165 	char		*file; /* full path of MFT file */
166 	struct mftfile	*files; /* file and hash */
167 	size_t		 filesz; /* number of filenames */
168 	int		 stale; /* if a stale manifest */
169 	char		*seqnum; /* manifestNumber */
170 	char		*aia; /* AIA */
171 	char		*aki; /* AKI */
172 	char		*ski; /* SKI */
173 };
174 
175 /*
176  * An IP address prefix for a given ROA.
177  * This encodes the maximum length, AFI (v6/v4), and address.
178  * FIXME: are the min/max necessary or just used in one place?
179  */
180 struct roa_ip {
181 	enum afi	 afi; /* AFI value */
182 	size_t		 maxlength; /* max length or zero */
183 	unsigned char	 min[16]; /* full range minimum */
184 	unsigned char	 max[16]; /* full range maximum */
185 	struct ip_addr	 addr; /* the address prefix itself */
186 };
187 
188 /*
189  * An ROA, RFC 6482.
190  * This consists of the concerned ASID and its IP prefixes.
191  */
192 struct roa {
193 	uint32_t	 asid; /* asID of ROA (if 0, RFC 6483 sec 4) */
194 	struct roa_ip	*ips; /* IP prefixes */
195 	size_t		 ipsz; /* number of IP prefixes */
196 	int		 talid; /* ROAs are covered by which TAL */
197 	int		 valid; /* validated resources */
198 	char		*aia; /* AIA */
199 	char		*aki; /* AKI */
200 	char		*ski; /* SKI */
201 	time_t		 expires; /* do not use after */
202 };
203 
204 /*
205  * A single Ghostbuster record
206  */
207 struct gbr {
208 	char		*vcard;
209 	char		*aia; /* AIA */
210 	char		*aki; /* AKI */
211 	char		*ski; /* SKI */
212 };
213 
214 /*
215  * A single VRP element (including ASID)
216  */
217 struct vrp {
218 	RB_ENTRY(vrp)	entry;
219 	struct ip_addr	addr;
220 	int		talid; /* covered by which TAL */
221 	uint32_t	asid;
222 	enum afi	afi;
223 	unsigned char	maxlength;
224 	time_t		expires; /* transitive expiry moment */
225 };
226 /*
227  * Tree of VRP sorted by afi, addr, maxlength and asid
228  */
229 RB_HEAD(vrp_tree, vrp);
230 RB_PROTOTYPE(vrp_tree, vrp, entry, vrpcmp);
231 
232 /*
233  * A single BGPsec Router Key (including ASID)
234  */
235 struct brk {
236 	RB_ENTRY(brk)	 entry;
237 	uint32_t	 asid;
238 	int		 talid; /* covered by which TAL */
239 	char		*ski; /* Subject Key Identifier */
240 	char		*pubkey; /* Subject Public Key Info */
241 	time_t		 expires; /* transitive expiry moment */
242 };
243 /*
244  * Tree of BRK sorted by asid
245  */
246 RB_HEAD(brk_tree, brk);
247 RB_PROTOTYPE(brk_tree, brk, entry, brkcmp);
248 
249 /*
250  * A single CRL
251  */
252 struct crl {
253 	RB_ENTRY(crl)	 entry;
254 	char		*aki;
255 	X509_CRL	*x509_crl;
256 	time_t		 expires; /* do not use after */
257 };
258 /*
259  * Tree of CRLs sorted by uri
260  */
261 RB_HEAD(crl_tree, crl);
262 RB_PROTOTYPE(crl_tree, crl, entry, crlcmp);
263 
264 /*
265  * An authentication tuple.
266  * This specifies a public key and a subject key identifier used to
267  * verify children nodes in the tree of entities.
268  */
269 struct auth {
270 	RB_ENTRY(auth)	 entry;
271 	struct cert	*cert; /* owner information */
272 	struct auth	*parent; /* pointer to parent or NULL for TA cert */
273 };
274 /*
275  * Tree of auth sorted by ski
276  */
277 RB_HEAD(auth_tree, auth);
278 RB_PROTOTYPE(auth_tree, auth, entry, authcmp);
279 
280 struct auth	*auth_find(struct auth_tree *, const char *);
281 int		 auth_insert(struct auth_tree *, struct cert *, struct auth *);
282 
283 /*
284  * Resource types specified by the RPKI profiles.
285  * There might be others we don't consider.
286  */
287 enum rtype {
288 	RTYPE_EOF = 0,
289 	RTYPE_TAL,
290 	RTYPE_MFT,
291 	RTYPE_ROA,
292 	RTYPE_CER,
293 	RTYPE_CRL,
294 	RTYPE_GBR,
295 };
296 
297 enum http_result {
298 	HTTP_FAILED,	/* anything else */
299 	HTTP_OK,	/* 200 OK */
300 	HTTP_NOT_MOD,	/* 304 Not Modified */
301 };
302 
303 /*
304  * Message types for communication with RRDP process.
305  */
306 enum rrdp_msg {
307 	RRDP_START,
308 	RRDP_SESSION,
309 	RRDP_FILE,
310 	RRDP_END,
311 	RRDP_HTTP_REQ,
312 	RRDP_HTTP_INI,
313 	RRDP_HTTP_FIN
314 };
315 
316 /*
317  * RRDP session state, needed to pickup at the right spot on next run.
318  */
319 struct rrdp_session {
320 	char			*last_mod;
321 	char			*session_id;
322 	long long		 serial;
323 };
324 
325 /*
326  * File types used in RRDP_FILE messages.
327  */
328 enum publish_type {
329 	PUB_ADD,
330 	PUB_UPD,
331 	PUB_DEL,
332 };
333 
334 /*
335  * An entity (MFT, ROA, certificate, etc.) that needs to be downloaded
336  * and parsed.
337  */
338 struct entity {
339 	enum rtype	 type;		/* type of entity (not RTYPE_EOF) */
340 	char		*file;		/* local path to file */
341 	int		 has_data;	/* whether data blob is specified */
342 	unsigned char	*data;		/* optional data blob */
343 	size_t		 datasz; 	/* length of optional data blob */
344 	int		 talid;		/* tal identifier */
345 	TAILQ_ENTRY(entity) entries;
346 };
347 TAILQ_HEAD(entityq, entity);
348 
349 struct repo;
350 struct filepath;
351 RB_HEAD(filepath_tree, filepath);
352 
353 
354 /*
355  * Statistics collected during run-time.
356  */
357 struct stats {
358 	size_t	 tals; /* total number of locators */
359 	size_t	 mfts; /* total number of manifests */
360 	size_t	 mfts_fail; /* failing syntactic parse */
361 	size_t	 mfts_stale; /* stale manifests */
362 	size_t	 certs; /* certificates */
363 	size_t	 certs_fail; /* invalid certificate */
364 	size_t	 roas; /* route origin authorizations */
365 	size_t	 roas_fail; /* failing syntactic parse */
366 	size_t	 roas_invalid; /* invalid resources */
367 	size_t	 repos; /* repositories */
368 	size_t	 rsync_repos; /* synced rsync repositories */
369 	size_t	 rsync_fails; /* failed rsync repositories */
370 	size_t	 http_repos; /* synced http repositories */
371 	size_t	 http_fails; /* failed http repositories */
372 	size_t	 rrdp_repos; /* synced rrdp repositories */
373 	size_t	 rrdp_fails; /* failed rrdp repositories */
374 	size_t	 crls; /* revocation lists */
375 	size_t	 gbrs; /* ghostbuster records */
376 	size_t	 vrps; /* total number of vrps */
377 	size_t	 uniqs; /* number of unique vrps */
378 	size_t	 del_files; /* number of files removed in cleanup */
379 	size_t	 del_dirs; /* number of directories removed in cleanup */
380 	size_t	 brks; /* number of BGPsec Router Key (BRK) certificates */
381 	struct timeval	elapsed_time;
382 	struct timeval	user_time;
383 	struct timeval	system_time;
384 };
385 
386 struct ibuf;
387 struct msgbuf;
388 
389 /* global variables */
390 extern int verbose;
391 extern const char *tals[];
392 extern const char *taldescs[];
393 extern unsigned int talrepocnt[];
394 extern size_t talsz;
395 
396 /* Routines for RPKI entities. */
397 
398 void		 tal_buffer(struct ibuf *, const struct tal *);
399 void		 tal_free(struct tal *);
400 struct tal	*tal_parse(const char *, char *, size_t);
401 struct tal	*tal_read(struct ibuf *);
402 
403 void		 cert_buffer(struct ibuf *, const struct cert *);
404 void		 cert_free(struct cert *);
405 struct cert	*cert_parse(X509 **, const char *, const unsigned char *,
406 		    size_t);
407 struct cert	*ta_parse(X509 **, const char *, const unsigned char *, size_t,
408 		    const unsigned char *, size_t);
409 struct cert	*cert_read(struct ibuf *);
410 void		 cert_insert_brks(struct brk_tree *, struct cert *);
411 
412 void		 mft_buffer(struct ibuf *, const struct mft *);
413 void		 mft_free(struct mft *);
414 struct mft	*mft_parse(X509 **, const char *, const unsigned char *,
415 		    size_t);
416 int		 mft_check(const char *, struct mft *);
417 struct mft	*mft_read(struct ibuf *);
418 
419 void		 roa_buffer(struct ibuf *, const struct roa *);
420 void		 roa_free(struct roa *);
421 struct roa	*roa_parse(X509 **, const char *, const unsigned char *,
422 		    size_t);
423 struct roa	*roa_read(struct ibuf *);
424 void		 roa_insert_vrps(struct vrp_tree *, struct roa *, size_t *,
425 		    size_t *);
426 
427 void		 gbr_free(struct gbr *);
428 struct gbr	*gbr_parse(X509 **, const char *, const unsigned char *,
429 		    size_t);
430 
431 /* crl.c */
432 X509_CRL	*crl_parse(const char *, const unsigned char *, size_t);
433 void		 free_crl(struct crl *);
434 
435 /* Validation of our objects. */
436 
437 struct auth	*valid_ski_aki(const char *, struct auth_tree *,
438 		    const char *, const char *);
439 int		 valid_ta(const char *, struct auth_tree *,
440 		    const struct cert *);
441 int		 valid_cert(const char *, struct auth_tree *,
442 		    const struct cert *);
443 int		 valid_roa(const char *, struct auth_tree *, struct roa *);
444 int		 valid_filename(const char *);
445 int		 valid_filehash(const char *, const char *, size_t);
446 int		 valid_uri(const char *, size_t, const char *);
447 int		 valid_origin(const char *, const char *);
448 
449 /* Working with CMS. */
450 unsigned char	*cms_parse_validate(X509 **, const char *,
451 		    const unsigned char *, size_t,
452 		    const ASN1_OBJECT *, size_t *);
453 int		 cms_econtent_version(const char *, const unsigned char **,
454 		    size_t, long *);
455 /* Helper for ASN1 parsing */
456 int		 ASN1_frame(const char *, size_t,
457 			const unsigned char **, long *, int *);
458 
459 /* Work with RFC 3779 IP addresses, prefixes, ranges. */
460 
461 int		 ip_addr_afi_parse(const char *, const ASN1_OCTET_STRING *,
462 			enum afi *);
463 int		 ip_addr_parse(const ASN1_BIT_STRING *,
464 			enum afi, const char *, struct ip_addr *);
465 void		 ip_addr_print(const struct ip_addr *, enum afi, char *,
466 			size_t);
467 int		 ip_addr_cmp(const struct ip_addr *, const struct ip_addr *);
468 int		 ip_addr_check_overlap(const struct cert_ip *,
469 			const char *, const struct cert_ip *, size_t);
470 int		 ip_addr_check_covered(enum afi, const unsigned char *,
471 			const unsigned char *, const struct cert_ip *, size_t);
472 int		 ip_cert_compose_ranges(struct cert_ip *);
473 void		 ip_roa_compose_ranges(struct roa_ip *);
474 
475 /* Work with RFC 3779 AS numbers, ranges. */
476 
477 int		 as_id_parse(const ASN1_INTEGER *, uint32_t *);
478 int		 as_check_overlap(const struct cert_as *, const char *,
479 			const struct cert_as *, size_t);
480 int		 as_check_covered(uint32_t, uint32_t,
481 			const struct cert_as *, size_t);
482 
483 /* Parser-specific */
484 void		 entity_free(struct entity *);
485 void		 entity_read_req(struct ibuf *, struct entity *);
486 void		 entityq_flush(struct entityq *, struct repo *);
487 void		 proc_parser(int) __attribute__((noreturn));
488 
489 /* Rsync-specific. */
490 
491 char		*rsync_base_uri(const char *);
492 void		 proc_rsync(char *, char *, int) __attribute__((noreturn));
493 
494 /* HTTP and RRDP processes. */
495 
496 void		 proc_http(char *, int);
497 void		 proc_rrdp(int);
498 
499 /* Repository handling */
500 int		 filepath_add(struct filepath_tree *, char *);
501 void		 rrdp_save_state(size_t, struct rrdp_session *);
502 int		 rrdp_handle_file(size_t, enum publish_type, char *,
503 		    char *, size_t, char *, size_t);
504 char		*repo_filename(const struct repo *, const char *);
505 struct repo	*ta_lookup(int, struct tal *);
506 struct repo	*repo_lookup(int, const char *, const char *);
507 int		 repo_queued(struct repo *, struct entity *);
508 void		 repo_cleanup(struct filepath_tree *);
509 void		 repo_free(void);
510 
511 void		 rsync_finish(size_t, int);
512 void		 http_finish(size_t, enum http_result, const char *);
513 void		 rrdp_finish(size_t, int);
514 
515 void		 rsync_fetch(size_t, const char *, const char *);
516 void		 http_fetch(size_t, const char *, const char *, int);
517 void		 rrdp_fetch(size_t, const char *, const char *,
518 		    struct rrdp_session *);
519 void		 rrdp_http_done(size_t, enum http_result, const char *);
520 
521 int		 repo_next_timeout(int);
522 void		 repo_check_timeout(void);
523 
524 /* Logging (though really used for OpenSSL errors). */
525 
526 void		 cryptowarnx(const char *, ...)
527 			__attribute__((format(printf, 1, 2)));
528 void		 cryptoerrx(const char *, ...)
529 			__attribute__((format(printf, 1, 2)))
530 			__attribute__((noreturn));
531 
532 /* Encoding functions for hex and base64. */
533 
534 unsigned char	*load_file(const char *, size_t *);
535 int		 base64_decode_len(size_t, size_t *);
536 int		 base64_decode(const unsigned char *, size_t,
537 		    unsigned char **, size_t *);
538 int		 base64_encode_len(size_t, size_t *);
539 int		 base64_encode(const unsigned char *, size_t, char **);
540 char		*hex_encode(const unsigned char *, size_t);
541 int		 hex_decode(const char *, char *, size_t);
542 
543 
544 /* Functions for moving data between processes. */
545 
546 struct ibuf	*io_new_buffer(void);
547 void		 io_simple_buffer(struct ibuf *, const void *, size_t);
548 void		 io_buf_buffer(struct ibuf *, const void *, size_t);
549 void		 io_str_buffer(struct ibuf *, const char *);
550 void		 io_close_buffer(struct msgbuf *, struct ibuf *);
551 void		 io_read_buf(struct ibuf *, void *, size_t);
552 void		 io_read_str(struct ibuf *, char **);
553 void		 io_read_buf_alloc(struct ibuf *, void **, size_t *);
554 struct ibuf	*io_buf_read(int, struct ibuf **);
555 struct ibuf	*io_buf_recvfd(int, struct ibuf **);
556 
557 /* X509 helpers. */
558 
559 char		*x509_get_aia(X509 *, const char *);
560 char		*x509_get_aki(X509 *, int, const char *);
561 char		*x509_get_ski(X509 *, const char *);
562 int		 x509_get_expire(X509 *, const char *, time_t *);
563 char		*x509_get_crl(X509 *, const char *);
564 char		*x509_crl_get_aki(X509_CRL *, const char *);
565 char		*x509_get_pubkey(X509 *, const char *);
566 enum cert_purpose	 x509_get_purpose(X509 *, const char *);
567 
568 /* printers */
569 void		tal_print(const struct tal *);
570 void		cert_print(const struct cert *);
571 void		mft_print(const struct mft *);
572 void		roa_print(const struct roa *);
573 void		gbr_print(const struct gbr *);
574 
575 /* Output! */
576 
577 extern int	 outformats;
578 #define FORMAT_OPENBGPD	0x01
579 #define FORMAT_BIRD	0x02
580 #define FORMAT_CSV	0x04
581 #define FORMAT_JSON	0x08
582 
583 int		 outputfiles(struct vrp_tree *v, struct brk_tree *b,
584 		    struct stats *);
585 int		 outputheader(FILE *, struct stats *);
586 int		 output_bgpd(FILE *, struct vrp_tree *, struct brk_tree *,
587 		    struct stats *);
588 int		 output_bird1v4(FILE *, struct vrp_tree *, struct brk_tree *,
589 		    struct stats *);
590 int		 output_bird1v6(FILE *, struct vrp_tree *, struct brk_tree *,
591 		    struct stats *);
592 int		 output_bird2(FILE *, struct vrp_tree *, struct brk_tree *,
593 		    struct stats *);
594 int		 output_csv(FILE *, struct vrp_tree *, struct brk_tree *,
595 		    struct stats *);
596 int		 output_json(FILE *, struct vrp_tree *, struct brk_tree *,
597 		    struct stats *);
598 
599 void		logx(const char *fmt, ...)
600 		    __attribute__((format(printf, 1, 2)));
601 time_t		getmonotime(void);
602 
603 int	mkpath(const char *);
604 
605 #define RPKI_PATH_OUT_DIR	"/var/db/rpki-client"
606 #define RPKI_PATH_BASE_DIR	"/var/cache/rpki-client"
607 
608 /* Maximum number of IP and AS ranges accepted in any single file */
609 #define MAX_IP_SIZE		200000
610 #define MAX_AS_SIZE		200000
611 
612 /* Maximum acceptable URI length */
613 #define MAX_URI_LENGTH		2048
614 
615 /* Maximum acceptable file size */
616 #define MAX_FILE_SIZE		4000000
617 
618 /* Maximum number of FileAndHash entries per manifest. */
619 #define MAX_MANIFEST_ENTRIES	100000
620 
621 /* Maximum depth of the RPKI tree. */
622 #define MAX_CERT_DEPTH		12
623 
624 /* Maximum number of concurrent rsync processes. */
625 #define MAX_RSYNC_PROCESSES	16
626 
627 /* Maximum allowd repositories per tal */
628 #define MAX_REPO_PER_TAL	1000
629 
630 #endif /* ! EXTERN_H */
631