Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit 5db5ce3

Browse files
committed
add cacheable id cert model.
1 parent a85b1de commit 5db5ce3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

api/src/core/main.tsp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,27 @@ namespace models {
189189
NewestFirst,
190190
OldestFirst
191191
}
192+
193+
/**
194+
* A cacheable response to an ID-Cert request.
195+
*/
196+
model CacheableIDCert {
197+
@doc("The requested ID-Cert in ASCII PEM format.")
198+
@example("------BEGIN CERTIFICATE------...")
199+
idCertPem: string,
200+
@doc("UNIX timestamp that specifies when this specific id_cert has been marked as invalidated by the server. An ID-Cert is considered invalidated, if the server or actor choose to revoke the validity of the ID-Cert before the lifetime of the certificate was scheduled to end. If this property does not exist, the ID-Cert has not been invalidated.")
201+
@example(1736610000)
202+
invalidatedAt?: uint64,
203+
@doc("UNIX timestamp that specifies the time from which this cache entry may be treated as valid.")
204+
@example(1736606402)
205+
cacheNotValidBefore: uint64,
206+
@doc("UNIX timestamp that specifies a time until which this cache entry may be treated as valid.")
207+
@example(1736613602)
208+
cacheNotValidAfter: uint64,
209+
@doc("Signature generated by the home server. This signature can be verified using the home servers' public identity key. A server generates the `cacheSignature` by concatenating the serial number of the ID-Cert in question with the `cacheValidNotBefore` timestamp and the `cacheValidNotAfter` timestamp, then generating the signature of the resulting concatenated string using the private identity key of the server. Clients must reject certificates of which the `cacheSignature` can not be verified to be correct.")
210+
@example("7ab2bbde7fe43c7481a3a61031546bab16bc1a8735b2f0cdd519958c7f2f99f8")
211+
@minLength(32)
212+
@maxLength(32)
213+
cacheSignature: string
214+
}
192215
}

0 commit comments

Comments
 (0)