feat: Certificate request form (#7)

* wip: first draft cert request

* feat: form for cert request

* fix: add missing fields

* add app bar

* Give alt names list more space

* add missing rules
This commit is contained in:
CybAtax 2024-11-17 22:48:38 +01:00 committed by GitHub
parent d98f60ab54
commit f870fc1ac6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 196 additions and 0 deletions

25
frontend/src/types/certificate.d.ts vendored Normal file
View file

@ -0,0 +1,25 @@
export interface Subject {
commonName: string;
organization: string;
orgUnit: string;
country: string;
state: string;
city: string
altNames: string[];
}
export interface Validity {
from: Date;
to: Date;
}
export interface Extensions {
}
export interface Certificate {
issuer: Subject;
validity: Validity;
subject: Subject;
extensions: Extensions;
}

3
frontend/src/types/util.d.ts vendored Normal file
View file

@ -0,0 +1,3 @@
export type Validated<T> = {
[K in keyof T as `${K}Rules`]: ((val: string) => true | string)[]
} & T;