summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2019-10-08 15:17:55 +0200
committerDavid Lönnhager <david.l@mullvad.net>2019-10-09 10:49:04 +0200
commitf9eb23dcd516381d9c96f22d4b1263dda99a2233 (patch)
treed827e0ed03858ac6e604718385a2a1119e65b8ef
parent7001acc57ba2a0c332da27186f11ad20d3935215 (diff)
downloadmullvadvpn-f9eb23dcd516381d9c96f22d4b1263dda99a2233.tar.xz
mullvadvpn-f9eb23dcd516381d9c96f22d4b1263dda99a2233.zip
Silently approve TAP driver cert on Windows
m---------dist-assets/binaries0
-rw-r--r--dist-assets/windows/installer.nsh15
2 files changed, 15 insertions, 0 deletions
diff --git a/dist-assets/binaries b/dist-assets/binaries
-Subproject d10503e8e218db6dbc86fb16e534fa645376a7b
+Subproject 85f5f891ca36ff6e55d5fa22d685694726a61d1
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index bcde17e923..6d43b4d000 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -219,6 +219,21 @@
InstallDriver_install_driver:
#
+ # Silently approve the certificate before installing the driver
+ #
+ log::Log "Adding OpenVPN certificate to the certificate store"
+
+ nsExec::ExecToStack '"$SYSDIR\certutil.exe" -f -addstore TrustedPublisher "$TEMP\driver\driver.cer"'
+
+ Pop $0
+ Pop $1
+
+ ${If} $0 != 0
+ StrCpy $R0 "Failed to add trusted publisher certificate: error $0"
+ log::LogWithDetails $R0 $1
+ ${EndIf}
+
+ #
# Install driver and create a virtual adapter.
# If the driver is already installed, this just creates another virtual adapter.
#