405 Commits
Author SHA1 Message Date
David Benjamin 7458ded264 Fix run_android_tests.go with shared library builds.
In particular, the FIPS builds use shared libraries.

Change-Id: I4ca3a289ad3af8ab24c4bf1aecd5de67f9496f15
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/38147
Commit-Queue: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-10-11 21:16:38 +00:00
David Benjamin 86ee70b6ff No-op change to test new builders.
Change-Id: I3f715b35968168e4e80fb643e28d4169797c0898
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/38146
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2019-10-11 18:44:38 +00:00
Adam Langley 4ca15d5dcb Make FIPS build work for Android cross-compile.
Change-Id: I67db234ad80fa1eb4af4e28ac7b5236dd6ec4b63
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/38065
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-10-09 20:16:11 +00:00
Adam Langley 1458b49a9e Switch to using SHA-256 for FIPS integrity check on Android.
SHA-256 is likely to be faster on these devices given that a) some will
be 32-bit and b) some will have SHA-256 instructions.

BUG=141710485

Change-Id: I3a3fbb2b8db4f1a4d3059b39b188aee0e0462dd4
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37845
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-09-30 21:51:37 +00:00
David Benjamin a7d9ac2af4 Trigger a build on the ARM mode builder.
Checking that it works right.

Change-Id: If27b127bc3d78dc96d6636ba5b4b3c0316366939
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37527
Reviewed-by: David Benjamin <davidben@google.com>
2019-09-16 21:31:16 +00:00
David Benjamin 68489e6da5 Update build tools.
Change-Id: Ifce1fc2802e3d3badb3f08ae65c2bbf3c9434d07
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37464
Reviewed-by: Adam Langley <agl@google.com>
2019-09-13 22:51:54 +00:00
Gurleen Grewal 9747a53284 acvp: allow passing custom subprocess I/O.
Change-Id: Ic87cdc84b7684c344af7aa2ef8673264d402c492
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37164
Reviewed-by: Adam Langley <alangley@gmail.com>
2019-08-21 22:13:42 +00:00
Pete Bentley 44544d9d2d Introduce libcrypto_bcm_sources for Android.
Splits Android sources into two groups allowing different
compilation rules.

Also make output conform to Android blueprint style guide by
remove the final blank line.

AOSP change: http://r.android.com/c/platform/external/boringssl/+/1103191

Test: Built using AOSP change above.
Change-Id: I45ce32c75a524757fe87654b8c77a2195b365c84
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37084
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2019-08-16 19:28:40 +00:00
David Benjamin eca48e52ed Add an android-cmake option to generate_build_files.py
The Android emulator uses a custom CMake-based build. It's a little
goofy to generate a CMake file list when our standalone build is already
CMake, but our standalone build doesn't use pregenerated files.

(Long-term, I hope we can unify the file lists under sources.cmake and,
to help out Mundane, allow the standalone build to optionally consume
pregenerated files. But for now just making yet another build output is
simplest.)

Bug: b/139120013
Change-Id: Id5b8b4ed83bc21d261663cb8defe9e19b64c639b
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37065
Commit-Queue: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-08-13 18:12:58 +00:00
Adam Langley f5270004a2 Fix paths in break-tests.sh.
60cc4d4b moved several things into a cavp directory so that we didn't
have two directories called fipstools. This script needs to be updated
accordingly.

Change-Id: I91c5b529e16430422447fee024831f1f311f01b5
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36984
Reviewed-by: David Benjamin <davidben@google.com>
2019-08-08 21:12:13 +00:00
Adam Langley 974f4dddfb acvp: add support for AES-ECB and AES-CBC.
Change-Id: I685701304576a519e68a13d22bd557fdbf5a84fb
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36884
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-08-02 17:13:47 +00:00
Adam Langley b7f0c1b4d3 Add initial draft of ACVP tool.
ACVP will be the replacement for CAVP. CAVP is the FIPS 140 test-vector
program. This commit contains some very rough support for ACVP.
Currently it only supports hash functions and it's not hard to hit
corner cases, but it's enough of a framework to work from.

Change-Id: Ifcde18ac560710e252220282acd66d08e7507262
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36644
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-07-16 23:47:44 +00:00
Adam Langley 09050cb498 Add SipHash-2-4.
The added code is a one-shot function. A handful of instructions could
be saved by having a context object for repeated use of the same key,
but perhaps it's not needed.

Selected the 2-4 variant to implement because it seems to be
overwhelmingly the most commonly used.

Change-Id: I1e4f699f7dd5a2d35e12245fa116bafbd3439979
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36664
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-07-10 21:14:32 +00:00
Yun Liu 365b7a0fcb Remove android_tools checkout
Remove it when recipe change https://chromium-review.googlesource.com/c/chromium/tools/build/+/1685789
checked in and works as expected.

Bug: chromium:428426
Change-Id: I649ba7f4bd003101c71d07faad2a0d1e957cb97e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36626
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2019-07-09 14:38:19 +00:00
Adam Langley 0086bd65c4 Support key wrap with padding in CAVP.
Change-Id: I27a282ee2b11083a1137990b00a9d599dd1f48df
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36625
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2019-07-08 23:16:09 +00:00
Yun Liu 3f98fde5ad Add android_sdk checkout
Bug: chromium:428426
Change-Id: I12c2969fe8b37a604b14300433f3e3f09aeb24e6
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36584
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2019-07-08 21:35:59 +00:00
Adam Langley 60cc4d4b4e Move fipstools/ to util/fipstools/cavp
We have two “fipstools” directories, which is silly. Unify them into one
by moving CAVP stuff into a subdirectory of util/fipstools.

Change-Id: Ibeaa2205c58699f3d042445bfa6a6576a762da6f
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36624
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-07-08 18:45:34 +00:00
Adam Langley 8f574c37da Add AES-KWP
KWP is Key Wrap with Padding, defined in RFC 5649 and SP 800-38F. Like
Key Wrap, it's a poor-man's AEAD and shouldn't be used. However, some
existing systems use it and we need to interoperate.

The interface of the added functions is a little unfortunate, but they
match the interfaces of the existing Key Wrap functions which, in turn,
match functions in OpenSSL. Hopefully this way, if OpenSSL ever add
support, we'll line up.

Change-Id: I3496c288f32230a891261586ca2e9c4ee8456c09
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36324
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-06-13 22:43:59 +00:00
David Benjamin 72791efa1b Update build tools.
Change-Id: I13238f2eac61dff052ce52083c20f717f212c98e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36445
Reviewed-by: Adam Langley <agl@google.com>
2019-06-13 16:11:26 +00:00
Adam Langley 567e463cec Fix various typos.
(Automated tooling flagged these.)

Change-Id: I1c0993efb85111bd4a4f1ea51dfe01a6cdd3edd3
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36344
Reviewed-by: David Benjamin <davidben@google.com>
2019-06-05 18:24:12 +00:00
Adam Langley d72e47fddb Add FIPS shared mode.
This change adds a FIPS integrity check using shared libraries. Unlike
with the static case, a shared build can take advantage of the linker
resolving relocations and thus doesn't need delocation. It does mean
that both .text and .rodata sections need to be handled, however, so the
hashing format is slightly different. inject-hash.go is updated to be
able to rewrite shared libraries to inject the correct hash value.

Change-Id: I9a71910cd6df3a85e4efac896b0913e65b5f875b
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36024
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-05-30 19:03:16 +00:00
Adam Langley 9b896cf148 delocate: add test for .file handling.
This is to test that detection of the “md5” tag is correct (although
Clang itself emits inconsist .file directives at the moment) and that
the added .file directive has the correct file number.

Change-Id: I89b48fe16fe142165fb5653cae45c39960578735
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36204
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-05-29 18:43:42 +00:00
Adam Langley 09400e197e delocate: translate uleb128 and sleb128 directives
These directives contain labels that need to be mapped by delocate. This
starts to bite with DWARF5. Also, auto-detect whether the compiler is
emitting file directives with MD5 checksums and match that for the dummy
entry.

Change-Id: Ia6f3803287354bc77042a5629cf7e94ceb11b9f9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36184
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2019-05-28 22:12:47 +00:00
Adam Langley e0c533aa23 Update generate_build_files.py for SIKE.
Change-Id: Ifb0e83288a0923704b102d70353a3b3a51e5830b
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36084
Reviewed-by: Adam Langley <agl@google.com>
2019-05-20 18:16:13 +00:00
David Benjamin f014d609c0 Add an option to skip crypto_test_data.cc in GN too.
Chromium recently landed a presubmit that rejects files above 20MiB.
crypto_test_data.cc no longer fits.

Change-Id: I4236a4b56af743fbaf8f8600ccb0b88b41b925e8
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35944
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-05-08 15:31:18 +00:00
David Benjamin a26d01719b Update other build tools.
Change-Id: If3c8de4b81559acd88e32928ac9884ace294fd1d
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35465
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-04-04 17:42:09 +00:00
David Benjamin 98348562f0 Update SDE to 8.35.0-2019-03-11.
The new version has trap flag emulation, which is great for our ABI
tests. This CL doesn't enable it yet, however. The emulation is slightly
off on when traps start and stop, so the ABI tester will need to tweaked
to be more lenient.

Change-Id: I0eb20176dc63eaa1c35f77379b34f7bb6c0b0407
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35464
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-04-04 17:41:28 +00:00
Adam Langley 1d1345377a Support three-argument instructions on x86-64.
Change-Id: I81c855cd4805d4a5016999669a0cb5261838f23a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35224
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-03-11 21:41:40 +00:00
Robert Sloan ae1e08709f Also include abi_test.cc in ssl_test_files.
Change-Id: I1225f1623d4438a2ccaf482eddbe4f460cfaf78c
Reviewed-on: https://boringssl-review.googlesource.com/c/35104
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2019-03-02 04:15:28 +00:00
David Benjamin c3889634a1 Don't pull abi_test.cc into non-GTest targets.
The test_support is kind of a mess right now because it's sometimes used in
GTest targets and sometimes not. It really should be split into two libraries,
but do this for now to unbreak the Android build.

Change-Id: I7cd2b0f6ed9eda1a529ec3c69a92390e20da66f8
Reviewed-on: https://boringssl-review.googlesource.com/c/35084
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2019-03-01 20:24:27 +00:00
David Benjamin c0f4dbe4e2 Move aes_nohw, bsaes, and vpaes prototypes to aes/internal.h.
This is in preparation for adding ABI tests to them.

In doing so, update delocate.go so that OPENSSL_ia32cap_get is consistently
callable outside the module. Right now it's callable both inside and outside
normally, but not in FIPS mode because the function is generated. This is
needed for tests and the module to share headers that touch OPENSSL_ia32cap_P.

Change-Id: Idbc7d694acfb974e0b04adac907dab621e87de62
Reviewed-on: https://boringssl-review.googlesource.com/c/34188
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-01-09 03:35:55 +00:00
David Benjamin 6c597be1c6 Update tools.
Unfortunately, this requires partially reverting
https://boringssl-review.googlesource.com/31324. This is a mess.

While clang proper includes a fuzzer driver, Chromium doesn't use it.
Chromium builds exclusively with fuzzer-no-link and links to its own
copy of the fuzzer runtime[1]. As of [2], Chromium's clang (which we use
on bots) no longer includes the driver, so we must mimic them.

However, Chromium's setup is somewhat questionable because
fuzzer-no-link pulls in libclang_rt.fuzzer_no_main which still includes
most of libclang_rt.fuzzer, just not the one main function[3]. It
appears Chromium is actually linking two copies of
libclang_rt.fuzzer_no_main. Hopefully this mostly works out as Chromium's
clang and libFuzzer should be relatively aligned, but it's not a good
assumption for our build, which can take other Clangs too.

Thus, if you pass -DFUZZ=1 as-is, we will assume you are using a
"normal" Clang with all its relevant runtimes intact. If, however, you
are using Chromium clang, you must drop the matching libFuzzer where the
bots expected it and build with -DLIBFUZZER_FROM_DEPS=1.

This involves no changes to the bots because we never actually unwound
all the LIBFUZZER_FROM_DEPS bits before.

[1] https://cs.chromium.org/chromium/src/testing/libfuzzer/BUILD.gn?rcl=d21c49585f262e851e2984f96f52905782706325&l=14
[2] https://chromium.googlesource.com/chromium/src/+/c79bf2ea4cf65431dccb57cb2a44528c284645a1
[3] https://github.com/llvm-mirror/compiler-rt/blob/8ebc3668b07fc5cca6010265cd4795443f1c1bea/lib/fuzzer/CMakeLists.txt#L93-L107
    https://github.com/llvm-mirror/compiler-rt/blob/8ebc3668b07fc5cca6010265cd4795443f1c1bea/lib/fuzzer/FuzzerMain.cpp

Change-Id: I946b3c821c3d7e6def7e07f1381f58241611ba3d
Reviewed-on: https://boringssl-review.googlesource.com/c/34184
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-01-07 22:39:55 +00:00
David Benjamin 5f85f2a061 Add DEPS rules to checkout Windows SDE.
Change-Id: Ia2398fa822fef1ac79f2062a8401bdd3ec963727
Reviewed-on: https://boringssl-review.googlesource.com/c/34104
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2019-01-04 00:39:28 +00:00
David Benjamin 17d553d299 Add a CFI tester to CHECK_ABI.
This uses the x86 trap flag and libunwind to test CFI works at each
instruction. For now, it just uses the system one out of pkg-config and
disables unwind tests if unavailable. We'll probably want to stick a
copy into //third_party and perhaps try the LLVM one later.

This tester caught two bugs in P-256 CFI annotations already:
I47b5f9798b3bcee1748e537b21c173d312a14b42 and
I9f576d868850312d6c14d1386f8fbfa85021b347

An earlier design used PTRACE_SINGLESTEP with libunwind's remote
unwinding features. ptrace is a mess around stop signals (see group-stop
discussion in ptrace(2)) and this is 10x faster, so I went with it. The
question of which is more future-proof is complex:

- There are two libunwinds with the same API,
  https://www.nongnu.org/libunwind/ and LLVM's. This currently uses the
  system nongnu.org for convenience. In future, LLVM's should be easier
  to bundle (less complex build) and appears to even support Windows,
  but I haven't tested this.  Moreover, setting the trap flag keeps the
  test single-process, which is less complex on Windows. That suggests
  the trap flag design and switching to LLVM later. However...

- Not all architectures have a trap flag settable by userspace. As far
  as I can tell, ARMv8's PSTATE.SS can only be set from the kernel. If
  we stick with nongnu.org libunwind, we can use PTRACE_SINGLESTEP and
  remote unwinding. Or we implement it for LLVM. Another thought is for
  the ptracer to bounce SIGTRAP back into the process, to share the
  local unwinding code.

- ARMv7 has no trap flag at all and PTRACE_SINGLESTEP fails. Debuggers
  single-step by injecting breakpoints instead. However, ARMv8's trap
  flag seems to work in both AArch32 and AArch64 modes, so we may be
  able to condition it on a 64-bit kernel.

Sadly, neither strategy works with Intel SDE. Adding flags to cpucap
vectors as we do with ARM would help, but it would not emulate CPUs
newer than the host CPU. For now, I've just had SDE tests disable these.

Annoyingly, CMake does not allow object libraries to have dependencies,
so make test_support a proper static library. Rename the target to
test_support_lib to avoid
https://gitlab.kitware.com/cmake/cmake/issues/17785

Update-Note: This adds a new optional test dependency, but it's disabled
by default (define BORINGSSL_HAVE_LIBUNWIND), so consumers do not need
to do anything. We'll probably want to adjust this in the future.

Bug: 181
Change-Id: I817263d7907aff0904a9cee83f8b26747262cc0c
Reviewed-on: https://boringssl-review.googlesource.com/c/33966
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2019-01-03 22:01:55 +00:00
David Benjamin cc5a888fe5 Update SDE and add the Windows version.
Windows is sufficiently different from Linux that running tests under
SDE for Windows, particularly with the new ABI tests, is worthwhile.

Change-Id: I32c4f6de06b2e732ebb2c1492eb1766cae73c0e0
Reviewed-on: https://boringssl-review.googlesource.com/c/34064
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2019-01-03 21:01:33 +00:00
Adam Langley 35a66d4aae Drop NEON assembly for HRSS.
Since we build Chrome with -mfpu=neon anyway, this isn't currently
needed. Additionally, I had included poly3_invert_vec in the assembly
but hadn't gotten around to wiring it up yet. That assembly referenced a
couple of functions in the C code that had been renamed. Surprisingly,
the NDK linker didn't have a problem with the undefined symbols since it
could statically find them to be unreachable.

But that isn't true everywhere. Some builds did fail because of the
undefined symbols although we're not sure what's different about them.
(Different NDK version perhaps?)

Change-Id: Ibac4724d24df05d6f6007499e1cd884e59889101
Reviewed-on: https://boringssl-review.googlesource.com/c/33604
Commit-Queue: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2018-12-13 17:43:07 +00:00
Adam Langley 7b935937b1 Add initial HRSS support.
This change includes support for a variant of [HRSS], a post-quantum KEM
based on NTRU. It includes changes suggested in [SXY]. This is not yet
ready for any deployment: some breaking changes, like removing the
confirmation hash, are still planned.

(CLA for HRSS's assembly code noted in b/119426559.)

[HRSS] https://eprint.iacr.org/2017/667.pdf
[SXY] https://eprint.iacr.org/2017/1005.pdf

Change-Id: I85d813733b066d5c578484bdd248de3f764194db
Reviewed-on: https://boringssl-review.googlesource.com/c/33105
Reviewed-by: David Benjamin <davidben@google.com>
2018-12-12 17:35:02 +00:00
David Benjamin e157dc9208 Make symbol-prefixing work on 32-bit x86.
On Linux, this introduces yet another symbol to blacklist.

Change-Id: Ieafe45a25f3b41da6c6934dd9488f4ee400bcab9
Reviewed-on: https://boringssl-review.googlesource.com/c/33350
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-27 22:35:17 +00:00
David Benjamin 8c23d3a5df Make Windows symbol-prefixing work.
This teaches read_symbols.go to use debug/pe, and fixes miscellaneous
issues with NASM. It also reveals a problem with this strategy of
getting symbols out at the linker level: inline functions.  I'm thinking
a better long-term mechanism may be to parse our header files.

Change-Id: I11b008543a7a97db3db9d4062ee4ddb910d174b7
Reviewed-on: https://boringssl-review.googlesource.com/c/33349
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-27 22:13:22 +00:00
David Benjamin c8cf62bba8 Support Windows-style ar files.
Apparently Windows' .lib files are also ar. Add tests.

Change-Id: Ie35f410268086b8fe6d4d1b491de3f30a46309dd
Reviewed-on: https://boringssl-review.googlesource.com/c/33348
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-27 22:06:15 +00:00
David Benjamin 1a0f908e92 Move __.SYMDEF handling to ar.go.
One less bit of special-casing in read_symbols.go. We filter out the
sysv-style symbol table, so we should filter out the macOS one too.

Add tests for util/ar to cover this and the Linux case.

Change-Id: Id16d8b0526c1b6e0149df1df4006848d7b3a4b2f
Reviewed-on: https://boringssl-review.googlesource.com/c/33347
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-27 21:53:36 +00:00
David Benjamin 8b0dad4a7f Don't double-mangle C++ symbols on macOS.
The symbol-listing code already removes the leading underscore.

Change-Id: I2f93382af932e8027f2aa8596886ba685836b3a6
Reviewed-on: https://boringssl-review.googlesource.com/c/33345
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-27 20:57:56 +00:00
David Benjamin abbc59896f Make read_symbols.go a bit more idiomatic.
It's more verbose, but trimming the panics should make it easier to move
to a library (e.g. a symbol checker) or unit test later.

Change-Id: Iab37eff2689955e58057528be092d6dd5d8d26bc
Reviewed-on: https://boringssl-review.googlesource.com/c/33344
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2018-11-27 19:42:20 +00:00
David Benjamin ce61710062 Move JSON test results code into a common module.
We can actually use modules now.

Change-Id: I0bd8abaf4e3318069f93fa17e89b4804d03944eb
Reviewed-on: https://boringssl-review.googlesource.com/c/33205
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-16 20:13:31 +00:00
David Benjamin 6ce93ccb80 Simulate other ARM CPUs when running tests.
We test all Intel variants via SDE. For ARM, we can do the next best
thing and tweak with OPENSSL_armcap_P. If the host CPU does not support
the instructions we wish to test, skip it, but print something so we
know whether we need a more featureful test device.

Also fix the "CRASHED" status to "CRASH", to match
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/json_test_results_format.md
(It's unclear if anything actually parses that JSON very carefully...)

Bug: 19
Change-Id: I811cc00a0d210a454287ac79c06f18fbc54f96dd
Reviewed-on: https://boringssl-review.googlesource.com/c/33204
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-15 00:58:09 +00:00
Aaron Green 0e150027f9 [util] Mark srtp.h as an SSL header file
This CL adds srtp.h to the list of SSLHeaderFiles, in order to move it
from ssl_h_files to crypto_h_files. The header file only includes an
inclusion of ssl.h. ssl_h_files can depend on crypt_h_files but not the
other way around.

Change-Id: If7410624a8b2bbbd5afb7f66ec6f491968faf24e
Reviewed-on: https://boringssl-review.googlesource.com/c/32505
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2018-10-16 19:26:06 +00:00
Adam Langley b018908475 Better handle AVX-512 assembly syntax.
https://boringssl-review.googlesource.com/c/boringssl/+/24945 was mistaken in
that it thought that these AVX-512 assembly extensions were an
instruction-level thing, whereas they actually appear to be an argument-level
modifier.

This change parses them as such and unbreaks some AVX-512 instructions that can
be emitted by compilers with certain combinations of flags.

Change-Id: I9af5a4fec21f55d3198a248c9175252e229c355a
Reviewed-on: https://boringssl-review.googlesource.com/c/32484
Commit-Queue: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2018-10-15 23:31:23 +00:00
Matthew Braithwaite 7039f40368 Rename inject-hash: Bazel does not like hyphens.
(Only in package names.  Hyphens in file names are file.)

Change-Id: I80b705a780ffbad056abe7a7868d5682b30d2d44
Reviewed-on: https://boringssl-review.googlesource.com/32144
Commit-Queue: Matt Braithwaite <mab@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: David Benjamin <davidben@google.com>
2018-09-26 21:50:36 +00:00
Joshua Liebow-Feeser 066b108957 Add util/read_symbols.go
- Add util/read_symbols.go to read exported symbols from an AR
  file for use with the symbol prefixing feature
- Move util/fipstools/fipscommon/ar.go -> util/ar/ar.go
- util/ar/ar.go: Support BSD-style AR files

Change-Id: I171b3b952e69c4b87ac04751b7dba3ea9bc2504e
Reviewed-on: https://boringssl-review.googlesource.com/32024
Reviewed-by: David Benjamin <davidben@google.com>
2018-09-24 20:25:48 +00:00
David Benjamin 5baee45652 Use Go modules with delocate.
This makes running go test, etc., in util/fipstools/delocate work! This
adds a go_executable command to CMake like:

  go_executable(delocate boringssl.googlesource.com/boringssl/util/fipstools/delocate)

which internally gets dependencies and whatnot so it behaves like usual
Go.

Update-Note: delocate has been rearranged a bit.
Change-Id: I244a7317dd8d4f2ab77a0daa624ed3e0b385faef
Reviewed-on: https://boringssl-review.googlesource.com/31885
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2018-09-17 22:19:52 +00:00