mirror of
https://github.com/openbsd/src.git
synced 2025-01-09 22:38:01 -08:00
Add the repoid of the cert in the cert struct. This way it is possible
to track the parent repository id of a publication point. Nomenclature is confusing but not much we can do here. OK tb@ job@
This commit is contained in:
parent
bcad1ab706
commit
c94cf4486d
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cert.c,v 1.86 2022/09/03 13:01:43 tb Exp $ */
|
/* $OpenBSD: cert.c,v 1.87 2022/09/03 13:30:27 claudio Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
|
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
|
||||||
* Copyright (c) 2021 Job Snijders <job@openbsd.org>
|
* Copyright (c) 2021 Job Snijders <job@openbsd.org>
|
||||||
@ -905,6 +905,7 @@ cert_buffer(struct ibuf *b, const struct cert *p)
|
|||||||
io_simple_buffer(b, &p->expires, sizeof(p->expires));
|
io_simple_buffer(b, &p->expires, sizeof(p->expires));
|
||||||
io_simple_buffer(b, &p->purpose, sizeof(p->purpose));
|
io_simple_buffer(b, &p->purpose, sizeof(p->purpose));
|
||||||
io_simple_buffer(b, &p->talid, sizeof(p->talid));
|
io_simple_buffer(b, &p->talid, sizeof(p->talid));
|
||||||
|
io_simple_buffer(b, &p->repoid, sizeof(p->repoid));
|
||||||
io_simple_buffer(b, &p->ipsz, sizeof(p->ipsz));
|
io_simple_buffer(b, &p->ipsz, sizeof(p->ipsz));
|
||||||
io_simple_buffer(b, &p->asz, sizeof(p->asz));
|
io_simple_buffer(b, &p->asz, sizeof(p->asz));
|
||||||
|
|
||||||
@ -937,6 +938,7 @@ cert_read(struct ibuf *b)
|
|||||||
io_read_buf(b, &p->expires, sizeof(p->expires));
|
io_read_buf(b, &p->expires, sizeof(p->expires));
|
||||||
io_read_buf(b, &p->purpose, sizeof(p->purpose));
|
io_read_buf(b, &p->purpose, sizeof(p->purpose));
|
||||||
io_read_buf(b, &p->talid, sizeof(p->talid));
|
io_read_buf(b, &p->talid, sizeof(p->talid));
|
||||||
|
io_read_buf(b, &p->repoid, sizeof(p->repoid));
|
||||||
io_read_buf(b, &p->ipsz, sizeof(p->ipsz));
|
io_read_buf(b, &p->ipsz, sizeof(p->ipsz));
|
||||||
io_read_buf(b, &p->asz, sizeof(p->asz));
|
io_read_buf(b, &p->asz, sizeof(p->asz));
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: extern.h,v 1.153 2022/09/02 19:10:36 claudio Exp $ */
|
/* $OpenBSD: extern.h,v 1.154 2022/09/03 13:30:27 claudio Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||||
*
|
*
|
||||||
@ -137,6 +137,7 @@ struct cert {
|
|||||||
struct cert_as *as; /* list of AS numbers and ranges */
|
struct cert_as *as; /* list of AS numbers and ranges */
|
||||||
size_t asz; /* length of "asz" */
|
size_t asz; /* length of "asz" */
|
||||||
int talid; /* cert is covered by which TAL */
|
int talid; /* cert is covered by which TAL */
|
||||||
|
unsigned int repoid; /* repository of this cert file */
|
||||||
char *repo; /* CA repository (rsync:// uri) */
|
char *repo; /* CA repository (rsync:// uri) */
|
||||||
char *mft; /* manifest (rsync:// uri) */
|
char *mft; /* manifest (rsync:// uri) */
|
||||||
char *notify; /* RRDP notify (https:// uri) */
|
char *notify; /* RRDP notify (https:// uri) */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: parser.c,v 1.75 2022/08/30 18:56:49 job Exp $ */
|
/* $OpenBSD: parser.c,v 1.76 2022/09/03 13:30:27 claudio Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
|
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
|
||||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||||
@ -596,8 +596,10 @@ parse_entity(struct entityq *q, struct msgbuf *msgq)
|
|||||||
cert = proc_parser_cert(file, f, flen);
|
cert = proc_parser_cert(file, f, flen);
|
||||||
c = (cert != NULL);
|
c = (cert != NULL);
|
||||||
io_simple_buffer(b, &c, sizeof(int));
|
io_simple_buffer(b, &c, sizeof(int));
|
||||||
if (cert != NULL)
|
if (cert != NULL) {
|
||||||
|
cert->repoid = entp->repoid;
|
||||||
cert_buffer(b, cert);
|
cert_buffer(b, cert);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* The parsed certificate data "cert" is now
|
* The parsed certificate data "cert" is now
|
||||||
* managed in the "auths" table, so don't free
|
* managed in the "auths" table, so don't free
|
||||||
|
Loading…
Reference in New Issue
Block a user