-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add Digital Signature for windows version #1142
Comments
By the way, about Vim Installer,
|
Are there any services that provide code signing without charge?
Vim-win32-installer already uses NSIS 3.0, but what is the merit of Unicode support? |
just add About code signingGlobalsign provide free signature for open source project:https://www.globalsign.com/ssl/ssl-open-source/ or https://www.certum.eu/certum/cert,offer_en_open_source_cs.xml But Vim is a very famous project, You can find Digicert, Thawte Or comodo to get a digital signature |
What problem does |
I want ask you the purpose/merits of the setting. Hm, this seems SSL certificate. Maybe we can use this when we support HTTPS on www.vim.org (and this is requested several times, e.g. #671). But not for code signing?
Seems good, but this is up to Bram for the official installers. |
There are at least two versions to use MUI2: (Don't know which is better/newer.) Lines 834 to 845 in 84dbd49
|
SSL you can also use About code signing, I mean, Vim is a very famous open-source project, You can find Digicert, Thawte, Comodo... and so on, to get a free code signing certificate. |
Liu Yixuan wrote:
Vim is still hosted on SourceForge, and they don't support SSL. Not sure how SSL signing is related to signing a .exe. ARTHUR: A scratch? Your arm's off! /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \ |
I checked this again. I thought this can be used without charge, but it was wrong. It's €14.00/year, not so expensive, but I suppose Bram wants to use money for Uganda children rather than code signing. ;-) |
@wbsdty331 please make clear, if you are talking about ssl encryption of the website or about signing the executable. Note also #671 and the referenced bug at sourceforge |
For the website, Let's Encrypt provides free certificates. |
Think OP means signing the executable. The SSL related information seems to be a red herring. I'm behind a corporate firewall where you can't install unsigned, untrusted binaries. Signing this for Windows would be helpful. |
I'm looking for OSS projects that would like to test-drive our code signing service. For free-as-in-freedom projects it's free as in free beer. Prerequisites for a free OSS subscription and certificate: FLOSS license, source code on GitHub/Bitbucket/Gitlab, builds on AppVeyor. How it works:
|
@stefan-wenig that sounds very interesting. What other open source projects are using your code signing service already? @brammool we could test this with the vim/vim-win32-installer repository. I can have a look tomorrow. |
So far: GitExtensions. |
@stefan-wenig can you get me a SignPath.io subscription? If I read the documentation correctly, I need to disable the appveyor cache, is this right? |
@chrisbra please contact me at [email protected], I need your email address (the one you use for GitHub login) |
thanks. I think I have set it up according to your docs. vim/vim-win32-installer#118 |
@stefan-wenig BTW: it looks like the sample appveyor hook in the documentation https://about.signpath.io/documentation/build-system-integration/#appveyor has an extra linebreak between |
I can see you already set up mutual permissions. Allow for a few days for release certificate issuance. You can use the test-signing policy right away. Next step: Decide what you want to sign. Simple: sign just the installer exe file. This removes SmartScreen warnings. (The initial default artifact configuration will do this.) Advanced: Sign all executable files in your build. This is really how it should be done. Installation time signing removes the most visible problem, but security benefits immensely from deep signing. However, while this would sign the standalone executables in gvim*.zip, it would not sign the files that your installer extracts. There are two ways to resolve this:
|
You're right, I'll have it fixed. Thanks! |
I think I configured it to sign all Another thing, that was not clear to me: For which windows versions is the signature valid (e.g. Windows includes the relevant root CA certificate)? Or does it work out of the box? (I just tried the gitextensions installer and I did not get a warning message, so at least my Win 10 desktop system seems to be fine). Regarding the installer: Switching the installer is a big step, @k-takata just recently did invest a huge amount of work to overhaul the current installer. I am sure he appreciates it to not do this again at this time ;) Once the current setup works, we'll see how to make your second alternative work, I see you also provide Powershell scripts to do this, so perhaps this is an alternative. |
Note that the path pattern must match a single artifact. If you want to sign more than one, create a ZIP file.
Exactly. The test certificate is self-signed. See https://github.com/SignPath/Website/blob/v2/src/documentation/5_test_certificates.md (not yet published) The release certificate will be from Thawte, accepted everywhere. Note that SmartScreen is different, there will still be warnings in the first days: https://about.signpath.io/code-signing/windows-platform/#microsoft-smartscreen
Understood.
Only if you bring your own certificate. For OSS projects we provide free certificates under our Name (SignPath Foundation), which means we are the publisher, technically and legally, so you must follow a verifiable process. Our certificate guarantees that the binary was built from source. Currently we only support downloading artifacts from finished AppVeyor builds. So for now, if you want deep signing for NSIS installers, you'll have to break up your build. Sorry for the inconvenience. |
thanks for the information. I merged the PR yesterday, unfortunately, signing the executable failed:
Perhaps you can have a look.
Okay, so let me summarize:
I guess point 2 and 3 would be nice to have for the future, but for now I would be satisfied with a single signed nsis installer and all the binaries inside the zip file. Thanks for providing such a nice service! |
Unfortunately, AppVeyor will not display error messages for fear of exposing secrets. We work around that by sending errors per e-mail to the notification address, just set it: https://app.signpath.io/Web/47c0047c-0c1d-42b2-a16c-4ea6907dc813/CIUsers/e3cc379e-2276-4047-89be-388657d688a2/ChangeNotificationEmailAddress
correct
correct
You'd just choose the release-signing policy ID for certain branches/tags https://www.appveyor.com/docs/branches/#build-on-tags-github-gitlab-and-bitbucket-only or using AppVeyor conditions (never tried that) If you don't want to sign a certain build, just don't approve it in signpath.
Someone really needs to write a NSIS to WIX/MSI converter ;-) Yes, siging the installer will solve the most annoying problem, i.e. SmartScreen and UAC installer warnings. But unsinged executables make me sad. Maybe we can someday provide an easier way.
You're most welcome, and thanks for testing it! |
probably not gonna happen though http://lists.wixtoolset.org/pipermail/wix-users-wixtoolset.org/2016-February/001411.html |
@stefan-wenig thanks, I don't know how to set the product name for the installer. @k-takata do you know? |
Is it a version resource of the installer? |
According to the description that would be it, I'm not into NSIS though. |
@k-takata sounds like it. The last signing-request failed I believe of this:
|
So we need to add a patch something like this? --- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -87,6 +87,14 @@ RequestExecutionLevel highest
!endif
##########################################################
+# Version resources
+
+VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
+
+##########################################################
# MUI2 settings
!define MUI_ABORTWARNING |
looks good. Can we test this in the vim-win32-installer repo? |
I think we can use the |
Yes, that was what I meant. Will create a PR for that later today, thanks. |
Sorry, the patch was wrong. diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi
--- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -173,6 +173,14 @@ Page custom SetCustom ValidateCustom
!include "lang\tradchinese.nsi"
!endif
+##########################################################
+# Version resources
+
+VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
+
# Global variables
Var vim_dialog |
Updated again: --- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -173,6 +173,17 @@ Page custom SetCustom ValidateCustom
!include "lang\tradchinese.nsi"
!endif
+##########################################################
+# Version resources
+
+VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.0.0"
+VIProductVersion "${VER_MAJOR}.${VER_MINOR}.0.0"
+
# Global variables
Var vim_dialog
|
Finally, signing the daily artifact using release signing happened yesterday successfully. I manually uploaded a signed 64 bit installer to the release section on the vim-win32-installer: @stefan-wenig would it be possible to create stable URLs for downloading the artifacts? So instead of which does not contain the SigningRequest ID as part of the URL but e.g. the binary and Version Number so we could add the link easily to the github release page? |
Congratulations! |
@stefan-wenig thanks there is no hurry. For the time being, I'll upload new signed releases every once in a while. And to get the zip files signed as well, that is still on my personal todo list. @brammool how about applying this additional patch for the nsis installer so set the version number and name? https://github.com/vim/vim-win32-installer/blob/master/patch/01_nsis_progname.patch |
@stefan-wenig thanks there is no hurry. For the time being, I'll upload new signed releases every once in a while. And to get the zip files signed as well, that is still on my personal todo list.
@brammool how about applying this additional patch for the nsis installer so set the version number and name? https://github.com/vim/vim-win32-installer/blob/master/patch/01_nsis_progname.patch
That looks harmless, I'll include it.
…--
If you had to identify, in one word, the reason why the
human race has not achieved, and never will achieve, its
full potential, that word would be "meetings."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
@chrisbra I manually created a signing request for the x86 version of v8.1.1359 |
@stefan-wenig thanks, I have approved and uploaded the artifact to https://github.com/vim/vim-win32-installer/releases/tag/v8.1.1359 |
I can see it at the UAC dialog box. |
ah that seems to come from the certificate. Perhaps @stefan-wenig knows how to adjust that. |
It's hard coded. We weren't aware that UAC shows the entire descrtiption. Unfortunately, no two code signing mechanims act the same. We'll shorten it significantly asap. |
@brammool How about including this patch to the nsis installer: It simply adds the Patchlevel to the Productversion of the installer. |
Christian wrote:
@brammool How about including this patch to the nsis installer:
https://github.com/vim/vim-win32-installer/blob/master/patch/01_patchlevel_nsis_installer.patch
It simply adds the Patchlevel to the Productversion of the installer.
Yes, that looks fine.
…--
Have you heard about the new Beowulf cluster? It's so fast, it executes
an infinite loop in 6 seconds.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
News:
I'll report back when we provide a mechanism for automatic release uploads. |
I think this can be closed |
PuTTY have been add it since 0.67
To help protect against tampering in transit from our website or after downloading, I think it's necessery to add it.
The text was updated successfully, but these errors were encountered: