Add notes on creating a self signed build#13987
Conversation
lukaszgo1
left a comment
There was a problem hiding this comment.
The documentation here seems to be much more complex than the one on our wiki. The additional advantage of the tutorial I've linked to is that it does not require installation of the additional PowerShell modules and relies on the tools which comes with Visual Studio by default.
|
@lukaszgo1 - I would argue that the steps in that wiki are out of date. |
|
Additionally, I think it would be worth taking the warning intro paragraph from the wiki page:
It might be helpful to extend this with why you might want to do this. E.G. for testing NVDA in situations that require a signed, trusted install:
Ideally this will link to another document that explains that need in more detail. This self signed cert doc is a "how-to guide", the other doc would be an "explainer". |
| ```ps1 | ||
| cd <nvdaSourceDirectory> | ||
| $password = ConvertTo-SecureString -String <Password> -Force -AsPlainText | ||
| Import-PfxCertificate -Password $password -CertStoreLocation "Cert:\LocalMachine\TrustedPublisher" -FilePath local.pfx |
There was a problem hiding this comment.
The same not found issue occurs for me with Import-PfxCertificate. After some googling it turns out that availability of these functions depends on the version of Windows in use rather than version of PowerShell. While for generating certificates it is reasonable to assume developers are on an uptodate OS, the same cannot be said about importing certificate - it is sometimes necessary to test something with a self signed build on older versions of Windows which are still supported by NVDA, where this way of importing would fail. That was IMO the main advantage of the old method described on the wiki - it is OS agnostic and still works.
There was a problem hiding this comment.
As asked in #13987 (comment), have you installed the prerequisites? They may require a Windows restart to become available.
According to PKI:
This module can run on any of the specified operating system:
- Windows Server 2008 R2*/2012*/2012 R2*/2016*
- Windows 7/8/8.1/10
Note that building NVDA is only supported on Windows 10+.
There was a problem hiding this comment.
After some googling it turns out that availability of these functions depends on the version of Windows in use rather than version of PowerShell.
Can you provide a reference for this?
There was a problem hiding this comment.
it is sometimes necessary to test something with a self signed build on older versions of Windows which are still supported by NVDA, where this way of importing would fail.
Perhaps I can reintroduce the steps for importing certificates via the Windows UI as an alternative. This is a fail safe method across OSs.
There was a problem hiding this comment.
According to this TechNet question (see the second answer) these PowerShell functions are available on Windows 8 and above. Adding the gui method of importing the certificate would indeed make sure that there is a consistent method to use regardless of the version of Windows on which the certificate has to be imported.
There was a problem hiding this comment.
I've added a passing reference for Windows 7. The NVDA docs do not need to cover how to use certificate manager (or similar) in detail. The intended destination store location of the certificate is provided.
|
@feerrenrut - I've added a warning pre-amble.
I think this task is blocked by these documents. |
See test results for failed build of commit d8502f0089 |
See test results for failed build of commit 52e6f54f04 |
See test results for failed build of commit 52e6f54f04 |
See test results for failed build of commit 0355db3b11 |
See test results for failed build of commit 0355db3b11 |
After this PR, update https://github.com/nvaccess/nvda/wiki/UsingASelfSignedCertificate to refer to this document
Link to issue number:
None
Summary of the issue:
Without a signed NVDA build, certain features cannot be tested.
Only NV Access have the ability to sign a build with the NV Access certificate.
Other developers who wish to create a signed build to test NVDA must sign the build with their own certificate.
There is no documentation on creating a self-signed build.
Description of user facing changes
Added notes on creating and testing a self-signed build.
Description of development approach
Add notes, tested creating a self-signed build.
Based on these instructions: https://docs.microsoft.com/en-us/windows/msix/package/create-certificate-package-signing
Testing strategy:
N/A
Known issues with pull request:
N/a
Change log entries:
N/a
Code Review Checklist: