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

Allow the possibility to skip ca certificates validation #6

Closed
joaomatossilva opened this issue Feb 15, 2017 · 8 comments
Closed

Allow the possibility to skip ca certificates validation #6

joaomatossilva opened this issue Feb 15, 2017 · 8 comments

Comments

@joaomatossilva
Copy link

For non windows platforms there are some issues with the certificates validations on nonssl installs. There should be a workaround to skip that validation while Microsoft works on this issue

joaomatossilva pushed a commit to Mindbus/tinify-net that referenced this issue Feb 15, 2017
@zolakt
Copy link

zolakt commented Jan 25, 2018

From what I can tell it doesn't work on any non-windows platforms.
Works locally on Windows, when I deploy it on Linux, I get a "SSL connection error".

Could it be related to this problem?
https://stackoverflow.com/questions/41774381/x509certificatevalidationmode-not-working-in-linux

Can you just make a flag to turn off validation completely?
It's making the lib unusable in production.
Currently I'll have to drop it completely and switch to another client.

My suggestion would be to make the HttpClientHandler injectable, but since this whole lib is "static galore", I guess that's not really an option. So just stick a property to the main Tinify class.

@viktor-gustafsson
Copy link

Can you please merge the PR as it would be nice to be able to run Tinify inside a linux docker container.

@EllinorBergman
Copy link

What version of Linux are you using? We have used Ubuntu version 18.04 as well as 16.04 running .NET core 3.0, and we are unable to reproduce it.

@quentinR0bert
Copy link

Hi !
On MacOS, use in a .netstandar library and use into a .netCore CLI, since the 20 September (Let'sEncryp root CA expiration ?), we always have this exception : "Error while connecting: The remote certificate is invalid according to the validation procedure". (Even with the 1.5.3 version).
Do you have in the futur an update for this, or will we need to use the fork of matthewrdev ?

@rkoopmans
Copy link
Contributor

We have no plans to add a flag for skipping CA validation as that is bad practice and should be unnecessary.

I got the tinify API client working with the mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim docker image as well.

@quentinR0bert Could you share what version of .netcore you are using?

@quentinR0bert
Copy link

Hi !

Thanks for the answer, we understand the bad practice about security.

The .Net Core CLI project target .Net Core 3.0 and the .Net Library with the Tinify NuGet target .Net Standard 2.1

@quentinR0bert
Copy link

quentinR0bert commented Oct 27, 2021

FYI i have just downloaded the source code and executed the test as marked in the readme.

The "dotnet test test/Tinify.Tests" is okay.

but i have 4 failed test for the Integration tests (by default the sample is on .netCore 2.0, i have the same error in .netCore 3.0 and 3.1)

(Some MSBuild part is in french sorry :-/ )
output.txt

@rkoopmans
Copy link
Contributor

rkoopmans commented Nov 3, 2021

Thanks for sharing! I can confirm that the client does not work on mac OS.

Currently it works on:
Linux - dotnet > 3.1
Windows - dotnet > 2.0

Since it seems to be dotnet implementation specific to mac OS or underlying libraries, we are not looking into this right now. I suggest you use Docker for building and running your dotnet app.

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

6 participants