# Quickstart for pccs.service

zypper in suse-sgx-dcap-pccs

cp -i /usr/libexec/suse-sgx-dcap-pccs/config/upstream.json /usr/libexec/suse-sgx-dcap-pccs/config/default.json
edit /usr/libexec/suse-sgx-dcap-pccs/config/default.json
  "DB_CONFIG": "sqlite",
  "HTTPS_private_pem": "/var/lib/pccs/private.pem",
  "HTTPS_file_crt": "/var/lib/pccs/file.crt",

openssl genrsa -out ~pccs/private.pem 2048
openssl req -new -key ~pccs/private.pem -out ~pccs/csr.pem -subj '/CN=localhost'
openssl x509 -req -in ~pccs/csr.pem -signkey ~pccs/private.pem -out ~pccs/file.crt

chown -c pccs:pccs /usr/libexec/suse-sgx-dcap-pccs/config/default.json ~pccs/private.pem ~pccs/csr.pem ~pccs/file.crt
systemctl enable --now pccs.service 
