This folder contains demo web sites (soc.ial
, ebanksy.art
, gall.ery
), hosting C2PA-signed content.
Here are notes on how to self-host the demo on a Windows machine, deploying the https://example.com
website in WSL (to this for each demo domains, replacing example.com
with soc.ial
, ebanksy.art
, and gall.ery
).
openssl.cnf
file
[ req ]
distinguished_name = req_distinguished_name
[req_distinguished_name]
[ v3_issuer ]
subjectAltName = @alt_names
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
[alt_names]
DNS.1 = example.com
DNS.2 = www.example.com
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/example.com.key -out /etc/ssl/certs/example.com.crt -subj "/CN=example.com" -config openssl.cnf -extensions v3_issuer
/etc/ssl/certs/example.com.crt
somewhere in the windows partition.crt
file and select “Install Certificate”.sudo mkdir -p /var/www/example.com/html
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/example.com
/etc/nginx/sites-available/example.com
server {
listen 443 ssl; # default_server;
listen [::]:443 ssl; # default_server;
ssl_certificate /etc/ssl/certs/example.com.crt;
ssl_certificate_key /etc/ssl/private/example.com.key;
root /var/www/example.com/html;
index index.html;
server_name example.com;
location / {
try_files $uri $uri/ =404;
}
location /issue {
proxy_pass http://localhost:4000; # wherever the express server is
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo service nginx start
or sudo service nginx reload
* Update the hosts file (C:\Windows\System32\drivers\etc\hosts
):127.0.0.1 example.com
* Demo-specific setupsoc.ial/html
)sudo service nginx start
Ebanksy signed some images available in all demo domains. To (re-)generate these, following these steps (from the ebanksy.art/c2pa
folder):
./generate-cert-chain.sh
. NOTE: the c2patool
doesn’t allow signing using a self-signed certificate, so the script generates a certificate chain.trust-list.json
trust list file using the generated certs, and copy it to ebanksy.art/html
.c2patool <file> -m manifest-template.json -o <signed-file> -f