Code Monkey home page Code Monkey logo

Comments (5)

Tapanila avatar Tapanila commented on May 24, 2024

Seems like v1 chromecast has different certificate then v2. I mainly test with v2.

I will look into this. But the fix needs to be done on the socket library which can be found from https://github.com/rdavisau/sockets-for-pcl
So this might take a while to fix.

from sharpcaster.

poumason avatar poumason commented on May 24, 2024

got it. thank you.

from sharpcaster.

fabianfoos avatar fabianfoos commented on May 24, 2024

I did this in ChromecastSocketService.Initialize, but I don't know if it is a good solution.

try
{
    await _client.ConnectAsync(host, int.Parse(port), true);
}
catch (Exception)
{
    StreamSocket socket = ((IExposeBackingSocket)_client).Socket as StreamSocket;
    if (socket.Information.ServerCertificateErrorSeverity == SocketSslErrorSeverity.Ignorable && socket.Information.ServerCertificateErrors.Count > 0)
    {
        socket.Control.IgnorableServerCertificateErrors.Clear();
        foreach (ChainValidationResult ignorableError in socket.Information.ServerCertificateErrors)
        {
            socket.Control.IgnorableServerCertificateErrors.Add(ignorableError);
        }

        await _client.ConnectAsync(host, int.Parse(port), true);
    }
}

I hope this can help you.

from sharpcaster.

Tapanila avatar Tapanila commented on May 24, 2024

Hey,

I have created a pull requests to solve this but it is not yet merged.
rdavisau/sockets-for-pcl#107

I will soon fork the library and create a new nuget package and switch to that so will get this solver soon.

from sharpcaster.

Tapanila avatar Tapanila commented on May 24, 2024

Sorry that it took so long. Issue is now fixed

from sharpcaster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.