Generate a 10-year root CA in entrypoint.sh and sign the server leaf with it. Only the root CA is distributed to clients (including GPO); the leaf is served by the app and is reissued automatically when CERT_HOSTNAMES changes. Update the Windows installer, ZIP package, settings UI and docs for the two-tier scheme.
25 lines
805 B
Batchfile
25 lines
805 B
Batchfile
@echo off
|
|
rem Installs the WhatIDo root CA certificate into Trusted Root on Windows.
|
|
rem The script requests administrator rights automatically (UAC) unless
|
|
rem -StoreLocation CurrentUser is passed.
|
|
rem Examples:
|
|
rem install-whatido-cert.cmd
|
|
rem install-whatido-cert.cmd -Uninstall
|
|
rem install-whatido-cert.cmd -StoreLocation CurrentUser
|
|
setlocal
|
|
|
|
set "ELEVATE=1"
|
|
echo %* | findstr /I /C:"CurrentUser" >nul && set "ELEVATE=0"
|
|
if "%ELEVATE%"=="1" (
|
|
net session >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo Requesting administrator privileges...
|
|
powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -ArgumentList '%*' -Verb RunAs"
|
|
exit /b
|
|
)
|
|
)
|
|
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0install-whatido-cert.ps1" %*
|
|
echo.
|
|
pause
|