[db] validate repo certificate

for now only for initial repos, but eventually we should validate for CoreRepository as well to prevent invalid certs from entering the DB by other means.
This commit is contained in:
Torsten Grote
2023-08-01 12:08:38 +02:00
parent 1abad97226
commit 43816ffe8d
3 changed files with 34 additions and 12 deletions

View File

@@ -32,7 +32,7 @@ internal class RepositoryDaoTest : DbTest() {
address = getRandomString(),
mirrors = listOf(getRandomString(), getRandomString(), getRandomString()),
description = getRandomString(),
certificate = getRandomString(),
certificate = "abcdef", // not random, because format gets checked
version = Random.nextLong(),
enabled = Random.nextBoolean(),
weight = Random.nextInt(),