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

IOS/ES: Handle personalised tickets properly #5066

Merged
merged 1 commit into from Mar 12, 2017

Conversation

leoetlino
Copy link
Member

@leoetlino leoetlino commented Mar 11, 2017

IOS unpersonalises device-specific ("personalised") tickets prior to storing them on the NAND.

This is required for installing titles from the shop channel. Thanks for booto for helping me figure out an issue with the shared secret part :)

IOS unpersonalises device-specific ("personalised") tickets prior to
storing them on the NAND.
@JMC47
Copy link
Contributor

JMC47 commented Mar 11, 2017

With this Pull Request... the Wii Shop Channel is usable.

@Parlane Parlane merged commit 29cf19f into dolphin-emu:master Mar 12, 2017
@Starsam80
Copy link
Contributor

Sorry for using this thread, but if it is working now, can someone explain why I still get this error message?
image

13:30:504 IOS\Network\Socket.cpp:318 E[IOS_SSL]: IOCTLV_NET_SSL_DOHANDSHAKE: SSL - Connection requires a read call
13:31:186 IOS\Network\Socket.cpp:107 E[IOS_NET]: SO_CONNECT failed with error 10035: A non-blocking socket operation could not be completed immediately. , ret= -1
13:31:259 IOS\Network\Socket.cpp:107 E[IOS_NET]: SO_CONNECT failed with error 10056: A connect request was made on an already connected socket. , ret= -1

@JMC47
Copy link
Contributor

JMC47 commented Mar 12, 2017

You probably don't have proper certs yet because our tool was extracting them incorrectly. the tool was just updated a few hours ago. This guide should now work, assuming the tool is uploaded.

https://wiki.dolphin-emu.org/index.php?title=Wii_Network_Guide

@Starsam80
Copy link
Contributor

Ok, updated to the latest master (5.0-2870), redid the certificates and it's a different error now:

Wii shop channel error code 204905

34:48:373 IOS\Network\Socket.cpp:107 E[IOS_NET]: SO_CONNECT failed with error 10037: An operation was attempted on a non-blocking socket that already had an operation in progress. , ret= -1
34:48:375 IOS\Network\Socket.cpp:107 E[IOS_NET]: SO_CONNECT failed with error 10056: A connect request was made on an already connected socket. , ret= -1
34:48:377 IOS\Network\SSL.cpp:110 E[IOS_SSL]: Failed to read D:/Dev/Projects/dolphin/Binary/x64/User/Wii/clientca.pem
34:48:377 IOS\Network\SSL.cpp:110 E[IOS_SSL]: Failed to read D:/Dev/Projects/dolphin/Binary/x64/User/Wii/clientcakey.pem
34:49:325 IOS\Network\Socket.cpp:107 E[IOS_NET]: SO_CONNECT failed with error 10035: A non-blocking socket operation could not be completed immediately. , ret= -1
34:49:400 IOS\Network\Socket.cpp:107 E[IOS_NET]: SO_CONNECT failed with error 10056: A connect request was made on an already connected socket. , ret= -1

And yes, the clientca.pem and clientcakey.pem files do exist (md5 hashes):

797567b427fa6b0ed74e7bf428d0a409 clientca.pem
a82c3521f532b7e21199cdcd976ff2d9 clientcakey.pem
f67797020b2dd108726efba4bfc34ba7 rootca.pem

I don't know what I'm doing wrong

@JMC47
Copy link
Contributor

JMC47 commented Mar 12, 2017

It can be really fickle about the NAND, it didn't work the first time for me either. Just wait for @leoetlino to respond, he may have a better idea what's going on.

@sepalani
Copy link
Contributor

@Starsam80
According to your logs, Dolphin is unable to read your files. Do these files exist and do you have the right to read them? You should also provide the sha256 rather than the MD5 hash and check if it matches theses: https://github.com/dolphin-emu/dolphin/pull/5027/files#diff-eee12198da9fa0c6a4601d0eeaad7100R91

@Starsam80
Copy link
Contributor

229ec678525e060588e8ea23e5459ec14af3c2ebb7b9e69ec46b0faf011730d9 clientca.pem
723be9b32c3afb83a4a3757adf352529e90c0ad6fad52509963ba8942ae625df clientcakey.pem
c5b0f8dfcec6b9ed2ac38b8bc69a4db7c209dc177d243c8df2bddf9e39171e5f rootca.pem

Yes, they do match. The only reason why I did MD5 was because it was a bit more inconvenient to use SHA256.

I also checked the permissions and nothing seems to be wrong (all users can read, and most users can write). I also ran dolphin as administrator and it was the same.

@JMC47
Copy link
Contributor

JMC47 commented Mar 12, 2017

Do you have keys.bin in place?

@Starsam80
Copy link
Contributor

Hmm, sorta. I do have a keys.bin, I got it from when I dumped my Wii, but if I was supposed to place it somewhere special in dolphin's folder I didn't do that, because the guide that I had followed didn't say to place it anywhere.

@JMC47
Copy link
Contributor

JMC47 commented Mar 12, 2017

I have no idea if the guide is even ready for shop channel lol. I more or less followed Leo's instructions, and even then it didn't work right away until it felt like it. Keys.bin goes with all the other files in the Wii NAND root.

@Starsam80
Copy link
Contributor

It's the same:
image

@JMC47
Copy link
Contributor

JMC47 commented Mar 12, 2017

I don't know.
0001000248414241-1

@Starsam80
Copy link
Contributor

I found a fix! Turns out we weren't opening the certificate file as a binary file, which caused it to fail once it hit certain characters. I made a pull request at #5069

@leoetlino leoetlino deleted the personalised-tickets branch March 12, 2017 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants