Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick PR #4007: Build BoringSSL test tool #4008

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions third_party/boringssl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,30 @@ static_library("crypto_full") {
configs += [ "//starboard/build/config:speed" ]
}
}

if (is_starboard) {
target(final_executable_type, "boringssl_tool") {
testonly = true
sources = [
"src/tool/args.cc",
"src/tool/ciphers.cc",
"src/tool/const.cc",
"src/tool/digest.cc",
"src/tool/file.cc",
"src/tool/generate_ed25519.cc",
"src/tool/genrsa.cc",
"src/tool/internal.h",
"src/tool/pkcs12.cc",
"src/tool/rand.cc",
"src/tool/sign.cc",
"src/tool/speed.cc",
"src/tool/tool.cc",
"src/tool/transport_common.cc",
"src/tool/transport_common.h",
]
deps = [
":crypto",
"//starboard:starboard_group",
]
}
}
1 change: 1 addition & 0 deletions third_party/boringssl/src/tool/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#ifdef STARBOARD
#include <starboard/client_porting/wrap_main/wrap_main.h>
#define OPENSSL_NO_SOCK // avoid linking errors
#endif

#if defined(OPENSSL_WINDOWS)
Expand Down
4 changes: 3 additions & 1 deletion third_party/boringssl/src/tool/transport_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ OPENSSL_MSVC_PRAGMA(warning(push, 3))
#include <ws2tcpip.h>
OPENSSL_MSVC_PRAGMA(warning(pop))

#ifndef STARBOARD
typedef int ssize_t;
#endif
OPENSSL_MSVC_PRAGMA(comment(lib, "Ws2_32.lib"))
#endif

Expand Down Expand Up @@ -214,7 +216,7 @@ bool Listener::Init(const std::string &port) {
// Windows' IN6ADDR_ANY_INIT does not have enough curly braces for clang-cl
// (https://crbug.com/772108), while other platforms like NaCl are missing
// in6addr_any, so use a mix of both.
#if defined(OPENSSL_WINDOWS)
#if defined(OPENSSL_WINDOWS) && !defined(STARBOARD)
addr.sin6_addr = in6addr_any;
#else
addr.sin6_addr = IN6ADDR_ANY_INIT;
Expand Down
Loading