Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-WebRequest causes SSL/TLS error #6

Closed
olaeld opened this issue Aug 13, 2019 · 4 comments
Closed

Invoke-WebRequest causes SSL/TLS error #6

olaeld opened this issue Aug 13, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@olaeld
Copy link

olaeld commented Aug 13, 2019

Upon installing the extension and running it, I get the following error:

Downloading Dependency Check vulnerability data... ##[error]System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() Ending Dependency Check...

@ejohn20
Copy link
Collaborator

ejohn20 commented Aug 13, 2019

I've seen this before in PS using invoke web request when there is a policy preventing non-TLS1.2 connections. I'm guessing that this needs to be added to the script:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

@ejohn20 ejohn20 added the bug Something isn't working label Aug 13, 2019
@ejohn20
Copy link
Collaborator

ejohn20 commented Aug 13, 2019

I've only used this task on the Hosted 2017 agents, can you confirm that it works on that one? I'll try to reproduce when i have a minute.

@olaeld
Copy link
Author

olaeld commented Aug 13, 2019

Thanks, for getting back on this topic! Unfortunately, because of the setup of the project, I cannot easily test this on a Hosted 2017 agent.

@ejohn20 ejohn20 self-assigned this Aug 21, 2019
@ejohn20
Copy link
Collaborator

ejohn20 commented Aug 27, 2019

@olaeld I'm having trouble re-producing this issue. Would you be willing to install the development version of the extension in your organization and test a patch for me? If so, you can DM me your organization name and I can share it with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants