Skip to content

Commit

Permalink
Move ssl and decrepit sources to sources.cmake
Browse files Browse the repository at this point in the history
Bug: 542
Change-Id: Iec0348555b988f8eb8eb24394a867e015b125c20
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67227
Reviewed-by: Adam Langley <[email protected]>
Commit-Queue: David Benjamin <[email protected]>
  • Loading branch information
davidben authored and Boringssl LUCI CQ committed Mar 20, 2024
1 parent c5e9b4b commit 0cb032a
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 79 deletions.
18 changes: 13 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,20 @@ add_custom_command(
add_library(crypto_test_data OBJECT crypto_test_data.cc)

add_subdirectory(crypto)
add_subdirectory(ssl)
add_subdirectory(ssl/test)
add_subdirectory(util/fipstools)
add_subdirectory(util/fipstools/acvp/modulewrapper)
add_subdirectory(decrepit)

add_library(ssl ${SSL_SOURCES})
# Although libssl also provides headers that require an include directory, the
# flag is already specified by libcrypto, so we omit target_include_directories
# here.
install_if_enabled(TARGETS ssl EXPORT OpenSSLTargets ${INSTALL_DESTINATION_DEFAULT})
set_property(TARGET ssl PROPERTY EXPORT_NAME SSL)
target_link_libraries(ssl crypto)

add_library(decrepit ${DECREPIT_SOURCES})
target_link_libraries(decrepit crypto ssl)

add_library(test_support_lib STATIC ${TEST_SUPPORT_SOURCES})
if (LIBUNWIND_FOUND)
Expand All @@ -547,7 +556,6 @@ add_dependencies(all_tests crypto_test)
add_executable(ssl_test ${SSL_TEST_SOURCES})
target_link_libraries(ssl_test test_support_lib boringssl_gtest ssl crypto)
add_dependencies(all_tests ssl_test)

add_executable(decrepit_test ${DECREPIT_TEST_SOURCES})
target_link_libraries(decrepit_test test_support_lib boringssl_gtest
decrepit crypto)
Expand Down Expand Up @@ -580,8 +588,8 @@ target_link_libraries(bssl ssl crypto)
# existing tools, we, for now, copy the targets into the subdirectories. This
# will be removed sometime in 2024.
copy_post_build(crypto crypto_test urandom_test)
copy_post_build(ssl ssl_test)
copy_post_build(decrepit decrepit_test)
copy_post_build(ssl ssl ssl_test)
copy_post_build(decrepit decrepit decrepit_test)
copy_post_build(tool bssl)

if(FUZZ)
Expand Down
22 changes: 0 additions & 22 deletions decrepit/CMakeLists.txt

This file was deleted.

65 changes: 65 additions & 0 deletions sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,49 @@ set(
crypto/fipsmodule/rand/urandom_test.cc
)

set(
SSL_SOURCES

ssl/bio_ssl.cc
ssl/d1_both.cc
ssl/d1_lib.cc
ssl/d1_pkt.cc
ssl/d1_srtp.cc
ssl/dtls_method.cc
ssl/dtls_record.cc
ssl/encrypted_client_hello.cc
ssl/extensions.cc
ssl/handoff.cc
ssl/handshake.cc
ssl/handshake_client.cc
ssl/handshake_server.cc
ssl/s3_both.cc
ssl/s3_lib.cc
ssl/s3_pkt.cc
ssl/ssl_aead_ctx.cc
ssl/ssl_asn1.cc
ssl/ssl_buffer.cc
ssl/ssl_cert.cc
ssl/ssl_cipher.cc
ssl/ssl_credential.cc
ssl/ssl_file.cc
ssl/ssl_key_share.cc
ssl/ssl_lib.cc
ssl/ssl_privkey.cc
ssl/ssl_session.cc
ssl/ssl_stat.cc
ssl/ssl_transcript.cc
ssl/ssl_versions.cc
ssl/ssl_x509.cc
ssl/t1_enc.cc
ssl/tls_method.cc
ssl/tls_record.cc
ssl/tls13_both.cc
ssl/tls13_client.cc
ssl/tls13_enc.cc
ssl/tls13_server.cc
)

set(
SSL_TEST_SOURCES

Expand All @@ -339,6 +382,28 @@ set(
ssl/ssl_test.cc
)

set(
DECREPIT_SOURCES

decrepit/bio/base64_bio.c
decrepit/blowfish/blowfish.c
decrepit/cast/cast.c
decrepit/cast/cast_tables.c
decrepit/cfb/cfb.c
decrepit/des/cfb64ede.c
decrepit/dh/dh_decrepit.c
decrepit/dsa/dsa_decrepit.c
decrepit/evp/dss1.c
decrepit/evp/evp_do_all.c
decrepit/obj/obj_decrepit.c
decrepit/rc4/rc4_decrepit.c
decrepit/ripemd/ripemd.c
decrepit/rsa/rsa_decrepit.c
decrepit/ssl/ssl_decrepit.c
decrepit/x509/x509_decrepit.c
decrepit/xts/xts.c
)

set(
DECREPIT_TEST_SOURCES

Expand Down
48 changes: 0 additions & 48 deletions ssl/CMakeLists.txt

This file was deleted.

3 changes: 1 addition & 2 deletions util/generate_build_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ def main(platforms):
crypto_c_files = (FindCFiles(os.path.join('src', 'crypto'), NoTestsNorFIPSFragments) +
FindCFiles(os.path.join('src', 'third_party', 'fiat'), NoTestsNorFIPSFragments))
fips_fragments = FindCFiles(os.path.join('src', 'crypto', 'fipsmodule'), OnlyFIPSFragments)
ssl_source_files = FindCFiles(os.path.join('src', 'ssl'), NoTests)
tool_h_files = FindHeaderFiles(os.path.join('src', 'tool'), AllFiles)
bssl_sys_files = FindRustFiles(os.path.join('src', 'rust', 'bssl-sys', 'src'))
bssl_crypto_files = FindRustFiles(os.path.join('src', 'rust', 'bssl-crypto', 'src'))
Expand Down Expand Up @@ -883,7 +882,7 @@ def main(platforms):
'pki_test_data': PrefixWithSrc(cmake['PKI_TEST_DATA']),
'rust_bssl_crypto': bssl_crypto_files,
'rust_bssl_sys': bssl_sys_files,
'ssl': ssl_source_files,
'ssl': PrefixWithSrc(cmake['SSL_SOURCES']),
'ssl_headers': ssl_h_files,
'ssl_internal_headers': ssl_internal_h_files,
'ssl_test': PrefixWithSrc(cmake['SSL_TEST_SOURCES']),
Expand Down
4 changes: 2 additions & 2 deletions util/run_android_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ func main() {
"libboringssl_gtest.so",
"libpki.so",
"crypto/libcrypto.so",
"decrepit/libdecrepit.so",
"ssl/libssl.so",
"libdecrepit.so",
"libssl.so",
}
} else if !os.IsNotExist(err) {
fmt.Printf("Failed to stat crypto/libcrypto.so: %s\n", err)
Expand Down

0 comments on commit 0cb032a

Please sign in to comment.