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

LinqPadless 1.1 - SSL certificate error #49

Closed
veremenko-y opened this issue Dec 28, 2020 · 10 comments
Closed

LinqPadless 1.1 - SSL certificate error #49

veremenko-y opened this issue Dec 28, 2020 · 10 comments
Milestone

Comments

@veremenko-y
Copy link

veremenko-y commented Dec 28, 2020

I know you've decided to convert new version to .NET core ( :( ) but I still use LinqPad 5. Latest 1.1 version seems to fail due to the SSL issues. Is it possible to patch it and release an update?

This is what I was getting on the first run.

PS D:\...> lpless .\script.linq -t exe
D:\...\script.linq
  Packages directory: D:\...\packages
  Packages target: .NETFramework,Version=v4.5.2
  Installing C# compiler using NuGet:
    Downloading NuGet from https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe
The request was aborted: Could not create SSL/TLS secure channel.

After going over the source code, I managed to download csc manually and put it in the folder that lqless wants it to be, but that doesn't fully help, as you can see.

D:\...\script.linq
  Packages directory: D:\...\packages
  Packages target: .NETFramework,Version=v4.5.2
  Querying latest version of FakeLinqPad
An error occurred while retrieving package metadata for 'FakeLinqPad' from source 'https://api.nuget.org/v3/index.json'.
@atifaziz
Copy link
Owner

I think this might be related to nuget.org permanently removing support for TLS 1.0 and 1.1.

Is it possible to patch it and release an update?

I'd be happy to take a PR and make a release if you can help with spotting the problem and then fixing and testing it (assuming it's urgent to you).

@atifaziz
Copy link
Owner

Something else to consider that may not require any code changes:

@veremenko-y
Copy link
Author

Not very urgent, I hacked around with current version to make it work for now. But I did made a simple PR that fixes this particular issue and enforces TSL 1.2.

@atifaziz
Copy link
Owner

Not very urgent, I hacked around with current version to make it work for now. But I did made a simple PR that fixes this particular issue and enforces TSL 1.2.

Thanks, but the build has failed and I am afraid I don't have much time to investigate.

Did you checkout the other workaround mentioned in the links I shared? Most of the those don't seems to need any code changes.

@veremenko-y
Copy link
Author

Thanks, but the build has failed and I am afraid I don't have much time to investigate.

Nuget packages were not restored. I'm not familiar with appveyor at all, so I don't know why. Project is built without errors locally in Debug and Release configurations.

Did you checkout the other workaround mentioned in the links I shared? Most of the those don't seems to need any code changes.

Correct. But the app is available to download in nuget and scoop https://github.com/lukesampson/scoop-extras/blob/a8bcb1b43b0230a9348a422017be31fe625cea70/bucket/linqpadless.json, but TLS issue makes it completely broken out of the box.

I wanted to fix it for everybody, not just me. It's still useful tool, even though it's technically outdated with release of new LINQPad (although v5 is still supported) and .NET. I understand that you are busy and may not have time to deal with this, but without access to build infrastructure I'm unable to help any further. Feel free to close the issue and pr.

atifaziz added a commit that referenced this issue Dec 31, 2020
Fixes #49.

Co-authored-by: Atif Aziz <code@raboof.com>
@atifaziz atifaziz added this to the 1.2.0 milestone Dec 31, 2020
@atifaziz
Copy link
Owner

Closed via a2e6352 that is the merge of PR #50.

@atifaziz
Copy link
Owner

The fix is now available in release 1.2.

@veremenko-y
Copy link
Author

This is amazing, thank you!

@veremenko-y
Copy link
Author

I'm really sorry, now I feel even worse. It still doesn't work on clean install. Because you moved setting SecurityProtocol down next to downloading nuget references, it will be unable to download csc from Nuget when running lpless script.linq -t exe...

@atifaziz
Copy link
Owner

atifaziz commented Jan 1, 2021

Because you moved setting SecurityProtocol down next to downloading nuget references, it will be unable to download csc from Nuget when running lpless script.linq -t exe...

That's too bad. I guess what happened here was that I always tested against a LINQPad query file that referenced a NuGet package and so the TLS was always upgraded by the time it got to the compilation step and which downloaded nuget.exe and the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants