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

Refactor PS4 auth #377

Conversation

dogtopus
Copy link
Contributor

@dogtopus dogtopus commented Jun 29, 2023

This is a smaller scale refactor than #374.

Notable changes:

  • Frontend now uses Promise.all to load all required files.
  • RSA key loading from config and identity exporting after signing are now done in mbedTLS API.
  • Cut down redundant RSA factors in config storage. Now it only saves N, E, P and Q to the config and calculates the rest of the factors during setup(). This should save around 900 bytes of config storage.

This is a smaller scale refactor than OpenStickCommunity#374.

Notable changes:
- Frontend now uses Promise.all to load all required files.
- RSA key loading from config is now done in mbedTLS API.
- Cut down redundant RSA factors in config storage. Now it only saves N, E, P and Q to the config and calculates the rest of the factors during setup(). This should save around 900 bytes of config storage.
Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change on the if check, but it looks good. Changing the file read to a Promise await makes sense, I'll have someone with a PS4 make sure the logic all works.

src/addons/ps4mode.cpp Outdated Show resolved Hide resolved
No need to have a block here due to the importation logic not being complex enough to warrant one.
Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactor looks much better, saves us a good chunk of bytes in running memory and protobuf

@arntsonl arntsonl merged commit d20466e into OpenStickCommunity:main Jun 30, 2023
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants