Move CRL rebuild to upon cert revocation temp

This commit is contained in:
Tuan Dang
2024-06-10 00:33:18 -04:00
parent b48325b4ba
commit 3079cd72df
9 changed files with 247 additions and 160 deletions
@@ -68,10 +68,7 @@ export async function up(knex: Knex): Promise<void> {
t.timestamps(true, true, true);
t.uuid("caId").notNullable().unique();
t.foreign("caId").references("id").inTable(TableName.CertificateAuthority).onDelete("CASCADE");
t.binary("encryptedCrl").notNullable(); // TODO: encrypt
t.integer("ttl").notNullable(); // in minutes
// TODO: consider type (crl or delta)
// TODO: rebuild interval
t.binary("encryptedCrl").notNullable();
});
}
@@ -14,8 +14,7 @@ export const CertificateAuthorityCrlSchema = z.object({
createdAt: z.date(),
updatedAt: z.date(),
caId: z.string().uuid(),
encryptedCrl: zodBuffer,
ttl: z.number()
encryptedCrl: zodBuffer
});
export type TCertificateAuthorityCrl = z.infer<typeof CertificateAuthorityCrlSchema>;