From d8356e1b0f3635f6bd71814272c1d067fc9381bb Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 23 Jul 2018 13:25:45 +0200 Subject: [PATCH] Make sure the 'tsget' script is called 'tsget.pl' everywhere The result is that we don't have to produce different names on different platforms, and we won't have confusion on Windows depending on if the script was built with mingw or with MSVC. Partial fix for #3254 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6764) --- CHANGES | 6 ++++++ Configurations/unix-Makefile.tmpl | 21 +++++++++++++++++---- apps/build.info | 7 +++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index ae59f92259..3cf312a98f 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,12 @@ Changes between 1.1.0h and 1.1.1 [xx XXX xxxx] + *) The 'tsget' script is renamed to 'tsget.pl', to avoid confusion when + moving between systems, and to avoid confusion when a Windows build is + done with mingw vs with MSVC. For POSIX installs, there's still a + symlink or copy named 'tsget' to avoid that confusion as well. + [Richard Levitte] + *) Revert blinding in ECDSA sign and instead make problematic addition length-invariant. Switch even to fixed-length Montgomery multiplication. [Andy Polyakov] diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 2423ad2834..c4927409a5 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -121,7 +121,7 @@ INSTALL_ENGINES={- join(" ", map { dso($_) } @{$unified_info{install}->{engines} INSTALL_PROGRAMS={- join(" ", map { $_.$exeext } @{$unified_info{install}->{programs}}) -} {- output_off() if $disabled{apps}; "" -} BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash -MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget +MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget.pl:tsget {- output_on() if $disabled{apps}; "" -} APPS_OPENSSL={- use File::Spec::Functions; @@ -452,12 +452,25 @@ install_ssldirs: @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/misc @set -e; for x in dummy $(MISC_SCRIPTS); do \ if [ "$$x" = "dummy" ]; then continue; fi; \ - fn=`basename $$x`; \ - $(ECHO) "install $$x -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \ - cp $$x $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \ + x1=`echo "$$x" | cut -f1 -d:`; \ + x2=`echo "$$x" | cut -f2 -d:`; \ + fn=`basename $$x1`; \ + $(ECHO) "install $$x1 -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \ + cp $$x1 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \ chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \ mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new \ $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \ + if [ "$$x1" != "$$x2" ]; then \ + ln=`basename "$$x2"`; \ + : {- output_off() unless windowsdll(); "" -}; \ + $(ECHO) "copy $(DESTDIR)$(OPENSSLDIR)/misc/$$ln -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \ + cp $(DESTDIR)$(OPENSSLDIR)/misc/$$fn $(DESTDIR)$(OPENSSLDIR)/misc/$$ln; \ + : {- output_on() unless windowsdll(); + output_off() if windowsdll(); "" -}; \ + $(ECHO) "link $(DESTDIR)$(OPENSSLDIR)/misc/$$ln -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \ + ln -sf $$fn $(DESTDIR)$(OPENSSLDIR)/misc/$$ln; \ + : {- output_on() if windowsdll(); "" -}; \ + fi; \ done @$(ECHO) "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.dist" @cp $(SRCDIR)/apps/openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new diff --git a/apps/build.info b/apps/build.info index 4a11a18fbe..751d8da828 100644 --- a/apps/build.info +++ b/apps/build.info @@ -1,5 +1,4 @@ -{- our $tsget_name = $config{target} =~ /^(VC|vms)-/ ? "tsget.pl" : "tsget"; - our @apps_openssl_src = +{- our @apps_openssl_src = qw(openssl.c asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c @@ -33,7 +32,7 @@ ENDIF GENERATE[progs.h]=progs.pl $(APPS_OPENSSL) DEPEND[progs.h]=../configdata.pm - SCRIPTS=CA.pl {- $tsget_name -} + SCRIPTS=CA.pl tsget.pl SOURCE[CA.pl]=CA.pl.in - SOURCE[{- $tsget_name -}]=tsget.in + SOURCE[tsget.pl]=tsget.in ENDIF -- 2.25.1