Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
a3a8d41
encryption (from apache/parquet-cpp github repo)
thamht4190 Sep 13, 2018
ab65b1d
update thrift change and update encrypted footer
thamht4190 Jan 24, 2019
0ad09da
add encryption source files into CMakeLists.txt
thamht4190 Jan 28, 2019
5c295c2
add example from old PR of parquet-cpp
thamht4190 Jan 29, 2019
138b896
change due to new update in crypto package
thamht4190 Jan 31, 2019
31cf871
pass EncryptionProperties into parquet_encryption::Encrypt()/Decrypt(…
thamht4190 Feb 1, 2019
3ebebb5
fix issue of wrong column name in encryption-example and remove FileE…
thamht4190 Feb 26, 2019
189b2f2
get column path from ColumnCryptoMetadata when column is encrypted wi…
thamht4190 Feb 26, 2019
8dcf50c
let encryption examples to be able to cover more cases
thamht4190 Feb 26, 2019
bd96d43
footer plaintext mode
thamht4190 Feb 26, 2019
6a2a918
footer plaintext mode example
thamht4190 Mar 4, 2019
e428fda
fix compiling issue
thamht4190 Mar 7, 2019
537b5e0
fix plaintext mode verification
thamht4190 Mar 8, 2019
5d495c3
fix memory issue when serializing plaintext mode footer
thamht4190 Mar 12, 2019
e1e9470
protection of sensitive metadata
thamht4190 Mar 14, 2019
9040fbc
fix duplication of variable i
thamht4190 Mar 18, 2019
b177e8c
column metadata encryption: read algorithm, aad from FileCryptoMetada…
thamht4190 Mar 19, 2019
921830c
keep redacted metadata version for old readers
thamht4190 Mar 20, 2019
4f727f2
hidden column exception
thamht4190 Mar 20, 2019
7717ac3
remove log
thamht4190 Mar 21, 2019
e9ed8c8
add example for hidden column
thamht4190 Mar 21, 2019
a193daa
handle row group file_offset and total_compressed_size
thamht4190 Mar 29, 2019
e42cc4a
Apply API changes
revit13 Apr 15, 2019
8a80946
Add AAD calculation
revit13 Apr 16, 2019
053c2a6
Fix parquet tests to work with the changes required to support AAD
revit13 Apr 16, 2019
613056e
verify plaintext footer depends on config of decryption properties
thamht4190 Apr 19, 2019
a195bd5
Fix code style
revit13 Apr 22, 2019
b176ba5
Code style fixes in properties.h
revit13 Apr 22, 2019
ca1bd2b
revert change in parquet.thrift
thamht4190 Apr 24, 2019
a5eee07
Move all encrypted related classes from properties.h to new files: en…
Apr 29, 2019
4d4aef1
update crypto API change
thamht4190 Apr 25, 2019
fbeeff2
fix issue when column is encrypted in footer plaintext mode
thamht4190 May 7, 2019
2eb4f3f
remove EncryptionProperties
thamht4190 May 7, 2019
3cf56be
Change HiddenColumnExceptio message
May 7, 2019
97aad7b
Fix indentation in encryption_properties.cc
May 7, 2019
9dabd99
Rename functions in DecryptionKeyRetriever
May 7, 2019
e7871d6
Add check for aad_prefix to withoutAADPrefixStorage
May 7, 2019
99ca2a6
Add exception to FromThrift in thrift.h
May 7, 2019
baa162c
Fix prefix aad calculation
May 7, 2019
f92df57
Remove fileAAD from ReaderProperties
May 7, 2019
f2c000e
Remove column_map from ReaderProperties
May 7, 2019
8b9574f
Fix check for encryption and the existance of file_decryption in file…
May 7, 2019
dc25ba1
Save footer_key_metadata, algorithm, footer_decryptor and footer_sign…
May 8, 2019
5fdb0c7
Rename file_decryption to file_decryption_properties in properties.h
May 8, 2019
931829b
Do not pass file_decryption as function parameter
May 8, 2019
fde0627
Rename is_plaintext_mode to is_encryption_algorithm_set
May 8, 2019
85dd7ee
fix function naming
thamht4190 May 9, 2019
af3aeef
fix const&
thamht4190 May 9, 2019
1d51d12
make format
thamht4190 May 10, 2019
f7ea94d
Add plaintext_files_allowed
May 12, 2019
f8d03dc
Remove file_crypto_metadata_ field from SerializedRowGroup and Serial…
May 12, 2019
5838185
Pass file_aad, algorithm and key_metadata to InternalFileDecryptor co…
May 12, 2019
444a95e
Fixes to previous commits
May 12, 2019
b894de3
Put encryption_properties.h/cc content in encryption.h/cc
May 12, 2019
5c661dd
Remove encryption_properties.cc from CMakeLists.txt
May 12, 2019
b988c60
Add column_metadata_map_, column_data_map_, footer_signing_encryptor_…
May 12, 2019
5382b02
Add column_data_map_, column_metadata_map_, footer_data_decryptor_ an…
May 12, 2019
11e68f1
Rename aad to update_aad in Encryptor and Decryptor classes
May 12, 2019
9273de0
Move PARQUET_EMAGIC and PARQUET_MAGIC to file_writer.h and use it in …
May 12, 2019
37461ca
Rename file_encryption to file_encryption_properties in file_writer.cc
May 12, 2019
bba24b8
Remove unused footer_decryptor_ from InternalFileDecryptor class and …
May 13, 2019
4bb0238
Fix format
May 13, 2019
a1f7039
Change implementation of NULL_STRING
May 13, 2019
b8f5fba
Change ParquetException message format in file_reader.cc
May 13, 2019
5d023b2
Make format
May 13, 2019
04cda18
Add comments to encryption-reader-writer.cc example
May 14, 2019
5d7b271
Rename enable_plaintext_footer to set_plaintext_footer
May 14, 2019
d676693
Rename aad variable in NextPage function
May 14, 2019
59d4abb
Change comment in GetColumnPageReader
May 14, 2019
a36cbf8
Change additional comments in GetColumnPageReader
May 14, 2019
7810db3
Add comments in file_writer.cc
May 14, 2019
ab94416
Create both data and metadata decryptors to avoid redundant retrieval…
May 14, 2019
0a8e030
Fix metadata parameter sent to parquet_encryption::AesDecryptor
May 14, 2019
ac5a96d
Rename aad in GetFooterEncryptor and GetFooterSigningEncryptor
May 14, 2019
1bc3329
Rename verify to verify_signature
May 14, 2019
00e68ab
Add comments to void WriteTo
May 14, 2019
b951882
Add additional comment in void WriteTo
May 14, 2019
fb38044
Rename file_encryption to file_encryption_properties in WriterProperties
May 14, 2019
b949797
Use encrypted_footer instead of footer_signing_key when checking for …
May 14, 2019
bd989f6
Rename column_encryption_props to column_encryption_properties
May 14, 2019
b6ff133
Add comments in thrift.h
May 14, 2019
1aa5747
Change parameters order in ColumnChunkMetaData::Make
May 14, 2019
329633f
Change parameters order in PageReader::Open
May 14, 2019
0dfd5f2
Remove footer_encryption_key and footer_signing_key
May 14, 2019
6bf0d62
Remove ParquetException in GetFooterSigningEncryptor and GetFooterEnc…
May 14, 2019
16f5d78
make format
May 14, 2019
db94e05
make format in thrift.h
May 14, 2019
18876be
fix rebase mistake in parquet.thrift
thamht4190 May 15, 2019
96af8cb
Fix aad settings in thrift.h
May 19, 2019
3da31c2
Port key erasure mechanism
May 20, 2019
57c4840
Fix columnMetaData
May 20, 2019
e2f7cab
Minor fixes to previous code
May 20, 2019
b6dfe9c
fix build issue on MacOS
thamht4190 May 17, 2019
049d69c
apply change from crypto package
thamht4190 May 30, 2019
9910905
format code
thamht4190 May 30, 2019
4f0796a
post-rebase change
thamht4190 Jun 2, 2019
8eb339b
add unit tests for encryption properties
thamht4190 Jun 2, 2019
72c4554
write unit tests for metadata
thamht4190 Jun 2, 2019
c0585f9
Add encryption samples
Jun 2, 2019
7017089
fix lint and format issue
thamht4190 Jun 3, 2019
a3d924c
fix metadata set, statistics set issues
thamht4190 Jun 4, 2019
daeb600
Various changes to encryption-reader-writer-all-crypto-options test a…
Jun 5, 2019
980a8f5
Fix logging error
Jun 5, 2019
cbcac60
post-rebase change
thamht4190 Jun 7, 2019
ca71bab
fix isset of column chunk metadata and statistics
thamht4190 Jun 15, 2019
8c2d449
temporarily remove encryption-metadata-test
thamht4190 Jun 16, 2019
d6f30e1
fix windows compiling issue
thamht4190 Jun 17, 2019
512fd1f
fix issue of parquet-encryption-example
thamht4190 Jun 17, 2019
e738932
rename encryption-test.cc to encryption-properties-test.cc
thamht4190 Jun 18, 2019
85c08a5
use isset instead of creating a copy of column chunk metadata
thamht4190 Jun 18, 2019
4419abc
Address review comments
Jun 21, 2019
9397cd2
Fix SerializedPageReader initialization
Jun 21, 2019
6e5d7ec
Fix Format
Jun 23, 2019
fb7ac18
let parquet encryption be able to be off (when openssl is not found)
thamht4190 Jun 23, 2019
2e0ef53
Fix LogicalType
Jun 24, 2019
376b4ad
keep encryption parameters at method declaration
thamht4190 Jun 24, 2019
36cd316
add PARQUET_EXPORT into Builder class of encryption properties
thamht4190 Jun 25, 2019
e5a771a
Change assert to ASSERT_EQ in encryption-configurations-test.cc
Jun 25, 2019
0458d0d
fix cmake format
thamht4190 Jun 25, 2019
2a2a50c
Add MemoryPool field to Decryptors/Encryptors
Jun 26, 2019
f2ff1d7
keep encryption parameters at method declaration (column_writer.cc/.h)
thamht4190 Jun 26, 2019
7bc5635
Write to parquet stream to file in encryption test
Jun 27, 2019
5f7503c
Add file reader and file writer Close to encryption-configurations-te…
Jul 1, 2019
79372c6
Change encryption-configuration-test
Jul 4, 2019
fe773e1
Delete encryption-configuration-encrypted-columns-plaintext-footer.cc…
Jul 4, 2019
b6f4d22
Remove FooterSigningEncryptor class
Jul 10, 2019
0a0e0f8
remove some PARQUET_ENCRYPTION define check
thamht4190 Jul 11, 2019
00d4ad8
remove PARQUET_ENCRYPTION ifdefs and add encryption_internal-nossl.cc…
thamht4190 Jul 16, 2019
91a3197
remove PARQUET_ENCRYPTION defines from CMakeLists.txt
thamht4190 Jul 16, 2019
b93d791
fix comments for encryption_internal_nossl.cc
thamht4190 Jul 17, 2019
da1acf1
Format fixes and check that all columns in columnEncryptionProperties…
Jul 17, 2019
ab76ece
Add encryption tests
Jul 18, 2019
657609f
Throw exception when files are missing from parquet-testing repo
Jul 18, 2019
f466781
update parquet_testing submodule with new encrypted files
thamht4190 Jul 19, 2019
55cd2bf
add crypto dependency to R build
Jul 25, 2019
1a508f2
Print location of OpenSSL library
Jul 25, 2019
01b4c48
try adding crypto dependency to R build again
Jul 25, 2019
bccb0fe
add missing crypto deps
Jul 26, 2019
cf74661
fix ci openssl url
Jul 29, 2019
75915e8
add crypt32 lib
Jul 30, 2019
8e148c2
Applying revital's const-fix patch & Addressing Deepak's review comme…
Aug 18, 2019
e9be805
post-rebase change
thamht4190 Aug 20, 2019
9fa1967
fix comments
thamht4190 Aug 20, 2019
cbc3e0e
rename test file using underscore
thamht4190 Aug 21, 2019
1f6479e
fix make lint
thamht4190 Aug 21, 2019
487b329
fix a bad merge in r/configure.win
thamht4190 Aug 24, 2019
40e1e10
merge master to parquet encryption
thamht4190 Sep 4, 2019
72d39d8
merge master to parquet encryption (2)
thamht4190 Sep 10, 2019
861ef2c
add PARQUET_EXPORT to Encryptor, Decryptor
thamht4190 Sep 16, 2019
b6f6b2b
fix errors when encryption is disabled
Sep 23, 2019
bdded5e
do not build encryption support by default when Parquet is built
Sep 23, 2019
ef0583b
specify PARQUET_REQUIRE_ENCRYPTION in doc, build, CI, etc.
Sep 23, 2019
657b886
Merge branch 'master' into master
majetideepak Sep 23, 2019
8e03784
fix format
Sep 24, 2019
f6472ce
refactor column reader
Sep 24, 2019
1a39821
ARROW-6610: [C++] Add cmake option to disable filesystem layer
pitrou Sep 30, 2019
58e1144
ARROW-6564: [Python] Do not require pandas for invoking ChunkedArray.…
jorisvandenbossche Sep 30, 2019
4aaa211
ARROW-6729: [C++] Prevent data copying in StlStringBuffer
st-pasha Sep 30, 2019
c95aaab
ARROW-6646: [Go] Write no IPC buffer metadata for NullType
sbinet Sep 30, 2019
610deb7
ARROW-6685: [C++] Ignore trailing slashes in S3FS
pitrou Sep 30, 2019
df9fc54
ARROW-6740: [C++] Unmap MemoryMappedFile as soon as possible
pitrou Sep 30, 2019
9e0e1a2
ARROW-6708: [C++] Fix hardcoded boost library names
pitrou Sep 30, 2019
98d8a6d
ARROW-6722: [Java] Provide a uniform way to get vector name
liyafan82 Oct 1, 2019
155415c
ARROW-6655: [Python] Filesystem bindings for S3
kszucs Oct 1, 2019
3b262f6
ARROW-6648: [Go] Expose the bitutil package
jsternberg Oct 1, 2019
8231fcb
ARROW-5831: [Release] Add Python program to download binary artifacts…
wesm Oct 1, 2019
871aedb
ARROW-6751: [CI] Fix ccache setup on Travis-CI
pitrou Oct 1, 2019
9694200
ARROW-6745: [Rust] Fix a variety of minor typos.
waywardmonkeys Oct 1, 2019
d75d186
ARROW-6730: [CI] Use GitHub Actions for "C++ with clang 7" docker image
fsaintjacques Oct 2, 2019
e72a0da
ARROW-6752: [Go] make Null array implement Stringer, add tests for Nu…
sbinet Oct 2, 2019
7d18c1c
ARROW-6750: [Python] Silence S3 error logs by default
pitrou Oct 2, 2019
5f93f85
ARROW-6755: [Release] Improve Windows release verification script
wesm Oct 2, 2019
b70f04a
ARROW-6614: [C++][Dataset] Add DataSourceDiscovery class
fsaintjacques Oct 2, 2019
48b56bd
ARROW-6581: [C++] Fix fuzzit job submission
pitrou Oct 2, 2019
fda549a
ARROW-6761: [Rust] Travis build now uses the correct Rust toolchain
andygrove Oct 2, 2019
ad4eccb
ARROW-6777: [GLib][CI] Unpin gobject-introspection gem
kou Oct 3, 2019
5050d87
ARROW-6767: [JS] Lazily bind batches in scan/scanReverse
Oct 3, 2019
1165cdb
ARROW-6686: [CI] Pull and push docker images to speed up the nightly …
kszucs Oct 3, 2019
560a597
ARROW-6770: [CI][Travis] Download Minio quietly
kszucs Oct 3, 2019
f2e8f85
ARROW-6773: [C++] Fix filter kernel when filtering with a boolean Arr…
nealrichardson Oct 3, 2019
31a3259
ARROW-6762: [C++] Support reading JSON files with no newline at end
pitrou Oct 3, 2019
a4738cf
ARROW-6613: [C++] Minimize usage of boost::filesystem
pitrou Oct 3, 2019
227a33f
ARROW-6494: [C++][Dataset] Implement PartitionSchemes
bkietz Oct 3, 2019
b5ccbd2
ARROW-6771: [Packaging][Python] Missing pytest dependency from conda …
kszucs Oct 3, 2019
cc05a89
ARROW-6785: [JS] Remove superfluous child assignment
akre54 Oct 3, 2019
21636fa
ARROW-6744: [Rust] Publicly expose JsonEqual
Oct 3, 2019
d3ba809
ARROW-6091: [Rust] [DataFusion] Implement physical execution plan for…
andygrove Oct 3, 2019
e0efdbd
ARROW-6634: [C++] Vendor Flatbuffers and check in compiled sources
wesm Oct 3, 2019
e9f7457
ARROW-6688: [Packaging] Include s3 support in the conda packages
kszucs Oct 3, 2019
a98a61d
ARROW-3808: [R] Array extract, including Take method
nealrichardson Oct 3, 2019
399ab8f
ARROW-6736: [Rust] [DataFusion] Evaluate the input to the aggregate e…
andygrove Oct 4, 2019
1e2cf1f
ARROW-6580: [Java] Support comparison for unsigned integers
liyafan82 Oct 4, 2019
368562b
ARROW-6657: [Rust] [DataFusion] Add Count Aggregate Expression
sinistersnare Oct 4, 2019
86eaa6b
ARROW-6760: [C++] More informative error messages for JSON parsing er…
bkietz Oct 4, 2019
461ff53
ARROW-6437: [R] Add AWS SDK to Homebrew formulae
nealrichardson Oct 4, 2019
afdb86f
Merge remote-tracking branch 'upstream/master' into PARQUET-1300
Oct 4, 2019
0f6e0e5
refactor ColumnPath
Oct 5, 2019
c0e0d8a
make format
Oct 5, 2019
3275cbe
fix tests
Oct 5, 2019
ed693e8
merge master
Oct 5, 2019
af1bd12
Fix file_reader
Oct 6, 2019
6bc493b
refactor metadata
Oct 7, 2019
fa9683d
make lint
Oct 7, 2019
d26a119
cpp cli lint
Oct 7, 2019
99b9713
fix multi-rowgroup aad
Oct 7, 2019
c59daf7
Merge branch 'master' into master
majetideepak Oct 15, 2019
4e9b9af
Stylistic fixes, remove cruft
wesm Oct 30, 2019
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
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ matrix:
- ARROW_TRAVIS_GANDIVA_JAVA=1
- ARROW_TRAVIS_ORC=1
- ARROW_TRAVIS_PARQUET=1
- ARROW_TRAVIS_PARQUET_ENCRYPTION=1
- ARROW_TRAVIS_PLASMA=1
- ARROW_TRAVIS_S3=1
- ARROW_TRAVIS_USE_SYSTEM_JAVA=1
Expand Down Expand Up @@ -135,6 +136,7 @@ matrix:
- ARROW_TRAVIS_ORC=1
- ARROW_TRAVIS_S3=1
- ARROW_TRAVIS_PARQUET=1
- ARROW_TRAVIS_PARQUET_ENCRYPTION=1
# TODO(ARROW-4763): llvm and llvmdev packages are in conflict:
# https://github.com/conda-forge/llvmdev-feedstock/issues/60
# - ARROW_TRAVIS_GANDIVA=1
Expand Down Expand Up @@ -279,6 +281,7 @@ matrix:
dist: xenial
env:
- ARROW_TRAVIS_PARQUET=1
- ARROW_TRAVIS_PARQUET_ENCRYPTION=1
- ARROW_TRAVIS_USE_SYSTEM=1
- ARROW_TRAVIS_MIMALLOC=1
before_install:
Expand Down
1 change: 1 addition & 0 deletions ci/appveyor-cpp-build-mingw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ cmake ^
-DARROW_WITH_SNAPPY=ON ^
-DARROW_WITH_BROTLI=ON ^
-DARROW_PARQUET=ON ^
-DPARQUET_REQUIRE_ENCRYPTION=ON ^
-DARROW_PYTHON=ON ^
-DARROW_USE_GLOG=OFF ^
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
Expand Down
1 change: 1 addition & 0 deletions ci/cpp-msvc-build-main.bat
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ cmake -G "%GENERATOR%" %CMAKE_ARGS% ^
-DARROW_S3=%ARROW_S3% ^
-DARROW_MIMALLOC=ON ^
-DARROW_PARQUET=ON ^
-DPARQUET_REQUIRE_ENCRYPTION=ON ^
-DPARQUET_BUILD_EXECUTABLES=ON ^
-DARROW_PYTHON=ON ^
.. || exit /B
Expand Down
4 changes: 4 additions & 0 deletions ci/travis_before_script_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ if [ "$ARROW_TRAVIS_PARQUET" == "1" ]; then
-DPARQUET_BUILD_EXECUTABLES=ON"
fi

if [ "$ARROW_TRAVIS_PARQUET_ENCRYPTION" == "1" ]; then
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DPARQUET_REQUIRE_ENCRYPTION=ON"
fi

if [ "$ARROW_TRAVIS_GANDIVA" == "1" ]; then
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_GANDIVA=ON"
if [ "$ARROW_TRAVIS_GANDIVA_JAVA" == "1" ]; then
Expand Down
1 change: 1 addition & 0 deletions ci/travis_script_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ cmake -GNinja \
-DARROW_WITH_SNAPPY=ON \
-DARROW_WITH_BROTLI=ON \
-DARROW_PARQUET=on \
-DPARQUET_REQUIRE_ENCRYPTION=on \
-DARROW_PLASMA=on \
-DARROW_TENSORFLOW=on \
-DARROW_PYTHON=on \
Expand Down
4 changes: 4 additions & 0 deletions ci/windows-pkg-arrow-for-r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ mkdir deps40 && cd deps40
# double-conversion is only available in the Rtools4.0 builds, but apparently that's ok
wget https://dl.bintray.com/rtools/mingw64/mingw-w64-x86_64-double-conversion-3.1.2-1-any.pkg.tar.xz
wget https://dl.bintray.com/rtools/mingw32/mingw-w64-i686-double-conversion-3.1.2-1-any.pkg.tar.xz

wget https://dl.bintray.com/rtools/mingw64/mingw-w64-x86_64-openssl-1.1.1.a-1-any.pkg.tar.xz
wget https://dl.bintray.com/rtools/mingw32/mingw-w64-i686-openssl-1.1.1.a-1-any.pkg.tar.xz

# These are the other Rtools 4.0 packages, for future reference
# wget https://dl.bintray.com/rtools/mingw32/mingw-w64-i686-boost-1.67.0-9002-any.pkg.tar.xz
# wget https://dl.bintray.com/rtools/mingw64/mingw-w64-x86_64-boost-1.67.0-9002-any.pkg.tar.xz
Expand Down
10 changes: 3 additions & 7 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,6 @@ if(ARROW_WITH_BROTLI)
include_directories(SYSTEM ${BROTLI_INCLUDE_DIR})
endif()

set(ARROW_USE_OPENSSL OFF)
if(PARQUET_REQUIRE_ENCRYPTION AND NOT ARROW_PARQUET)
set(PARQUET_REQUIRE_ENCRYPTION OFF)
endif()
Expand All @@ -959,19 +958,16 @@ if(BREW_BIN AND NOT OPENSSL_ROOT_DIR)
set(OPENSSL_ROOT_DIR ${OPENSSL_BREW_PREFIX})
endif()
endif()

set(ARROW_USE_OPENSSL OFF)
if(PARQUET_REQUIRE_ENCRYPTION OR ARROW_FLIGHT OR ARROW_S3)
# This must work
find_package(OpenSSL ${ARROW_OPENSSL_REQUIRED_VERSION} REQUIRED)
set(ARROW_USE_OPENSSL ON)
elseif(ARROW_PARQUET)
# Enable Parquet encryption if OpenSSL is there, but don't fail if it's not
find_package(OpenSSL ${ARROW_OPENSSL_REQUIRED_VERSION} QUIET)
if(OPENSSL_FOUND)
set(ARROW_USE_OPENSSL ON)
endif()
endif()

if(ARROW_USE_OPENSSL)
message(STATUS "Found OpenSSL Crypto Library: ${OPENSSL_CRYPTO_LIBRARY}")
message(STATUS "Building with OpenSSL (Version: ${OPENSSL_VERSION}) support")

# OpenSSL::SSL and OpenSSL::Crypto were not added to
Expand Down
15 changes: 15 additions & 0 deletions cpp/examples/parquet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ add_executable(parquet-arrow-example parquet-arrow/reader-writer.cc)
target_include_directories(parquet-low-level-example PRIVATE low-level-api/)
target_include_directories(parquet-low-level-example2 PRIVATE low-level-api/)

if (PARQUET_REQUIRE_ENCRYPTION)
add_executable(parquet-encryption-example low-level-api/encryption-reader-writer.cc)
add_executable(parquet-encryption-example-all-crypto-options low-level-api/encryption-reader-writer-all-crypto-options.cc)
target_include_directories(parquet-encryption-example PRIVATE low-level-api/)
target_include_directories(parquet-encryption-example-all-crypto-options PRIVATE low-level-api/)
target_link_libraries(parquet-encryption-example parquet_static)
target_link_libraries(parquet-encryption-example-all-crypto-options parquet_static)
endif()

# Prefer shared linkage but use static if shared build is deactivated
if (ARROW_BUILD_SHARED)
set(PARQUET_EXAMPLE_LINK_LIBS parquet_shared)
Expand All @@ -36,3 +45,9 @@ add_dependencies(parquet
parquet-low-level-example
parquet-low-level-example2
parquet-arrow-example)

if (PARQUET_REQUIRE_ENCRYPTION)
add_dependencies(parquet
parquet-encryption-example
parquet-encryption-example-all-crypto-options)
endif()
Loading