XITRIX / Moonlight-Switch

Moonlight port for Nintendo Switch
777 stars 47 forks source link

Building from source will not pair with sunshine (SSL error) #115

Closed GHYAKIMA closed 9 months ago

GHYAKIMA commented 9 months ago

Describe the bug

Pairing fails with SSL Error: Problem with the local SSL Certificate

To reproduce

  1. Build Moonlight from source
  2. Try to pair device with sunshine
  3. See error

Expected behavior

Sucessful pairing of the device

Screenshots

2023091804174000

Operating system

16.1.0|AMS 1.5.5|E

Additional context

Removing key folder did not fix the problem. I also had to add -ldav1d to makefile LIBS to sucessfully build NRO file.

EDIT2: Using Nxlink i found out that the error occurs on stage 5 pairing.

[INFO] Client: Start pairing stage #5
[INFO] Curl: Request:
https://192.168.0.3:47984/pair?uniqueid=0123456789ABCDEF&devicename=roth&updateState=1&phrase=pairch
allenge
[ERROR] Curl: error: Problem with the local SSL certificate
[INFO] Curl: Request:
http://192.168.0.3:47989/unpair?uniqueid=0123456789ABCDEF
[INFO] Curl: Response:
<?xml version="1.0" encoding="utf-8"?>
<root status_code="404"/>
XITRIX commented 9 months ago

Hi, I think public version of FFMpeg could differ, looks like it includes dav1d lib, while mine is not (cause I've built FFMpeg while there was no support for HW decoding in public version and no dav1d support also)

Same thing with SSL, I think it's because I'm using custom version of Curl with MbedTLS enabled, try to use this one, should help, but for sure, later I'll need to include all this customisations inside the source code

curl.zip

GHYAKIMA commented 9 months ago

Hi thanks for sharing your custom curl I was able to compile and finally sucessfully connect to sunshine