muxinc / mux-php

Official Mux API wrapper for PHP projects, supporting both Mux Data and Mux Video.
MIT License
40 stars 30 forks source link

SSL certificate problem: certificate has expired #46

Closed nisanthitraveller closed 3 years ago

nisanthitraveller commented 3 years ago

Hello, I'm getting below error while saving a daily.co recording to MUX. What should be the mistake I did. It was working fine till last week with the same code. I'm using laravel MuxPhp\ApiException : [0] cURL error 60: SSL certificate problem: certificate has expired

      $config = \MuxPhp\Configuration::getDefaultConfiguration()
            ->setUsername(env('MUX_TOKEN_ID'))
            ->setPassword(env('MUX_TOKEN_SECRET'));
        $assetsApi = new \MuxPhp\Api\AssetsApi(
            new \GuzzleHttp\Client(),
            $config
        );
        $input = new \MuxPhp\Models\InputSettings(["url" => $dailycoVideoUrl, 'type' => 'webm']);
        $createAssetRequest = new \MuxPhp\Models\CreateAssetRequest(["input" => $input, "playback_policy" => [\MuxPhp\Models\PlaybackPolicy::_PUBLIC] ]);
        $result = $assetsApi->createAsset($createAssetRequest);

        $muxId = $result->getData()->getPlaybackIds()[0]->getId();
philcluff commented 3 years ago

Hi @nisanthitraveller, one of Let's Encrypt's root certificates expired last week, which can cause issues if your openSSL or system certificate stores are out of date.

Please check that you're running an up-to-date certificate store (latest ca-certificates) and OpenSSL (>= 3.0 or 1.1.1 if you're running a legacy install) on your system.

Thank you.

nisanthitraveller commented 3 years ago

Hi @philcluff

Thanks for the help. Yes it is working fine after I run yum update

Hi @nisanthitraveller, one of Let's Encrypt's root certificates expired last week, which can cause issues if your openSSL or system certificate stores are out of date.

Please check that you're running an up-to-date certificate store (latest ca-certificates) and OpenSSL (>= 3.0 or 1.1.1 if you're running a legacy install) on your system.

Thank you.

philcluff commented 3 years ago

Great, let me know if you run into any more issues.

Thanks.