Skip to content

Commit

Permalink
Force sync hashed symlinks for ca-bundle for multiple certificates
Browse files Browse the repository at this point in the history
Related to issue #119

update-ca-certificate refuse to generate hashed symlinks when two
certificate is part of the same file. To fix this issue, we want to run
c_rehash to force the generation of hashed symlinks.

Signed-off-by: Mattias Andersson <mattis@mattis.nu>
  • Loading branch information
Mattias Andersson committed Feb 2, 2025
1 parent 6cdee4a commit 9caba26
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/setup-ca-certs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ func main() {
}
logger.Println(string(out))

logger.Println("Forcing the generation of hashed symlinks...")
cmd = exec.Command("c_rehash", tempCerts)
err = cmd.Run()
if err != nil {
log.Fatal(err)
}

logger.Println("Copying CA certificates...")
err = CopyDir(tempCerts, "/workspace")
if err != nil {
Expand Down

0 comments on commit 9caba26

Please sign in to comment.