Autoselect Certificate for Chrome

Viewed 21

Hello and thanks for help in advance!

I try to configure a Raspberry in Kiosk-Mode to show some website.

Problem: the AutoSelectCertificateForUrls doesn't work, because if I open chrome://policy the policy has no value set.

My .json file, placed under etc/chromium/policies/managed/auto_select_certificate.json

{
  "AutoSelectCertificateForUrls": [
    "{\"pattern\":\"https://adress.adress/somewhere\",\"filter\":{\"ISSUER\":{\"CN\":\"issuer.CN\“}}}“
  ]
}

Also tried

[
    "{\"pattern\":\"https://adress.adress\",\"filter\":{}}"
]
1 Answers

Because I just didn't got it to work, I tried a different approach.

In my case (Kiosk Mode) I don't need anything other than a one-time klick on "OK" (selecting the certificate). So I used xdotool to realize that.

  1. sudo apt-get install xdotool -y

  2. Create a script containing

    #!/bin/sh

    export DISPLAY=":0"

    export XAUTHORITY="/home/pi/.Xauthority"

    sleep 30 # To make sure the window is really loaded

    xdotool getactivewindow

    xdotool key KP_Enter

  3. Make the script executable via "sudo chmod +x /etc/chromium/select_certificate"

  4. Before "exit 0"! Append "/etc/chromium/select_certificate &" to "/etc/rc.local" to execute it every startup

Related