@@ -93,7 +93,7 @@ func restoreInTempDirAndGetBuildInfo(params utils.AuditParams, wd string, exclus
9393 }
9494
9595 log .Info ("Dependencies sources were not detected nor 'install' command provided. Running 'restore' command" )
96- sol , err := runDotnetRestoreAndLoadSolution (params , tmpWd , exclusionPattern )
96+ sol , err := runDotnetRestoreAndLoadSolution (params , tmpWd , exclusionPattern , params . InsecureTls () )
9797 if err != nil {
9898 return
9999 }
@@ -116,7 +116,7 @@ func isInstallRequired(params utils.AuditParams, sol solution.Solution, skipAuto
116116 return installRequired , nil
117117}
118118
119- func runDotnetRestoreAndLoadSolution (params utils.AuditParams , tmpWd , exclusionPattern string ) (sol solution.Solution , err error ) {
119+ func runDotnetRestoreAndLoadSolution (params utils.AuditParams , tmpWd , exclusionPattern string , allowInsecureConnections bool ) (sol solution.Solution , err error ) {
120120 toolName := params .InstallCommandName ()
121121 if toolName == "" {
122122 // Determine if the project is a NuGet or .NET project
@@ -148,7 +148,7 @@ func runDotnetRestoreAndLoadSolution(params utils.AuditParams, tmpWd, exclusionP
148148 log .Info (fmt .Sprintf ("Resolving dependencies from '%s' from repo '%s'" , serverDetails .Url , depsRepo ))
149149
150150 var configFile * os.File
151- configFile , err = dotnet .InitNewConfig (tmpWd , depsRepo , serverDetails , false )
151+ configFile , err = dotnet .InitNewConfig (tmpWd , depsRepo , serverDetails , false , allowInsecureConnections )
152152 if err != nil {
153153 err = fmt .Errorf ("failed while attempting to generate a configuration file for setting up Artifactory as a resolution server" )
154154 return
0 commit comments