HTTPS support #431
Replies: 20 comments 5 replies
-
here's a batch file to generate a certificate and its corresponding cnf file rem generate root certificate. root_cert.crt will be injected into the game's EBOOT
openssl genrsa -out root_key.key 2048
openssl req -x509 -new -nodes -subj "/C=US/ST=CA/L=San Diego/O=SONY Computer Entertainment America Inc./OU=SCERT Group/CN=SCERT Root Authority" -key root_key.key -sha1 -days 10957 -out root_cert.crt -config root_cert.cnf
rem generate certificate for the gameserver itself.
openssl genrsa -out gameserver_key.key 1024
openssl req -new -sha1 -key gameserver_key.key -subj "/C=US/ST=CA/L=San Diego/O=SONY Computer Entertainment America Inc./OU=SCERT Group/CN=gameserver.mylighthouseserver.com" -out gameserver_req.csr
openssl x509 -req -in gameserver_req.csr -CA root_cert.crt -CAkey root_key.key -CAcreateserial -out gameserver_cert.crt -days 3652 -sha1 root_cert.cnf
|
Beta Was this translation helpful? Give feedback.
-
the certificate somehow comes out a couple of bytes smaller than the original, despite providing the same info |
Beta Was this translation helpful? Give feedback.
-
oh and make sure to convert line endings to LF if you're generating these on Windows as CRLF adds an extra byte per line break |
Beta Was this translation helpful? Give feedback.
-
you can then use this command to output it in a format that Kestrel accepts: |
Beta Was this translation helpful? Give feedback.
-
a self-signed cert is fine in this case (and better due to size constraints) as the game has its own single certificate truststore that you're replacing |
Beta Was this translation helpful? Give feedback.
-
Did you actually get the game to connect to the server? If so, what platform were you using? I tried your method in the past and was unable to get results. |
Beta Was this translation helpful? Give feedback.
-
I got the game to connect to the server yeah I'm using RPCS3 with LittleBigPlanet 2 Beta primarily, but I've tested LBP1 too and it works just fine can't test LBP3 atm because I messed up my eboot by accident and it won't boot anymore lmao |
Beta Was this translation helpful? Give feedback.
-
and yeah having both URLs be HTTPS works too |
Beta Was this translation helpful? Give feedback.
-
you sure that you're not using cipher suites that the game doesn't support? to make sure cipher suites or proxy configuration aren't the issue, try connecting to it over SSL using LBP1 deploy as it doesn't care about the certificate (at least when address is configured through craftworld.ini) |
Beta Was this translation helpful? Give feedback.
-
I’ll try when I get home later today but my issue was the system rejecting the certificate because it was self signed. I only tested on RPCS3 though. |
Beta Was this translation helpful? Give feedback.
-
the game has its own root certificate in the eboot that you need to replace with the one you used to sign the server certificate, which has to have the cname set your domain (the root cert is fine with any cname it seems? either that or it has to be the same as the issuer) otherwise it'll reject the server's certificate and terminate the connection |
Beta Was this translation helpful? Give feedback.
-
I can email you an example eboot if you want |
Beta Was this translation helpful? Give feedback.
-
fixed my LBP3 eboot, it works too |
Beta Was this translation helpful? Give feedback.
-
btw you also should configure a subject alternative name for the resource subdomains for LBP3 otherwise it won't be able to load any resources |
Beta Was this translation helpful? Give feedback.
-
actually you should make a separate vhost and wildcard certificate for the res domains as LBP3 doesn't seem to support alternate names |
Beta Was this translation helpful? Give feedback.
-
Do not do this. This is piracy. |
Beta Was this translation helpful? Give feedback.
-
LBP3 already works completely fine over HTTPS with no modifications, probably not worth it to worry about LBP3 support here. |
Beta Was this translation helpful? Give feedback.
-
Interesting research, though. I actually looked into this with LBP2 but stopped because LetsEncrypt's root certificate (ISRG Root X1) is too big to fit in the EBOOT. Gave up there, essentially lol |
Beta Was this translation helpful? Give feedback.
-
Oops, this should be a discussion actually |
Beta Was this translation helpful? Give feedback.
-
late LBP2 and LBP3 seem to be a bit unstable connection wise over HTTPS and I'm not sure why |
Beta Was this translation helpful? Give feedback.
-
ok so I've managed to get HTTPS working through a reverse proxy on my Apache web server
to get it to connect, you have to swap the SCERT root certificate in the game's executable, which is in X509 PEM format, which makes it easy to find as it starts with "-----BEGIN CERTIFICATE-----" every time (without the quotes obviously) and ends with "-----END CERTIFICATE-----", making it fairly easy to swap
the root certificate has to be the same length or shorter, so keep the info you put into openssl or whatever you're using to generate the certificate short, then sign a certificate for the domain you're hosting your instance with using said root certificate and its corresponding private key.
Beta Was this translation helpful? Give feedback.
All reactions