Skip to content

Ensure NVDA contains a signed and valid python37.dll#9796

Merged
michaelDCurran merged 2 commits intothreshold_py3_stagingfrom
i9762
Jun 24, 2019
Merged

Ensure NVDA contains a signed and valid python37.dll#9796
michaelDCurran merged 2 commits intothreshold_py3_stagingfrom
i9762

Conversation

@michaelDCurran
Copy link
Copy Markdown
Member

@michaelDCurran michaelDCurran commented Jun 24, 2019

Link to issue number:

Fixes #9762

Summary of the issue:

On threshold_py3_staging, NVDA fails to sign a side-loadable appx Windows store package of NVDA.
The reason for this is that makeappx detects that python37.dll (included in the package) has a corrupt certificate.
It seems that when Py2exe copies python37.dll into NVDA's dist directory, it tries to add a string resource to the file. this not only invalidates the signature, but also seems to corrupt the certificate and truncate the file.
I think that in Python2.7 python27.dll was never signed, so this was not really an issue. But in Python3, python37.dll is now signed.

Description of how this pull request fixes the issue:

After running py2exe, sconstruct copies a fresh version of python37.dll into dist that has not been tampered with by py2exe.

Testing performed:

  • Building this branch on appveyor successfully signs the side-loadable appx package.

Known issues with pull request:

this p works around the issue. Obviously it would be good to know hy py2exe needs to add that string resource to the file.

Change log entry:

None.

…l into dist as Py2exe currently corrupts the dll's certificate by trying to add a string resource.
Copy link
Copy Markdown
Collaborator

@LeonarddeR LeonarddeR left a comment

Choose a reason for hiding this comment

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

Just a typo

sconstruct Outdated
action.append(buildCmd)

# Python3 has started signing its main python dll.
# However, Pytexe currently tries to add a string resource to it, invalidating the signature and possibly currupting the certificate.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

pytexe > py2exe

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.

3 participants