833 Commits

Author SHA1 Message Date
Brian Smith
3685ef6d97 Improve Visual Studio 2015 Compatibility.
* Silence some warnings about things that MSVC 2015 warns about that
  MSVC 2013 didn't.

* Change the solution so that it opens in Visual Studio 2015 if Visual
  Studio 2015 is installed.

* Change ToolsVersion to 14.0 in the project files so that Visual
  Studio 2015 does not put a warning in the build log about the version
  being 12.0. This means that Visual Studio 2013 will have a warning,
  but the warning is harmless, and if we have to choose, it's better
  for VS 2013 to warn than VS 2015 to warn, in the long term. See
  https://github.com/Microsoft/msbuild/issues/52#issuecomment-88674094.

* Build with the VS 2013 XP-compatible toolchain if using Visual Studio
  2013 (including its msbuild); Otherwise build with the Visual Studio
  2015 XP-compatible toolchain. See
  https://social.msdn.microsoft.com/Forums/vstudio/en-US/ \
    d06c3741-c637-4627-9b1a-1e068803a067/ \
    setting-platformtoolset-value-based-on-vs-version.
2015-08-26 21:18:21 -07:00
Brian Smith
fd669003ff Remove BER support. 2015-08-26 21:18:20 -07:00
Brian Smith
72e2935ff2 Create a 1-to-1 mapping of perlasm scripts to outputs.
Previously, sha-x86_64.pl (was sha512-x86_64.pl) was used to generate
both sha256-x86_64.S and sha512-x86_64.S. This required special build
logic in ring.mk and also would have required special logic in the
msbuild project files. This commit adds dedicated perlasm source files
for both, and there's now a 1-to-1 correspondence between perlasm
scripts and output files, which avoids any need for special-case logic
in the build system.

The same goes for sha-armv8.pl (was sha512-armv8.pl).
2015-08-26 21:18:20 -07:00
Brian Smith
1dd9cd171c Rename sha512-{x86_64,armv8}.pl to sha-{x86_64,armv8}.pl.
This commit prepares for the addition of dedicated
sha256-{x86_64,armv8}.pl and sha512-{x86_64,armv8}.pl scripts, in order
to create a 1-to-1 mapping of source .pl scripts to generated
.S assembly language files. This is a separate commit so that git tools
recognize the renames correctly.
2015-08-26 21:18:19 -07:00
Brian Smith
e78f56048f Add Visual Studio solution, OPENSSL_NO_ASM only for now.
Much of the repetitive logic was put into mk/Common.props,
mk/Windows.props, and mk/WindowsTest.props. There is still a lot of
repetitive logic in the test project files that should be moved to
WindowsTest.props in the future. (In fact, it would be better if the
build system were modified in the future to work like CMake does,
(re-)generating the necessary project files during the build.)

Regular (OPENSSL_NO_ASM) mode will come in a later commit.

I've marked the Visual Studio files as eol=crlf in .gitattributes for
now. This should be the least painful option, since it any CRLF
conversion would create problems for for people sharing a source tree
across platforms (e.g. a shared folder in a VM), and because Visual
Studio IDE resets the files back to CR/LF line endings whenever a
change to project or solution settings is made using its GUI. There is
no license comment in these files because Visual Studio strips comments
when changes are made using the GUI.
2015-08-26 21:18:19 -07:00
Brian Smith
6198948e2f Remove directory traversal code. 2015-08-26 21:18:18 -07:00
Brian Smith
13baebc3b5 Replace CMake with GNU Make and add Travis CI integration.
Travis CI doesn't have a new enough version of CMake readily available,
and I've been wanting to replace the CMake-based build system for other
reasons. This kills the Windows support, but I'm intending to add a
native msbuild build system for Windows soon. Also, this builds in
OPENSSL_NO_ASM mode for now.
2015-08-26 21:18:16 -07:00
Brian Smith
d752711a4e Remove ERR_error_string.
ERR_error_string writes to a shared static buffer, which is obviously
bad. BoringSSL had already deprecated it.
2015-08-26 21:18:16 -07:00
Brian Smith
765426d805 Neuter error string functions so that Go isn't need to build. 2015-08-26 21:18:16 -07:00
Brian Smith
0fad1235ec Remove "cipher.h" from public API.
See David Benjamin's comment at:
https://boringssl-review.googlesource.com/#/c/3990
2015-08-26 21:18:15 -07:00
Brian Smith
47e7edc7db Remove lhash. 2015-08-26 21:18:14 -07:00
Brian Smith
0cc126a203 Remove crypto/stack. 2015-08-26 21:18:13 -07:00
Brian Smith
20e9295b25 Remove EVP_BytesToKey. 2015-08-26 21:18:13 -07:00
Brian Smith
0c382830cd Remove BN_mod_exp2_mont. 2015-08-26 21:18:12 -07:00
Brian Smith
96129ba23a Remove BN_primality_test. 2015-08-26 21:18:12 -07:00
Brian Smith
58df6d8306 Remove BN_mod_lshift1. 2015-08-26 21:18:11 -07:00
Brian Smith
517df569bb Remove BN_mod_lshift. 2015-08-26 21:18:11 -07:00
Brian Smith
b8b0c25527 Remove BN_mask_bits. 2015-08-26 21:18:10 -07:00
Brian Smith
a98e7c9f2c Remove BN_sqrt. 2015-08-26 21:18:10 -07:00
Brian Smith
3cabd5062c Remove RSA_recover_crt_params. 2015-08-26 21:18:10 -07:00
Brian Smith
225d1d1044 Remove AES-192. 2015-08-26 21:18:09 -07:00
Brian Smith
c0ba4f8bcd Remove ECB mode. 2015-08-26 21:18:08 -07:00
Brian Smith
49c0edec78 Remove CFB mode. 2015-08-26 21:18:08 -07:00
Brian Smith
c08a0374cd Remove OFB mode. 2015-08-26 21:18:07 -07:00
Brian Smith
ddde8768c1 Remove RC4 assembly language optimizations. 2015-08-26 21:18:07 -07:00
Brian Smith
00168a0987 Revert "Add SSL_get_rc4_state."
This reverts commit 3f92d21094ebb0ee36851d0f85764fefa52491f3.
2015-08-26 21:18:06 -07:00
Brian Smith
10b2d53f54 Remove RC2. 2015-08-26 21:18:05 -07:00
Brian Smith
6e18a5a5b3 Remove crypto/bio. 2015-08-26 21:18:05 -07:00
Brian Smith
8060ec65f4 Remove crypto/bio dependency from crypto/bn.
BN_print was only ever used to print to a file BIO. Now it is never
used.
2015-08-26 21:18:04 -07:00
Brian Smith
e44dd0a275 Remove crypto/obj; minimize and reorganize obj_mac.h.
Eliminate the unnecessary parts of obj_mac.h and put the remainder into
logical order. Remove all the crypto/obj stuff, which was used
primarily by the already-removed crypto/asn1.
2015-08-26 21:18:04 -07:00
Brian Smith
e180d7b0a8 Remove base64. 2015-08-26 21:18:03 -07:00
Brian Smith
c1dfae71ff Remove engine. 2015-08-26 21:18:02 -07:00
Brian Smith
297081aebc Revert "Multi-prime RSA support."
This reverts commit 839b881c612c698d7331191beac7d565649f5351, but it
isn't a clean revert.
2015-08-26 21:05:48 -07:00
Brian Smith
db0d3aabc8 Remove crypto/ex_data. 2015-08-26 21:05:48 -07:00
Brian Smith
a874ababb6 Remove time_support. 2015-08-26 21:05:47 -07:00
Brian Smith
c206156e5c Remove crypto/conf. 2015-08-26 21:05:47 -07:00
Brian Smith
7d3552e2a7 Remove PEM, PKCS#8, PKCS#12, X.509, and ASN.1.
Unfortunately these are all too tangled together to remove them
piece-by-piece without creating hard-to-review intermediate changes,
so this commit removes them all at once.
2015-08-26 21:05:44 -07:00
Brian Smith
ba9db7bc33 Remove PKCS#12 and most of crypto/x509.
The remaining parts of crypto/x509 are needed for PKCS#8 support.
2015-08-26 20:56:52 -07:00
Brian Smith
da6777f7bb Remove dependency on one-shot HMAC() function from HKDF.
This will allow HMAC() to be removed.
2015-08-26 20:56:52 -07:00
Brian Smith
9cbe03146c Remove RSA-1024 assembly language optimizations.
RSA 1024 is mostly irrelevant now, and these optimizations don't help
performance at larger key sizes, so it isn't worth keeping this extra
code around.

Some of the most relevant `bssl speed` results are below.

Before (VS2013 x86):
   750 RSA 2048 signing operations [...] (  190.5 ops/sec)
 19250 RSA 2048 verify operations  [...] ( 6348.9 ops/sec)
    76 RSA 4096 signing operations [...] (   24.7 ops/sec)
  5000 RSA 4096 verify operations  [...] ( 1641.0 ops/sec)

After (VS2013 x86):
   750 RSA 2048 signing operations [...] (  196.7 ops/sec)
 20000 RSA 2048 verify operations  [...] ( 6563.8 ops/sec)
    78 RSA 4096 signing operations [...] (   25.7 ops/sec)
  5250 RSA 4096 verify operations  [...] ( 1714.0 ops/sec)

Before (VS2013 x64):
  3750 RSA 2048 signing operations [...] ( 1193.9 ops/sec)
112000 RSA 2048 verify operations  [...] (37135.3 ops/sec)
   500 RSA 4096 signing operations [...] (  164.1 ops/sec)
 31500 RSA 4096 verify operations  [...] (10392.6 ops/sec)

After (VS2013 x64):
  3750 RSA 2048 signing operations [...] ( 1224.7 ops/sec)
112250 RSA 2048 verify operations  [...] (37218.2 ops/sec)
   750 RSA 4096 signing operations [...] (  167.8 ops/sec)
 31500 RSA 4096 verify operations  [...] (10392.6 ops/sec)
2015-08-26 20:56:51 -07:00
Brian Smith
41d9a0ac92 Remove libssl.
libssl depends on crypto/x509 and other things that are being removed.
2015-08-26 20:56:51 -07:00
Brian Smith
12daf7e548 Remove crypto/dsa. 2015-08-26 20:56:50 -07:00
Brian Smith
a980de709b Rework weird loop in bn/generic.c to avoid unreachable code warning.
When building in OPENSSL_NO_ASM mode, MSVC complains about unreachable
code. The redundant initialization of |i| is the main problem, but the
the skipping of the first test of the condition |i < num| was also
confusing, so this commit changes the for loop to a do...while loop.
2015-08-26 20:56:49 -07:00
Brian Smith
956baf7d97 Revert "Do-nothing fns |OpenSSL_add_all_ciphers| and |OpenSSL_add_all_digests|."
This reverts commit 444dce49345a69aa344c5720e9d5da824cbb0eba.
2015-08-26 20:56:48 -07:00
Brian Smith
becfeadc79 Revert "Add |EVP_get_digestbyname|."
This reverts commit 9f8ef2da922271683abcefa8d6a0acd76e2e57d0.
2015-08-26 20:56:47 -07:00
Brian Smith
a8281108c7 Revert "Restore |ERR_print_errors()|."
This reverts commit 4cd4edfc3479e77f4795124e46ef312e70b8439b.
2015-08-26 20:56:25 -07:00
Brian Smith
1c3d95dc70 Revert "Restore |X509_REQ_print| and friends, from OpenSSL at ce7e647b."
This partially reverts commit c0fe12cdf7d621eaf3b7d024ec12cb6f63196bcc.
The typedefs and error data were not reverted.
2015-08-26 20:56:25 -07:00
Brian Smith
de15576d47 Revert "Restore |DES_ede3_cfb_encrypt| and |DES_ede3_cfb64_encrypt| from OpenSSL at ce7e647b."
This reverts commit 50365f25ba2fbcb40e7d6139cc0fb4df2781c8ba.
2015-08-26 20:56:24 -07:00
Brian Smith
e2391451d6 Revert "Add |DES_set_key_unchecked| as an alias for |DES_set_key|."
This reverts commit 2f252fed10e14ecd8b926aadf9a2f6075c5db1c0.
2015-08-26 20:56:24 -07:00
Brian Smith
817b8aaecb Revert "Add |EVP_rc2_cbc| and implement |EVP_CTRL_SET_RC2_KEY_BITS|."
This reverts commit f92930e30a19643c124f3da40301db3452604311.
2015-08-26 20:56:08 -07:00