Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319605

Summary: Need support for signing windows exes
Product: Community Reporter: Thomas Watson <tjwatson>
Component: ServersAssignee: Thanh Ha <thanh.ha>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: aniefer, daniel_megert, denis.roy, john.arthorne, kim.moir, mike.milinkovich, remy.suen, samw, stephen.francisco
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 319419    

Description Thomas Watson CLA 2010-07-12 12:02:24 EDT
See bug 319419 comment 3.  In order to sign windows exes we need additional support from the foundation build machines.
Comment 1 Denis Roy CLA 2010-07-12 13:29:33 EDT
Can't we just replace the EXE with a batch file  :-)
Comment 2 Eclipse Webmaster CLA 2010-07-12 16:01:38 EDT
I'll start looking at what's required to get this working.  I'm guessing it's only going to work on the Windows 7 slave.

-M.
Comment 3 Eclipse Webmaster CLA 2010-07-26 16:20:50 EDT
I've installed the tools on our Windows 7 hudson slave(presently connected to our 'new' master instance).  

I'll need someone with build and signing experience on Windows to help get everything tested and verified.

-M.
Comment 4 Denis Roy CLA 2010-09-01 14:08:11 EDT
> I'll need someone with build and signing experience on Windows to help get
> everything tested and verified.

How about just downloading the win32 Eclipse ZIP file, extracting it, and attempting to sign eclipse.exe ?

The download the entire thing to your Windows box and trying it out.  Success if you don't get a warning, failure if you do?
Comment 5 Andrew Niefer CLA 2010-09-01 15:58:52 EDT
I wasn't sure if I should comment here or in bug 319419, but I guess we need a new hudson job for this. 

 Either a new job for Equinox "equinox-sign-win32" (accessible to aniefer, tjwatson, kmoir), or a generic job that anyone can use to sign an exe (accessible to people with signing permission?).

If we use a equinox specific job, a hint about what the command line for the tool looks like would also be good.  We'd probably stick an ant script or batch file in /cvsroot/rt/org.eclipse.equinox/framework/releng/org.eclipse.equinox.launcher.releng
Comment 6 Eclipse Webmaster CLA 2010-09-01 16:32:28 EDT
I've created an equinox job to get things started.

My best advice on the command line would be the links here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=319419#c3.  That's why I was asking for help testing this.

I can tell you the sign tool is installed here: c:\Program Files\Microsoft SDKs\Windows\v7.0\Bin .  

-M.
Comment 7 Andrew Niefer CLA 2010-09-02 14:31:42 EDT
The piece I'm not sure about is the certificate. 
From here, http://msdn.microsoft.com/en-us/library/aa387764%28VS.85%29.aspx
It looks like we need to specify the certificate file:

/fSignCertFile : Specifies the signing certificate in a file. Only the Personal Information Exchange (PFX) file format is supported. You can use the PVK2PFX.exe tool to convert SPC and PVK files to PFX format.

The alternative seems to be having the certificate in a store.

I'm assuming this is the same certificate we use for signing bundles, perhaps we need a script to encapsulate this in the same way we do there.
Comment 8 Eclipse Webmaster CLA 2010-09-13 14:36:04 EDT
I've managed to convert our signing key into the Microsoft desired type.  I also created a script called 'sign' and added that to the hudson users path.  So you should just be able to call: sign c:\path\to\my.file in your build scripts.

-M.
Comment 9 Steve Francisco CLA 2010-11-22 17:07:01 EST
Is this something that can be done in 3.6.2 (and later) builds?
Comment 10 Eclipse Webmaster CLA 2010-11-23 13:54:36 EST
(In reply to comment #9)
> Is this something that can be done in 3.6.2 (and later) builds?

Can you be more specific about what you'd like to do?

-M.
Comment 11 Sam Wong CLA 2010-11-23 14:00:55 EST
(In reply to comment #10)
> (In reply to comment #9)
> > Is this something that can be done in 3.6.2 (and later) builds?
> 
> Can you be more specific about what you'd like to do?
> 
> -M.

The desired behaviour is for the eclipse.exe to have an embedded manifest to trigger the UAC prompt on Vista and then when the prompt comes up, it be properly signed.
Comment 12 John Arthorne CLA 2010-11-23 14:34:06 EST
This bug is about adding infrastructure for signing executables at the foundation. From Matt's comment #8 it sounds like this is completed. The only thing remaining is for a project that has executables to try this out and report if there are any problems with it.

One such project of course is the Platform, which produces eclipse.exe. Bug 319419 covers the task up adding signing support in the Eclipse Platform build to sign eclipse.exe.
Comment 13 Denis Roy CLA 2012-11-08 16:32:12 EST
I believe Thanh has been working on this.  Stay tuned.
Comment 14 Denis Roy CLA 2013-03-22 11:16:19 EDT
(In reply to comment #13)
> I believe Thanh has been working on this.  Stay tuned.

I think we really, really need to be signing the Windows .exe files for the next release.

Thanh, what do you need to make this happen?
Comment 15 Thanh Ha CLA 2013-03-23 10:15:21 EDT
(In reply to comment #14)
> (In reply to comment #13)
> > I believe Thanh has been working on this.  Stay tuned.
> 
> I think we really, really need to be signing the Windows .exe files for the
> next release.
> 
> Thanh, what do you need to make this happen?

The scripts exists, we just need to set this up on a server somewhere. It works similar to the jarsigner service that exists today.

The script also needs a copy of the ssl cert in Microsoft's format. We can discuss this after EclipseCon.
Comment 16 Denis Roy CLA 2013-04-11 16:41:16 EDT
> The script also needs a copy of the ssl cert in Microsoft's format. We can
> discuss this after EclipseCon.

The Mac and Windows scripts have been added to the web-based signing service, and I've updated the docs:

http://wiki.eclipse.org/IT_Infrastructure_Doc#Web_service_.28Instant.29

Matt, when you get a moment, can you transform our code signing cert into the format that MS wants so we can close this one?
Comment 17 Thanh Ha CLA 2013-04-17 16:26:39 EDT
The signing service is now available and instructions on how to use it can be found on the wiki: 

    http://wiki.eclipse.org/IT_Infrastructure_Doc#Web_service_.28Instant.29