@@ -36,7 +36,7 @@ export async function getGGShield(
3636 arch : string ,
3737 context : ExtensionContext ,
3838 outputChannel : OutputChannel ,
39- allowSelfSigned : boolean ,
39+ insecure : boolean ,
4040) : Promise < string > {
4141 const version = getGGShieldVersion ( context ) ;
4242 console . log ( `Latest GGShield version: ${ version } ` ) ;
@@ -65,13 +65,7 @@ export async function getGGShield(
6565 }
6666 fs . mkdirSync ( ggshieldFolder ) ;
6767 // install GGShield
68- await installGGShield (
69- platform ,
70- arch ,
71- ggshieldFolder ,
72- version ,
73- allowSelfSigned ,
74- ) ;
68+ await installGGShield ( platform , arch , ggshieldFolder , version , insecure ) ;
7569 outputChannel . appendLine (
7670 `Updated to GGShield v${ version } . Checkout https://github.com/GitGuardian/ggshield for more info.` ,
7771 ) ;
@@ -138,7 +132,7 @@ export async function installGGShield(
138132 arch : string ,
139133 ggshieldFolder : string ,
140134 version : string ,
141- allowSelfSigned : boolean ,
135+ insecure : boolean ,
142136) : Promise < void > {
143137 let extension : string = "" ;
144138 switch ( platform ) {
@@ -163,7 +157,7 @@ export async function installGGShield(
163157 fileName ,
164158 downloadUrl ,
165159 ggshieldFolder ,
166- allowSelfSigned ,
160+ insecure ,
167161 ) ;
168162 extractGGShieldBinary ( path . join ( ggshieldFolder , fileName ) , ggshieldFolder ) ;
169163}
@@ -201,11 +195,11 @@ async function downloadGGShieldFromGitHub(
201195 fileName : string ,
202196 downloadUrl : string ,
203197 ggshieldFolder : string ,
204- allowSelfSigned : boolean ,
198+ insecure : boolean ,
205199) : Promise < void > {
206200 console . log ( `Downloading GGShield from ${ downloadUrl } ` ) ;
207201
208- const instance = allowSelfSigned
202+ const instance = insecure
209203 ? new Agent ( {
210204 rejectUnauthorized : false ,
211205 } )
0 commit comments