@@ -11,7 +11,9 @@ param (
1111 # Skip signing
1212 [switch ]$skipSigning = $false ,
1313 # Signing tool
14- [string ]$signtool = ' "C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe"'
14+ [string ]$signtool = ' "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe"' ,
15+ # Certificate thumbprint
16+ [string ]$certThumbprint = " "
1517)
1618
1719# Source build Functions.
@@ -27,7 +29,7 @@ Function EmbedFlex {
2729 DownloadAndExtractZip - dest:" $downloadPath \nri-flex" - url:" $url "
2830
2931 if (-Not $skipSigning ) {
30- SignExecutable - executable " $downloadPath \nri-flex\nri-flex.exe"
32+ SignExecutable - executable " $downloadPath \nri-flex\nri-flex.exe" - certThumbprint " $certThumbprint "
3133 }
3234}
3335
@@ -44,8 +46,8 @@ Function EmbedWindowsServices {
4446 DownloadAndExtractZip - dest:" $downloadPath \nri-winservices" - url:" $url "
4547
4648 if (-Not $skipSigning ) {
47- SignExecutable - executable " $downloadPath \nri-winservices\nri-winservices.exe"
48- SignExecutable - executable " $downloadPath \nri-winservices\windows_exporter.exe"
49+ SignExecutable - executable " $downloadPath \nri-winservices\nri-winservices.exe" - certThumbprint " $certThumbprint "
50+ SignExecutable - executable " $downloadPath \nri-winservices\windows_exporter.exe" - certThumbprint " $certThumbprint "
4951 }
5052}
5153
@@ -65,7 +67,7 @@ Function EmbedPrometheus {
6567 Remove-Item - Path " $downloadPath \nri-prometheus\New Relic" - Force - Recurse
6668
6769 if (-Not $skipSigning ) {
68- SignExecutable - executable " $downloadPath \nri-prometheus\nri-prometheus.exe"
70+ SignExecutable - executable " $downloadPath \nri-prometheus\nri-prometheus.exe" - certThumbprint " $certThumbprint "
6971 }
7072}
7173
@@ -97,9 +99,9 @@ Function EmbedFluentBit {
9799
98100 if (-Not $skipSigning ) {
99101 # <To be removed on removal of the ff fluent_bit_19>
100- SignExecutable - executable " $downloadPath \logging\nrfb\fluent-bit.exe"
102+ SignExecutable - executable " $downloadPath \logging\nrfb\fluent-bit.exe" - certThumbprint " $certThumbprint "
101103 # </To be removed on removal of the ff fluent_bit_19>
102- SignExecutable - executable " $downloadPath \logging\nrfb2\fluent-bit.exe"
104+ SignExecutable - executable " $downloadPath \logging\nrfb2\fluent-bit.exe" - certThumbprint " $certThumbprint "
103105 }
104106}
105107
@@ -115,7 +117,7 @@ Function EmbedWinpkg {
115117 DownloadAndExtractZip - dest:" $downloadPath " - url:" $url "
116118
117119 if (-Not $skipSigning ) {
118- SignExecutable - executable " $downloadPath \winpkg\nr-winpkg.exe"
120+ SignExecutable - executable " $downloadPath \winpkg\nr-winpkg.exe" - certThumbprint " $certThumbprint "
119121 }
120122}
121123
0 commit comments