summaryrefslogtreecommitdiff
path: root/ms
Commit message (Collapse)AuthorAgeFilesLines
* Unify all assembler file generatorsRichard Levitte2019-09-163-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They now generally conform to the following argument sequence: script.pl "$(PERLASM_SCHEME)" [ C preprocessor arguments ... ] \ $(PROCESSOR) <output file> However, in the spirit of being able to use these scripts manually, they also allow for no argument, or for only the flavour, or for only the output file. This is done by only using the last argument as output file if it's a file (it has an extension), and only using the first argument as flavour if it isn't a file (it doesn't have an extension). While we're at it, we make all $xlate calls the same, i.e. the $output argument is always quoted, and we always die on error when trying to start $xlate. There's a perl lesson in this, regarding operator priority... This will always succeed, even when it fails: open FOO, "something" || die "ERR: $!"; The reason is that '||' has higher priority than list operators (a function is essentially a list operator and gobbles up everything following it that isn't lower priority), and since a non-empty string is always true, so that ends up being exactly the same as: open FOO, "something"; This, however, will fail if "something" can't be opened: open FOO, "something" or die "ERR: $!"; The reason is that 'or' has lower priority that list operators, i.e. it's performed after the 'open' call. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
* Windows: Call TerminateProcess, not ExitProcessRichard Levitte2019-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ty Baen-Price explains: > Problem and Resolution: > The following lines of code make use of the Microsoft API ExitProcess: > > ``` > Apps\Speed.c line 335: ExitProcess(ret); > Ms\uplink.c line 22: ExitProcess(1); > ``` > > These function calls are made after fatal errors are detected and > program termination is desired. ExitProcess(), however causes > _orderly_ shutdown of a process and all its threads, i.e. it unloads > all dlls and runs all destructors. See MSDN for details of exactly > what happens > (https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx). > The MSDN page states that ExitProcess should never be called unless > it is _known to be safe_ to call it. These calls should simply be > replaced with calls to TerminateProcess(), which is what should be > called for _disorderly_ shutdown. > > An example of usage: > > ``` > TerminateProcess(GetCurrentProcess(), exitcode); > ``` > > Effect of Problem: > Because of a compilation error (wrong c++ runtime), my program > executed the uplink.c ExitProcess() call. This caused the single > OpenSSL thread to start executing the destructors of all my dlls, > and their objects. Unfortunately, about 30 other threads were > happily using those objects at that time, eventually causing a > 0xC0000005 ACCESS_VIOLATION. Obviously an ACCESS_VIOLATION is the > best case scenario, as I'm sure you can imagine at the consequences > of undiscovered memory corruption, even in a terminating process. And on the subject of `TerminateProcess()` being asynchronous: > That is technically true, but I think it's probably synchronous > "enough" for your purposes, since a call to TerminateProcess > suspends execution of all threads in the target process. This means > it's really only asynchronous if you're calling TerminateProcess one > some _other_ process. If you're calling TerminateProcess on your own > process, you'll never return from the TerminateProcess call. Fixes #2489 Was originally RT-4526 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8301)
* Following the license change, modify the boilerplates in ms/Richard Levitte2018-12-068-8/+8
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7769)
* Update copyright yearMatt Caswell2018-05-011-1/+1
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6145)
* ms/uplink-x86.pl: close the file handle that was openedRichard Levitte2018-04-251-1/+1
| | | | | | | Fixes #5656 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6079)
* Remove unused num.pl,segregnam scriptsRich Salz2018-02-221-71/+0
| | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5433)
* Many spelling fixes/typo's corrected.Josh Soref2017-11-111-1/+1
| | | | | | | | | Around 138 distinct errors found and fixed; thanks! Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3459)
* Remove an unused fileMatt Caswell2017-10-111-136/+0
| | | | | Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4468)
* Remove filename argument to x86 asm_init.David Benjamin2017-05-111-1/+1
| | | | | | | | | | | | | | | The assembler already knows the actual path to the generated file and, in other perlasm architectures, is left to manage debug symbols itself. Notably, in OpenSSL 1.1.x's new build system, which allows a separate build directory, converting .pl to .s as the scripts currently do result in the wrong paths. This also avoids inconsistencies from some of the files using $0 and some passing in the filename. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3431)
* Revert "RT4526: Call TerminateProcess, not ExitProcess"Matt Caswell2016-06-161-1/+1
| | | | | | | | | | This reverts commit 9c1a9ccf65d0ea1912675d3a622fa8e51b524b9e. TerminateProcess is asynchronous, so the code as written in the above commit is not correct. It is also probably not needed in the speed case. Reverting in order to figure out the correct solution. Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT4526: Call TerminateProcess, not ExitProcessRich Salz2016-06-151-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add final(?) set of copyrights.Rich Salz2016-06-013-0/+27
| | | | | | | | | Add copyright to missing assembler files. Add copyrights to missing test/* files. Add copyrights Various source and misc files. Reviewed-by: Richard Levitte <levitte@openssl.org>
* x86_64 assembly pack: tolerate spaces in source directory name.Andy Polyakov2016-05-291-1/+1
| | | | | | [as it is now quoting $output is not required, but done just in case] Reviewed-by: Richard Levitte <levitte@openssl.org>
* Copyright consolidation: perl filesRich Salz2016-04-206-6/+42
| | | | | | | | | Add copyright to most .pl files This does NOT cover any .pl file that has other copyright in it. Most of those are Andy's but some are public domain. Fix typo's in some existing files. Reviewed-by: Richard Levitte <levitte@openssl.org>
* set exec attribute for .pl filesViktor Szakats2016-04-042-0/+0
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* fix perl shebangViktor Szakats2016-04-041-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* use whitespace more consistentlyViktor Szakats2016-04-042-49/+49
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Windows build system: fix 32-bit appveyor build.Andy Polyakov2016-03-291-0/+28
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Revert part of applink/Borland commitRich Salz2016-03-241-1/+10
| | | | | | | This allows developer to glue DLL built with VC into their application compiled with Borland C. Reviewed-by: Andy Polyakov <appro@openssl.org>
* More Borland removal.Rich Salz2016-03-241-9/+0
| | | | | | And thanks to Miod Vallat for the nudge about ERR_PACK :) Reviewed-by: Richard Levitte <levitte@openssl.org>
* Windows build system: get uplink right.Andy Polyakov2016-03-213-29/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove mk1mf documentationRichard Levitte2016-03-211-13/+0
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* Remove the mk1mf VC-WIN* builds and its supporting scriptsRichard Levitte2016-03-215-128/+0
| | | | | | | The mk1mf build for the VC-WIN* targets is broken and the unified scheme works well enough, so we clean out the old. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Remove more unused things.Rich Salz2016-03-181-57/+0
| | | | | | Moved doc/standards.txt to the web. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove support for Borland C++Richard Levitte2016-03-172-7/+0
| | | | | | | Borland C++ 4.5 is very old and our "support" for it is already non-existent, we might as well remove it. Reviewed-by: Rich Salz <rsalz@openssl.org>
* remove ms/.rnd and add it to .gitignoreViktor Szakats2016-03-091-0/+0
| | | | | Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Unified - adapt the generation of cpuid, uplink and buildinf to use GENERATERichard Levitte2016-03-091-0/+5
| | | | | | | | | This gets rid of the BEGINRAW..ENDRAW sections in crypto/build.info. This also moves the assembler generating perl scripts to take the output file name as last command line argument, where necessary. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Remove some old ms/* filesRich Salz2016-03-0825-1037/+0
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Change names of ordinals and libs, libeay => libcrypto and ssleay => libsslRichard Levitte2016-03-058-18/+18
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* ms/uplink-x86.pl: make it work.Andy Polyakov2016-02-101-2/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix various windows compilation issuesMatt Caswell2015-01-282-8/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-223-268/+309
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* indent has problems with comments that are on the right hand side of a line.Matt Caswell2015-01-221-3/+6
| | | | | | | Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Reviewed-by: Tim Hudson <tjh@openssl.org>
* mark all block comments that need format preserving so thatTim Hudson2014-12-301-1/+1
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove SSLv2 supportKurt Roeckx2014-12-042-64/+0
| | | | | | The only support for SSLv2 left is receiving a SSLv2 compatible client hello. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove all .cvsignore filesRich Salz2014-11-281-5/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* ms/do_win64a.bat: forward to NUL, not NUL:.Andy Polyakov2014-02-241-1/+1
| | | | | | | Allegedly formwarding to NUL: sometimes creates NUL file in file system. PR: 3250
* x86_64 assembly pack: make Windows build more robust.Andy Polyakov2013-01-221-1/+2
| | | | PR: 2963 and a number of others
* x86_64 assembly pack: make it possible to compile with Perl located onAndy Polyakov2012-06-271-1/+1
| | | | | | path with spaces. PR: 2835
* ms/uplink.c: fix Visual Studio 2010 warning.Andy Polyakov2011-07-131-1/+2
|
* If make clean fails it is not a fatal error.Dr. Stephen Henson2011-07-031-1/+0
|
* Additional error checking.Dr. Stephen Henson2011-07-021-0/+2
|
* Delete any EXARG value first.Dr. Stephen Henson2011-07-011-0/+1
|
* Add no-asm argument to Configure if needed.Dr. Stephen Henson2011-07-011-1/+2
|
* Option "fipscheck" which checks to see if FIPS is autodetected inDr. Stephen Henson2011-06-161-1/+1
| | | | a build. Use this for WIN32 builds.
* Update to mk1mf.pl and ms\do_fips.bat to install relevant files forDr. Stephen Henson2011-06-151-0/+1
| | | | WIN32 FIPS builds.
* Fixes for WIN64 FIPS build.Dr. Stephen Henson2011-05-061-10/+1
|
* Fix do_fips script.Dr. Stephen Henson2011-05-021-5/+5
|
* Initial do_fips.bat build script for WIN32 fipscanister.Dr. Stephen Henson2011-04-211-0/+87
|
* Add Windows FIPS build utilities.Dr. Stephen Henson2011-02-031-0/+65
|