aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/nss/nss-agl-driver-db/nss-agl-driver-db.sh
blob: 1a8351bf949f333e70ca86d3ee4cce0867fbe26a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
set -e

# TLDR we need this file for chromium to connect back to kuksa.

# check if directory already exists and bail out
if test -d /home/agl-driver/.pki/nssdb ; then
    echo "Directory already exists! Doing nothing."
    exit 127
fi

# setup empty db in subfolder
mkdir -p /home/agl-driver/.pki/nssdb
certutil -N -d /home/agl-driver/.pki/nssdb --empty-password

# deploy cert into local db
certutil -A -d /home/agl-driver/.pki/nssdb -n "KuksaRootCA" -t "pC,," -i /etc/kuksa-val/CA.pem

#chown -R agl-driver:agl-driver /home/agl-driver/.pki/nssdb