Change CMakeLists.txt to two-space indent.

find -name CMakeLists.txt -type f | xargs sed -e 's/\t/  /g' -i

Change-Id: I01636b1849c00ba918f48828252492d99b0403ac
This commit is contained in:
Adam Langley 2015-01-28 16:37:10 -08:00
parent 2e38008558
commit 4a0f0c4910
43 changed files with 700 additions and 700 deletions

View File

@ -3,60 +3,60 @@ cmake_minimum_required (VERSION 2.8.10)
project (BoringSSL)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -ggdb -fvisibility=hidden")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -ggdb -std=c++0x -fvisibility=hidden")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -ggdb -fvisibility=hidden")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -ggdb -std=c++0x -fvisibility=hidden")
elseif(MSVC)
# Disable warnings for implicit integer narrowing.
set(CMAKE_C_FLAGS "/wd4267")
set(CMAKE_CXX_FLAGS "/wd4267")
add_definitions(-D_HAS_EXCEPTIONS=0)
# Disable warnings for implicit integer narrowing.
set(CMAKE_C_FLAGS "/wd4267")
set(CMAKE_CXX_FLAGS "/wd4267")
add_definitions(-D_HAS_EXCEPTIONS=0)
endif()
if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.5.99") OR
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
endif()
add_definitions(-DBORINGSSL_IMPLEMENTATION)
if (BUILD_SHARED_LIBS)
add_definitions(-DBORINGSSL_SHARED_LIBRARY)
# Enable position-independent code globally. This is needed because
# some library targets are OBJECT libraries.
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
add_definitions(-DBORINGSSL_SHARED_LIBRARY)
# Enable position-independent code globally. This is needed because
# some library targets are OBJECT libraries.
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
endif()
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(ARCH "x86_64")
set(ARCH "x86_64")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")
set(ARCH "x86_64")
set(ARCH "x86_64")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
# cmake reports AMD64 on Windows, but we might be building for 32-bit.
if (CMAKE_CL_64)
set(ARCH "x86_64")
else()
set(ARCH "x86")
endif()
# cmake reports AMD64 on Windows, but we might be building for 32-bit.
if (CMAKE_CL_64)
set(ARCH "x86_64")
else()
set(ARCH "x86")
endif()
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
set(ARCH "x86")
set(ARCH "x86")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386")
set(ARCH "x86")
set(ARCH "x86")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686")
set(ARCH "x86")
set(ARCH "x86")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
set(ARCH "arm")
set(ARCH "arm")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
set(ARCH "aarch64")
set(ARCH "aarch64")
else()
message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR})
message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
if (${ARCH} STREQUAL "x86" AND APPLE)
# With CMake 2.8.x, ${CMAKE_SYSTEM_PROCESSOR} evalutes to i386 on OS X,
# but clang defaults to 64-bit builds on OS X unless otherwise told.
# Set ARCH to x86_64 so clang and CMake agree. This is fixed in CMake 3.
set(ARCH "x86_64")
# With CMake 2.8.x, ${CMAKE_SYSTEM_PROCESSOR} evalutes to i386 on OS X,
# but clang defaults to 64-bit builds on OS X unless otherwise told.
# Set ARCH to x86_64 so clang and CMake agree. This is fixed in CMake 3.
set(ARCH "x86_64")
endif()
add_subdirectory(crypto)

View File

@ -1,86 +1,86 @@
include_directories(. ../include)
if(APPLE)
if (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC")
endif()
set(PERLASM_STYLE macosx)
set(ASM_EXT S)
enable_language(ASM)
if (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC")
endif()
set(PERLASM_STYLE macosx)
set(ASM_EXT S)
enable_language(ASM)
elseif(UNIX)
if (${ARCH} STREQUAL "aarch64")
# The "armx" Perl scripts look for "64" in the style argument
# in order to decide whether to generate 32- or 64-bit asm.
set(PERLASM_STYLE linux64)
elseif (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC")
set(PERLASM_STYLE elf)
else()
set(PERLASM_STYLE elf)
endif()
set(ASM_EXT S)
enable_language(ASM)
if (${ARCH} STREQUAL "aarch64")
# The "armx" Perl scripts look for "64" in the style argument
# in order to decide whether to generate 32- or 64-bit asm.
set(PERLASM_STYLE linux64)
elseif (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC")
set(PERLASM_STYLE elf)
else()
set(PERLASM_STYLE elf)
endif()
set(ASM_EXT S)
enable_language(ASM)
else()
if (CMAKE_CL_64)
message("Using nasm")
set(PERLASM_STYLE nasm)
else()
message("Using win32n")
set(PERLASM_STYLE win32n)
endif()
if (CMAKE_CL_64)
message("Using nasm")
set(PERLASM_STYLE nasm)
else()
message("Using win32n")
set(PERLASM_STYLE win32n)
endif()
# On Windows, we use the NASM output, specifically built with Yasm.
set(ASM_EXT asm)
enable_language(ASM_NASM)
# On Windows, we use the NASM output, specifically built with Yasm.
set(ASM_EXT asm)
enable_language(ASM_NASM)
endif()
function(perlasm dest src)
add_custom_command(
OUTPUT ${dest}
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} > ${dest}
DEPENDS
${src}
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl
WORKING_DIRECTORY .
)
add_custom_command(
OUTPUT ${dest}
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} > ${dest}
DEPENDS
${src}
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl
WORKING_DIRECTORY .
)
endfunction()
if (${ARCH} STREQUAL "x86_64")
set(
CRYPTO_ARCH_SOURCES
set(
CRYPTO_ARCH_SOURCES
cpu-x86_64-asm.${ASM_EXT}
cpu-intel.c
)
cpu-x86_64-asm.${ASM_EXT}
cpu-intel.c
)
endif()
if (${ARCH} STREQUAL "x86")
set(
CRYPTO_ARCH_SOURCES
set(
CRYPTO_ARCH_SOURCES
cpu-x86-asm.${ASM_EXT}
cpu-intel.c
)
cpu-x86-asm.${ASM_EXT}
cpu-intel.c
)
endif()
if (${ARCH} STREQUAL "arm")
set(
CRYPTO_ARCH_SOURCES
set(
CRYPTO_ARCH_SOURCES
cpu-arm.c
)
cpu-arm.c
)
endif()
if (${ARCH} STREQUAL "aarch64")
set(
CRYPTO_ARCH_SOURCES
set(
CRYPTO_ARCH_SOURCES
cpu-arm.c
)
cpu-arm.c
)
endif()
# Level 0.1 - depends on nothing outside this set.
@ -133,63 +133,63 @@ add_subdirectory(x509v3)
add_subdirectory(pkcs8)
add_library(
crypto
crypto
crypto.c
crypto_error.c
mem.c
thread.c
ex_data.c
ex_data_impl.c
time_support.c
directory_posix.c
directory_win.c
crypto.c
crypto_error.c
mem.c
thread.c
ex_data.c
ex_data_impl.c
time_support.c
directory_posix.c
directory_win.c
${CRYPTO_ARCH_SOURCES}
${CRYPTO_ARCH_SOURCES}
$<TARGET_OBJECTS:stack>
$<TARGET_OBJECTS:lhash>
$<TARGET_OBJECTS:err>
$<TARGET_OBJECTS:base64>
$<TARGET_OBJECTS:bytestring>
$<TARGET_OBJECTS:sha>
$<TARGET_OBJECTS:md4>
$<TARGET_OBJECTS:md5>
$<TARGET_OBJECTS:digest>
$<TARGET_OBJECTS:cipher>
$<TARGET_OBJECTS:modes>
$<TARGET_OBJECTS:aes>
$<TARGET_OBJECTS:des>
$<TARGET_OBJECTS:rc4>
$<TARGET_OBJECTS:conf>
$<TARGET_OBJECTS:chacha>
$<TARGET_OBJECTS:poly1305>
$<TARGET_OBJECTS:buf>
$<TARGET_OBJECTS:bn>
$<TARGET_OBJECTS:bio>
$<TARGET_OBJECTS:rand>
$<TARGET_OBJECTS:obj>
$<TARGET_OBJECTS:asn1>
$<TARGET_OBJECTS:engine>
$<TARGET_OBJECTS:dh>
$<TARGET_OBJECTS:dsa>
$<TARGET_OBJECTS:rsa>
$<TARGET_OBJECTS:ec>
$<TARGET_OBJECTS:ecdh>
$<TARGET_OBJECTS:ecdsa>
$<TARGET_OBJECTS:hmac>
$<TARGET_OBJECTS:evp>
$<TARGET_OBJECTS:hkdf>
$<TARGET_OBJECTS:pem>
$<TARGET_OBJECTS:x509>
$<TARGET_OBJECTS:x509v3>
$<TARGET_OBJECTS:pkcs8>
$<TARGET_OBJECTS:stack>
$<TARGET_OBJECTS:lhash>
$<TARGET_OBJECTS:err>
$<TARGET_OBJECTS:base64>
$<TARGET_OBJECTS:bytestring>
$<TARGET_OBJECTS:sha>
$<TARGET_OBJECTS:md4>
$<TARGET_OBJECTS:md5>
$<TARGET_OBJECTS:digest>
$<TARGET_OBJECTS:cipher>
$<TARGET_OBJECTS:modes>
$<TARGET_OBJECTS:aes>
$<TARGET_OBJECTS:des>
$<TARGET_OBJECTS:rc4>
$<TARGET_OBJECTS:conf>
$<TARGET_OBJECTS:chacha>
$<TARGET_OBJECTS:poly1305>
$<TARGET_OBJECTS:buf>
$<TARGET_OBJECTS:bn>
$<TARGET_OBJECTS:bio>
$<TARGET_OBJECTS:rand>
$<TARGET_OBJECTS:obj>
$<TARGET_OBJECTS:asn1>
$<TARGET_OBJECTS:engine>
$<TARGET_OBJECTS:dh>
$<TARGET_OBJECTS:dsa>
$<TARGET_OBJECTS:rsa>
$<TARGET_OBJECTS:ec>
$<TARGET_OBJECTS:ecdh>
$<TARGET_OBJECTS:ecdsa>
$<TARGET_OBJECTS:hmac>
$<TARGET_OBJECTS:evp>
$<TARGET_OBJECTS:hkdf>
$<TARGET_OBJECTS:pem>
$<TARGET_OBJECTS:x509>
$<TARGET_OBJECTS:x509v3>
$<TARGET_OBJECTS:pkcs8>
)
add_executable(
constant_time_test
constant_time_test
constant_time_test.c
constant_time_test.c
)
target_link_libraries(constant_time_test crypto)

View File

@ -1,53 +1,53 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "x86_64")
set(
AES_ARCH_SOURCES
set(
AES_ARCH_SOURCES
aes-x86_64.${ASM_EXT}
aesni-x86_64.${ASM_EXT}
bsaes-x86_64.${ASM_EXT}
vpaes-x86_64.${ASM_EXT}
)
aes-x86_64.${ASM_EXT}
aesni-x86_64.${ASM_EXT}
bsaes-x86_64.${ASM_EXT}
vpaes-x86_64.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "x86")
set(
AES_ARCH_SOURCES
set(
AES_ARCH_SOURCES
aes-586.${ASM_EXT}
vpaes-x86.${ASM_EXT}
aesni-x86.${ASM_EXT}
)
aes-586.${ASM_EXT}
vpaes-x86.${ASM_EXT}
aesni-x86.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "arm")
set(
AES_ARCH_SOURCES
set(
AES_ARCH_SOURCES
aes-armv4.${ASM_EXT}
bsaes-armv7.${ASM_EXT}
aesv8-armx.${ASM_EXT}
)
aes-armv4.${ASM_EXT}
bsaes-armv7.${ASM_EXT}
aesv8-armx.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "aarch64")
set(
AES_ARCH_SOURCES
set(
AES_ARCH_SOURCES
aesv8-armx.${ASM_EXT}
)
aesv8-armx.${ASM_EXT}
)
endif()
add_library(
aes
aes
OBJECT
OBJECT
aes.c
mode_wrappers.c
aes.c
mode_wrappers.c
${AES_ARCH_SOURCES}
${AES_ARCH_SOURCES}
)
perlasm(aes-x86_64.${ASM_EXT} asm/aes-x86_64.pl)

View File

@ -1,46 +1,46 @@
include_directories(. .. ../../include)
add_library(
asn1
asn1
OBJECT
OBJECT
a_bitstr.c
a_bool.c
a_bytes.c
a_d2i_fp.c
a_dup.c
a_enum.c
a_gentm.c
a_i2d_fp.c
a_int.c
a_mbstr.c
a_object.c
a_octet.c
a_print.c
a_strnid.c
a_time.c
a_type.c
a_utctm.c
a_utf8.c
asn1_error.c
asn1_lib.c
asn1_par.c
asn_pack.c
bio_asn1.c
bio_ndef.c
f_enum.c
f_int.c
f_string.c
t_bitst.c
t_pkey.c
tasn_dec.c
tasn_enc.c
tasn_fre.c
tasn_new.c
tasn_prn.c
tasn_typ.c
tasn_utl.c
x_bignum.c
x_long.c
a_bitstr.c
a_bool.c
a_bytes.c
a_d2i_fp.c
a_dup.c
a_enum.c
a_gentm.c
a_i2d_fp.c
a_int.c
a_mbstr.c
a_object.c
a_octet.c
a_print.c
a_strnid.c
a_time.c
a_type.c
a_utctm.c
a_utf8.c
asn1_error.c
asn1_lib.c
asn1_par.c
asn_pack.c
bio_asn1.c
bio_ndef.c
f_enum.c
f_int.c
f_string.c
t_bitst.c
t_pkey.c
tasn_dec.c
tasn_enc.c
tasn_fre.c
tasn_new.c
tasn_prn.c
tasn_typ.c
tasn_utl.c
x_bignum.c
x_long.c
)

View File

@ -1,17 +1,17 @@
include_directories(. .. ../../include)
add_library(
base64
base64
OBJECT
OBJECT
base64.c
base64.c
)
add_executable(
base64_test
base64_test
base64_test.c
base64_test.c
)
target_link_libraries(base64_test crypto)

View File

@ -1,31 +1,31 @@
include_directories(. .. ../../include)
add_library(
bio
bio
OBJECT
OBJECT
bio.c
bio_error.c
bio_mem.c
buffer.c
connect.c
fd.c
file.c
hexdump.c
pair.c
printf.c
socket.c
socket_helper.c
bio.c
bio_error.c
bio_mem.c
buffer.c
connect.c
fd.c
file.c
hexdump.c
pair.c
printf.c
socket.c
socket_helper.c
)
add_executable(
bio_test
bio_test
bio_test.c
bio_test.c
)
target_link_libraries(bio_test crypto)
if (WIN32)
target_link_libraries(bio_test ws2_32)
target_link_libraries(bio_test ws2_32)
endif()

View File

@ -1,61 +1,61 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "x86_64")
set(
BN_ARCH_SOURCES
set(
BN_ARCH_SOURCES
asm/x86_64-gcc.c
x86_64-mont.${ASM_EXT}
x86_64-mont5.${ASM_EXT}
rsaz-x86_64.${ASM_EXT}
rsaz-avx2.${ASM_EXT}
asm/x86_64-gcc.c
x86_64-mont.${ASM_EXT}
x86_64-mont5.${ASM_EXT}
rsaz-x86_64.${ASM_EXT}
rsaz-avx2.${ASM_EXT}
rsaz_exp.c
)
rsaz_exp.c
)
endif()
if (${ARCH} STREQUAL "x86")
set(
BN_ARCH_SOURCES
set(
BN_ARCH_SOURCES
bn-586.${ASM_EXT}
co-586.${ASM_EXT}
x86-mont.${ASM_EXT}
)
bn-586.${ASM_EXT}
co-586.${ASM_EXT}
x86-mont.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "arm")
set(
BN_ARCH_SOURCES
set(
BN_ARCH_SOURCES
armv4-mont.${ASM_EXT}
)
armv4-mont.${ASM_EXT}
)
endif()
add_library(
bn
bn
OBJECT
OBJECT
bn_error.c
add.c
bn.c
cmp.c
convert.c
ctx.c
div.c
exponentiation.c
generic.c
gcd.c
kronecker.c
montgomery.c
mul.c
prime.c
random.c
shift.c
sqrt.c
bn_error.c
add.c
bn.c
cmp.c
convert.c
ctx.c
div.c
exponentiation.c
generic.c
gcd.c
kronecker.c
montgomery.c
mul.c
prime.c
random.c
shift.c
sqrt.c
${BN_ARCH_SOURCES}
${BN_ARCH_SOURCES}
)
perlasm(x86_64-mont.${ASM_EXT} asm/x86_64-mont.pl)
@ -68,9 +68,9 @@ perlasm(x86-mont.${ASM_EXT} asm/x86-mont.pl)
perlasm(armv4-mont.${ASM_EXT} asm/armv4-mont.pl)
add_executable(
bn_test
bn_test
bn_test.c
bn_test.c
)
target_link_libraries(bn_test crypto)

View File

@ -1,10 +1,10 @@
include_directories(. .. ../../include)
add_library(
buf
buf
OBJECT
OBJECT
buf.c
buf_error.c
buf.c
buf_error.c
)

View File

@ -1,19 +1,19 @@
include_directories(. .. ../../include)
add_library(
bytestring
bytestring
OBJECT
OBJECT
ber.c
cbs.c
cbb.c
ber.c
cbs.c
cbb.c
)
add_executable(
bytestring_test
bytestring_test
bytestring_test.c
bytestring_test.c
)
target_link_libraries(bytestring_test crypto)

View File

@ -1,20 +1,20 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "arm")
set(
CHACHA_ARCH_SOURCES
set(
CHACHA_ARCH_SOURCES
chacha_vec_arm.S
)
chacha_vec_arm.S
)
endif()
add_library(
chacha
chacha
OBJECT
OBJECT
chacha_generic.c
chacha_vec.c
chacha_generic.c
chacha_vec.c
${CHACHA_ARCH_SOURCES}
${CHACHA_ARCH_SOURCES}
)

View File

@ -1,37 +1,37 @@
include_directories(. .. ../../include)
add_library(
cipher
cipher
OBJECT
OBJECT
cipher.c
cipher_error.c
derive_key.c
aead.c
cipher.c
cipher_error.c
derive_key.c
aead.c
e_null.c
e_rc2.c
e_rc4.c
e_des.c
e_aes.c
e_chacha20poly1305.c
e_null.c
e_rc2.c
e_rc4.c
e_des.c
e_aes.c
e_chacha20poly1305.c
tls_cbc.c
e_tls.c
e_ssl3.c
tls_cbc.c
e_tls.c
e_ssl3.c
)
add_executable(
cipher_test
cipher_test
cipher_test.c
cipher_test.c
)
add_executable(
aead_test
aead_test
aead_test.c
aead_test.c
)
target_link_libraries(cipher_test crypto)

View File

@ -1,10 +1,10 @@
include_directories(. .. ../../include)
add_library(
conf
conf
OBJECT
OBJECT
conf.c
conf_error.c
conf.c
conf_error.c
)

View File

@ -1,9 +1,9 @@
include_directories(. .. ../../include)
add_library(
des
des
OBJECT
OBJECT
des.c
des.c
)

View File

@ -1,22 +1,22 @@
include_directories(. .. ../../include)
add_library(
dh
dh
OBJECT
OBJECT
dh.c
dh_impl.c
params.c
check.c
dh_asn1.c
dh_error.c
dh.c
dh_impl.c
params.c
check.c
dh_asn1.c
dh_error.c
)
add_executable(
dh_test
dh_test
dh_test.c
dh_test.c
)
target_link_libraries(dh_test crypto)

View File

@ -1,19 +1,19 @@
include_directories(. .. ../../include)
add_library(
digest
digest
OBJECT
OBJECT
digest.c
digests.c
digest_error.c
digest.c
digests.c
digest_error.c
)
add_executable(
digest_test
digest_test
digest_test.c
digest_test.c
)
target_link_libraries(digest_test crypto)

View File

@ -1,20 +1,20 @@
include_directories(. .. ../../include)
add_library(
dsa
dsa
OBJECT
OBJECT
dsa.c
dsa_impl.c
dsa_asn1.c
dsa_error.c
dsa.c
dsa_impl.c
dsa_asn1.c
dsa_error.c
)
add_executable(
dsa_test
dsa_test
dsa_test.c
dsa_test.c
)
target_link_libraries(dsa_test crypto)

View File

@ -1,30 +1,30 @@
include_directories(. .. ../../include)
add_library(
ec
ec
OBJECT
OBJECT
ec.c
oct.c
simple.c
ec_montgomery.c
wnaf.c
ec_key.c
ec_asn1.c
ec_error.c
ec.c
oct.c
simple.c
ec_montgomery.c
wnaf.c
ec_key.c
ec_asn1.c
ec_error.c
)
add_executable(
example_mul
example_mul
example_mul.c
example_mul.c
)
add_executable(
ec_test
ec_test
ec_test.c
ec_test.c
)
target_link_libraries(example_mul crypto)

View File

@ -1,10 +1,10 @@
include_directories(. .. ../../include)
add_library(
ecdh
ecdh
OBJECT
OBJECT
ecdh.c
ecdh_error.c
ecdh.c
ecdh_error.c
)

View File

@ -1,20 +1,20 @@
include_directories(. .. ../../include)
add_library(
ecdsa
ecdsa
OBJECT
OBJECT
ecdsa.c
ecdsa_asn1.c
ecdsa_error.c
ecdsa.c
ecdsa_asn1.c
ecdsa_error.c
)
add_executable(
ecdsa_test
ecdsa_test
ecdsa_test.c
ecdsa_test.c
)
target_link_libraries(ecdsa_test crypto)

View File

@ -1,10 +1,10 @@
include_directories(. .. ../../include)
add_library(
engine
engine
OBJECT
OBJECT
engine.c
engine_error.c
engine.c
engine_error.c
)

View File

@ -1,18 +1,18 @@
include_directories(. .. ../../include)
add_library(
err
err
OBJECT
OBJECT
err.c
err_impl.c
err.c
err_impl.c
)
add_executable(
err_test
err_test
err_test.c
err_test.c
)
target_link_libraries(err_test crypto)

View File

@ -1,37 +1,37 @@
include_directories(. .. ../../include)
add_library(
evp
evp
OBJECT
OBJECT
algorithm.c
asn1.c
digestsign.c
evp.c
evp_ctx.c
evp_error.c
p_ec.c
p_ec_asn1.c
p_hmac.c
p_hmac_asn1.c
p_rsa.c
p_rsa_asn1.c
pbkdf.c
sign.c
algorithm.c
asn1.c
digestsign.c
evp.c
evp_ctx.c
evp_error.c
p_ec.c
p_ec_asn1.c
p_hmac.c
p_hmac_asn1.c
p_rsa.c
p_rsa_asn1.c
pbkdf.c
sign.c
)
add_executable(
evp_test
evp_test
evp_test.c
evp_test.c
)
add_executable(
pbkdf_test
pbkdf_test
pbkdf_test.c
pbkdf_test.c
)
target_link_libraries(evp_test crypto)

View File

@ -1,18 +1,18 @@
include_directories(. .. ../../include)
add_library(
hkdf
hkdf
OBJECT
OBJECT
hkdf.c
hkdf_error.c
hkdf.c
hkdf_error.c
)
add_executable(
hkdf_test
hkdf_test
hkdf_test.c
hkdf_test.c
)
target_link_libraries(hkdf_test crypto)

View File

@ -1,18 +1,18 @@
include_directories(. .. ../../include)
add_library(
hmac
hmac
OBJECT
OBJECT
hmac.c
hmac.c
)
add_executable(
hmac_test
hmac_test
hmac_test.c
hmac_test.c
)
target_link_libraries(hmac_test crypto)

View File

@ -1,17 +1,17 @@
include_directories(. .. ../../include)
add_library(
lhash
lhash
OBJECT
OBJECT
lhash.c
lhash.c
)
add_executable(
lhash_test
lhash_test
lhash_test.c
lhash_test.c
)
target_link_libraries(lhash_test crypto)

View File

@ -1,9 +1,9 @@
include_directories(. .. ../../include)
add_library(
md4
md4
OBJECT
OBJECT
md4.c
md4.c
)

View File

@ -1,29 +1,29 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "x86_64")
set(
MD5_ARCH_SOURCES
set(
MD5_ARCH_SOURCES
md5-x86_64.${ASM_EXT}
)
md5-x86_64.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "x86")
set(
MD5_ARCH_SOURCES
set(
MD5_ARCH_SOURCES
md5-586.${ASM_EXT}
)
md5-586.${ASM_EXT}
)
endif()
add_library(
md5
md5
OBJECT
OBJECT
md5.c
md5.c
${MD5_ARCH_SOURCES}
${MD5_ARCH_SOURCES}
)
perlasm(md5-x86_64.${ASM_EXT} asm/md5-x86_64.pl)

View File

@ -1,51 +1,51 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "x86_64")
set(
MODES_ARCH_SOURCES
set(
MODES_ARCH_SOURCES
aesni-gcm-x86_64.${ASM_EXT}
ghash-x86_64.${ASM_EXT}
)
aesni-gcm-x86_64.${ASM_EXT}
ghash-x86_64.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "x86")
set(
MODES_ARCH_SOURCES
set(
MODES_ARCH_SOURCES
ghash-x86.${ASM_EXT}
)
ghash-x86.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "arm")
set(
MODES_ARCH_SOURCES
set(
MODES_ARCH_SOURCES
ghash-armv4.${ASM_EXT}
ghashv8-armx.${ASM_EXT}
)
ghash-armv4.${ASM_EXT}
ghashv8-armx.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "aarch64")
set(
MODES_ARCH_SOURCES
set(
MODES_ARCH_SOURCES
ghashv8-armx.${ASM_EXT}
)
ghashv8-armx.${ASM_EXT}
)
endif()
add_library(
modes
modes
OBJECT
OBJECT
cbc.c
ctr.c
ofb.c
cfb.c
gcm.c
cbc.c
ctr.c
ofb.c
cfb.c
gcm.c
${MODES_ARCH_SOURCES}
${MODES_ARCH_SOURCES}
)
perlasm(aesni-gcm-x86_64.${ASM_EXT} asm/aesni-gcm-x86_64.pl)
@ -55,9 +55,9 @@ perlasm(ghash-armv4.${ASM_EXT} asm/ghash-armv4.pl)
perlasm(ghashv8-armx.${ASM_EXT} asm/ghashv8-armx.pl)
add_executable(
gcm_test
gcm_test
gcm_test.c
gcm_test.c
)
target_link_libraries(gcm_test crypto)

View File

@ -1,11 +1,11 @@
include_directories(. .. ../../include)
add_library(
obj
obj
OBJECT
OBJECT
obj.c
obj_xref.c
obj_error.c
obj.c
obj_xref.c
obj_error.c
)

View File

@ -1,17 +1,17 @@
include_directories(. .. ../../include)
add_library(
pem
pem
OBJECT
OBJECT
pem_all.c
pem_error.c
pem_info.c
pem_lib.c
pem_oth.c
pem_pk8.c
pem_pkey.c
pem_x509.c
pem_xaux.c
pem_all.c
pem_error.c
pem_info.c
pem_lib.c
pem_oth.c
pem_pk8.c
pem_pkey.c
pem_x509.c
pem_xaux.c
)

View File

@ -1,21 +1,21 @@
include_directories(. .. ../../include)
add_library(
pkcs8
pkcs8
OBJECT
OBJECT
pkcs8.c
p8_pkey.c
p5_pbe.c
p5_pbev2.c
pkcs8_error.c
pkcs8.c
p8_pkey.c
p5_pbe.c
p5_pbev2.c
pkcs8_error.c
)
add_executable(
pkcs12_test
pkcs12_test
pkcs12_test.c
pkcs12_test.c
)
target_link_libraries(pkcs12_test crypto)

View File

@ -1,21 +1,21 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "arm")
set(
POLY1305_ARCH_SOURCES
set(
POLY1305_ARCH_SOURCES
poly1305_arm_asm.S
)
poly1305_arm_asm.S
)
endif()
add_library(
poly1305
poly1305
OBJECT
OBJECT
poly1305.c
poly1305_arm.c
poly1305_vec.c
poly1305.c
poly1305_arm.c
poly1305_vec.c
${POLY1305_ARCH_SOURCES}
${POLY1305_ARCH_SOURCES}
)

View File

@ -1,11 +1,11 @@
include_directories(. .. ../../include)
add_library(
rand
rand
OBJECT
OBJECT
rand.c
urandom.c
windows.c
rand.c
urandom.c
windows.c
)

View File

@ -1,29 +1,29 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "x86_64")
set(
RC4_ARCH_SOURCES
set(
RC4_ARCH_SOURCES
rc4-x86_64.${ASM_EXT}
rc4-md5-x86_64.${ASM_EXT}
)
rc4-x86_64.${ASM_EXT}
rc4-md5-x86_64.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "x86")
set(
RC4_ARCH_SOURCES
set(
RC4_ARCH_SOURCES
rc4-586.${ASM_EXT}
)
rc4-586.${ASM_EXT}
)
endif()
add_library(
rc4
rc4
OBJECT
OBJECT
rc4.c
${RC4_ARCH_SOURCES}
rc4.c
${RC4_ARCH_SOURCES}
)
perlasm(rc4-x86_64.${ASM_EXT} asm/rc4-x86_64.pl)

View File

@ -1,22 +1,22 @@
include_directories(. .. ../../include)
add_library(
rsa
rsa
OBJECT
OBJECT
rsa.c
rsa_impl.c
blinding.c
padding.c
rsa_asn1.c
rsa_error.c
rsa.c
rsa_impl.c
blinding.c
padding.c
rsa_asn1.c
rsa_error.c
)
add_executable(
rsa_test
rsa_test
rsa_test.c
rsa_test.c
)
target_link_libraries(rsa_test crypto)

View File

@ -1,55 +1,55 @@
include_directories(. .. ../../include)
if (${ARCH} STREQUAL "x86_64")
set(
SHA_ARCH_SOURCES
set(
SHA_ARCH_SOURCES
sha1-x86_64.${ASM_EXT}
sha256-x86_64.${ASM_EXT}
sha512-x86_64.${ASM_EXT}
)
sha1-x86_64.${ASM_EXT}
sha256-x86_64.${ASM_EXT}
sha512-x86_64.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "x86")
set(
SHA_ARCH_SOURCES
set(
SHA_ARCH_SOURCES
sha1-586.${ASM_EXT}
sha256-586.${ASM_EXT}
sha512-586.${ASM_EXT}
)
sha1-586.${ASM_EXT}
sha256-586.${ASM_EXT}
sha512-586.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "arm")
set(
SHA_ARCH_SOURCES
set(
SHA_ARCH_SOURCES
sha1-armv4-large.${ASM_EXT}
sha256-armv4.${ASM_EXT}
sha512-armv4.${ASM_EXT}
)
sha1-armv4-large.${ASM_EXT}
sha256-armv4.${ASM_EXT}
sha512-armv4.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "aarch64")
set(
SHA_ARCH_SOURCES
set(
SHA_ARCH_SOURCES
sha1-armv8.${ASM_EXT}
sha256-armv8.${ASM_EXT}
sha512-armv8.${ASM_EXT}
)
sha1-armv8.${ASM_EXT}
sha256-armv8.${ASM_EXT}
sha512-armv8.${ASM_EXT}
)
endif()
add_library(
sha
sha
OBJECT
OBJECT
sha1.c
sha256.c
sha512.c
sha1.c
sha256.c
sha512.c
${SHA_ARCH_SOURCES}
${SHA_ARCH_SOURCES}
)
perlasm(sha1-x86_64.${ASM_EXT} asm/sha1-x86_64.pl)

View File

@ -1,9 +1,9 @@
include_directories(. .. ../../include)
add_library(
stack
stack
OBJECT
OBJECT
stack.c
stack.c
)

View File

@ -1,65 +1,65 @@
include_directories(. .. ../../include)
add_library(
x509
x509
OBJECT
OBJECT
a_digest.c
a_sign.c
a_strex.c
a_verify.c
asn1_gen.c
by_dir.c
by_file.c
i2d_pr.c
pkcs7.c
t_crl.c
t_x509.c
t_x509a.c
x509.c
x509_att.c
x509_cmp.c
x509_d2.c
x509_def.c
x509_error.c
x509_ext.c
x509_lu.c
x509_obj.c
x509_r2x.c
x509_req.c
x509_set.c
x509_trs.c
x509_txt.c
x509_v3.c
x509_vfy.c
x509_vpm.c
x509cset.c
x509name.c
x509rset.c
x509spki.c
x509type.c
x_algor.c
x_all.c
x_attrib.c
x_crl.c
x_exten.c
x_info.c
x_name.c
x_pkey.c
x_pubkey.c
x_req.c
x_sig.c
x_spki.c
x_val.c
x_x509.c
x_x509a.c
a_digest.c
a_sign.c
a_strex.c
a_verify.c
asn1_gen.c
by_dir.c
by_file.c
i2d_pr.c
pkcs7.c
t_crl.c
t_x509.c
t_x509a.c
x509.c
x509_att.c
x509_cmp.c
x509_d2.c
x509_def.c
x509_error.c
x509_ext.c
x509_lu.c
x509_obj.c
x509_r2x.c
x509_req.c
x509_set.c
x509_trs.c
x509_txt.c
x509_v3.c
x509_vfy.c
x509_vpm.c
x509cset.c
x509name.c
x509rset.c
x509spki.c
x509type.c
x_algor.c
x_all.c
x_attrib.c
x_crl.c
x_exten.c
x_info.c
x_name.c
x_pkey.c
x_pubkey.c
x_req.c
x_sig.c
x_spki.c
x_val.c
x_x509.c
x_x509a.c
)
add_executable(
pkcs7_test
pkcs7_test
pkcs7_test.c
pkcs7_test.c
)
target_link_libraries(pkcs7_test crypto)

View File

@ -1,59 +1,59 @@
include_directories(. .. ../../include)
add_library(
x509v3
x509v3
OBJECT
OBJECT
# v3_addr.c - disabled by upstream by default.
# v3_asid.c - disabled by upstream by default.
# v3_ocsp.c - missing OCSP for now.
# v3_addr.c - disabled by upstream by default.
# v3_asid.c - disabled by upstream by default.
# v3_ocsp.c - missing OCSP for now.
pcy_cache.c
pcy_data.c
pcy_lib.c
pcy_map.c
pcy_node.c
pcy_tree.c
v3_akey.c
v3_akeya.c
v3_alt.c
v3_bcons.c
v3_bitst.c
v3_conf.c
v3_cpols.c
v3_crld.c
v3_enum.c
v3_extku.c
v3_genn.c
v3_ia5.c
v3_info.c
v3_int.c
v3_lib.c
v3_ncons.c
v3_pci.c
v3_pcia.c
v3_pcons.c
v3_pku.c
v3_pmaps.c
v3_prn.c
v3_purp.c
v3_skey.c
v3_sxnet.c
v3_utl.c
x509v3_error.c
pcy_cache.c
pcy_data.c
pcy_lib.c
pcy_map.c
pcy_node.c
pcy_tree.c
v3_akey.c
v3_akeya.c
v3_alt.c
v3_bcons.c
v3_bitst.c
v3_conf.c
v3_cpols.c
v3_crld.c
v3_enum.c
v3_extku.c
v3_genn.c
v3_ia5.c
v3_info.c
v3_int.c
v3_lib.c
v3_ncons.c
v3_pci.c
v3_pcia.c
v3_pcons.c
v3_pku.c
v3_pmaps.c
v3_prn.c
v3_purp.c
v3_skey.c
v3_sxnet.c
v3_utl.c
x509v3_error.c
)
add_executable(
v3name_test
v3name_test
v3nametest.c
v3nametest.c
)
add_executable(
tab_test
tab_test
tabtest.c
tabtest.c
)
target_link_libraries(v3name_test crypto)

View File

@ -3,43 +3,43 @@ include_directories(. .. ../include)
add_subdirectory(pqueue)
add_library(
ssl
ssl
d1_both.c
d1_clnt.c
d1_lib.c
d1_meth.c
d1_pkt.c
d1_srtp.c
d1_srvr.c
s3_both.c
s3_clnt.c
s3_enc.c
s3_lib.c
s3_meth.c
s3_pkt.c
s3_srvr.c
ssl_algs.c
ssl_asn1.c
ssl_cert.c
ssl_ciph.c
ssl_error.c
ssl_lib.c
ssl_rsa.c
ssl_sess.c
ssl_stat.c
ssl_txt.c
t1_enc.c
t1_lib.c
t1_reneg.c
d1_both.c
d1_clnt.c
d1_lib.c
d1_meth.c
d1_pkt.c
d1_srtp.c
d1_srvr.c
s3_both.c
s3_clnt.c
s3_enc.c
s3_lib.c
s3_meth.c
s3_pkt.c
s3_srvr.c
ssl_algs.c
ssl_asn1.c
ssl_cert.c
ssl_ciph.c
ssl_error.c
ssl_lib.c
ssl_rsa.c
ssl_sess.c
ssl_stat.c
ssl_txt.c
t1_enc.c
t1_lib.c
t1_reneg.c
$<TARGET_OBJECTS:pqueue>
$<TARGET_OBJECTS:pqueue>
)
add_executable(
ssl_test
ssl_test
ssl_test.c
ssl_test.c
)
target_link_libraries(ssl_test ssl crypto)

View File

@ -1,17 +1,17 @@
include_directories(../../include)
add_library(
pqueue
pqueue
OBJECT
OBJECT
pqueue.c
pqueue.c
)
add_executable(
pqueue_test
pqueue_test
pqueue_test.c
pqueue_test.c
)
target_link_libraries(pqueue_test ssl crypto)

View File

@ -1,16 +1,16 @@
include_directories(../../include)
add_executable(
bssl_shim
bssl_shim
async_bio.cc
bssl_shim.cc
malloc.cc
packeted_bio.cc
test_config.cc
async_bio.cc
bssl_shim.cc
malloc.cc
packeted_bio.cc
test_config.cc
)
target_link_libraries(bssl_shim ssl crypto)
if (NOT APPLE AND NOT WIN32)
target_link_libraries(bssl_shim dl)
target_link_libraries(bssl_shim dl)
endif()

View File

@ -1,21 +1,21 @@
include_directories(../include)
add_executable(
bssl
bssl
args.cc
client.cc
const.cc
digest.cc
pkcs12.cc
server.cc
speed.cc
tool.cc
transport_common.cc
args.cc
client.cc
const.cc
digest.cc
pkcs12.cc
server.cc
speed.cc
tool.cc
transport_common.cc
)
if (APPLE OR WIN32)
target_link_libraries(bssl ssl crypto)
target_link_libraries(bssl ssl crypto)
else()
target_link_libraries(bssl ssl crypto -lrt)
target_link_libraries(bssl ssl crypto -lrt)
endif()