@echo off
SET STORE_PATH=store
SET CERTMGR_LOCATION=batches

echo =======================================================================
echo = Update self signed client and server in the Opc Dicovery Server store
echo =======================================================================
%CERTMGR_LOCATION%\certmgr.exe -del -c -r LocalMachine -s "Ua Applications" -n "ORiN2 OpcUa Server (self signed)"
%CERTMGR_LOCATION%\certmgr.exe -del -c -r LocalMachine -s "Ua Applications" -n "ORiN2 OpcUa Client (self signed)"
%CERTMGR_LOCATION%\certmgr.exe -add %STORE_PATH%\certs\cert_server_self_signed.der -c -r LocalMachine -s "Ua Applications"
%CERTMGR_LOCATION%\certmgr.exe -add %STORE_PATH%\certs\cert_client_self_signed.der -c -r LocalMachine -s "Ua Applications"
%CERTMGR_LOCATION%\certmgr.exe -put -c -r LocalMachine -s "Ua Applications" -n "UA Local Discovery Server" %STORE_PATH%\certs\cert_discovery_server.der
