fixes related to MSP digital signature

Change-Id: I06bcf0d2cc8c4915eff3658905087be6a2eadca6
This commit is contained in:
Andras Timar 2014-01-12 11:04:41 -08:00
parent 4f4bd6c852
commit 557cfd3bb1
2 changed files with 4 additions and 2 deletions

View file

@ -1651,7 +1651,7 @@ sub run {
if ( $allvariableshashref->{'OOODOWNLOADNAME'} ) { $$downloadname = installer::download::set_download_filename($languagestringref, $allvariableshashref); }
else { $$downloadname = installer::download::resolve_variables_in_downloadname($allvariableshashref, $$downloadname, $languagestringref); }
installer::systemactions::rename_one_file( $finalinstalldir . $installer::globals::separator . $installer::globals::shortmsidatabasename, $finalinstalldir . $installer::globals::separator . $$downloadname . ".msi" );
if ( defined($ENV{'WINDOWS_BUILD_SIGNING'}) && ($ENV{'WINDOWS_BUILD_SIGNING'} eq 'TRUE') )
if ( defined($ENV{'WINDOWS_BUILD_SIGNING'}) && ($ENV{'WINDOWS_BUILD_SIGNING'} eq 'TRUE') && ( $allvariableshashref->{'CREATE_MSP_INSTALLSET'} eq '0'))
{
my $systemcall = "signtool.exe sign ";
if ( defined($ENV{'PFXFILE'}) ) { $systemcall .= "-f $ENV{'PFXFILE'} "; }

View file

@ -1194,12 +1194,14 @@ sub create_msp_patch
# Sign .msp file
if ( defined($ENV{'WINDOWS_BUILD_SIGNING'}) && ($ENV{'WINDOWS_BUILD_SIGNING'} eq 'TRUE') )
{
my $localmspfilename = $mspfilename;
$localmspfilename =~ s/\\/\\\\/g;
my $systemcall = "signtool.exe sign ";
if ( defined($ENV{'PFXFILE'}) ) { $systemcall .= "-f $ENV{'PFXFILE'} "; }
if ( defined($ENV{'PFXPASSWORD'}) ) { $systemcall .= "-p $ENV{'PFXPASSWORD'} "; }
if ( defined($ENV{'TIMESTAMPURL'}) ) { $systemcall .= "-t $ENV{'TIMESTAMPURL'} "; } else { $systemcall .= "-t http://timestamp.globalsign.com/scripts/timestamp.dll "; }
$systemcall .= "-d \"" . $allvariables->{'PRODUCTNAME'} . " " . $allvariables->{'PRODUCTVERSION'} . " Patch " . $allvariables->{'WINDOWSPATCHLEVEL'} . "\" ";
$systemcall .= $mspfilename;
$systemcall .= $localmspfilename;
installer::logger::print_message( "... code signing and timestamping with signtool.exe ...\n" );
my $returnvalue = system($systemcall);