Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mostly compiling version of env_encrypt_2.h ... one std::move error ... fix next * cleans up build (must add export EXTRA_LDFLAGS=-lcrypto -lssl manually) * hmm, somebody messed with SYNC_POINT defines ... and made debug unbuildable ... unit tests too * Add the original encryption Env to the env_basic_test unit test suite. * I lied. Forced to clean up Java style code in env_encryption by moving declaration half to env_encryption.h to be able to unit test new OpenSSL encryption. What a pain. * Going back to original layout. Rebuilt env_encryption.h/.cc into proper C++ declaration / definition split to allow proper inheritance (resuse). * first batch of tests, other than one for file size, work with new encryption code that does not yet encrypt (infrastructure validation). * ok, GetFileSize() corrected (slow but corrected). Considering whether or not to do same for GetChildrenFileAttributes * and add GetChildrenFileAttributes() update * Activate AESBlockAccessCipherStream. Remove dead code from original copying of env_encryption.cc. Unit test works. * change unique_ptr with deleter to traditional pointer code. Circle build did not want to compile it. And add some error checking to EncryptBlock() * use EVP_MD_CTX_create/destroy instead of new/free. This is openssl 1.0 syntax that is compatible in openssl 1.1 * move the definition of Sha1Description_t(std::string &) to .cc file in hopes of eliminating link issues in starrocks unit tests * again move some AES stuff from .h to .cc * add helper constructor to AesCtrKey_t (NOT TESTED). add IsValid() to Sha1Description and AesCtrKey_t * attempt to make initialization easier with Sha1Description_t as const. * const was a really bad idea * need explicit copy constructor with move disabled * removed delete of move constructor ... removal seems suspect * add env_encrypt_2_test to builds. Test Sha1Description_t. * saving for safety. first NIST AES case matches. code is in hack state. will clean and add other cases tomorrow. * code clean up within EncryptBlock. push to see if circle compiles * add remaining NIST cases. * added operator== for unit testing * remove non-portable byteswap.h ... not using it anymore ... and breaks OSX build * attempt include fix for osx * make openssl dependency OS specific * backport files used in Facebook/rocksdb PR * rename our env_encrypt_2 to more rocksdb-like env_encrypt2 * create conditional build of EnvEncrypt2 based on flag ROCKSDB_OPENSSL_AES_CTR * linux library loader code. not integrated. not yet supporting OSX * Linux library load ready for libcrypto SHA1 and RAND functions (includes unit tests). AES CTR functions next. * Add remaining functions from libcrypto that are used in EncryptedEnv2 * slight change to have .dylib names instead of .so names on OSX build * Create EncryptedEnv2::WriteKey_t and ReadKeys_t to simplify look of code. * create EncryptedEnv2::Default() to help time static loading of libcrypto. * clang-format applied * remove conditional openssl from OSX build * hmm, missed removing include files for openssl * Revert "hmm, missed removing include files for openssl" This reverts commit e22a1f6. * Revert "remove conditional openssl from OSX build" This reverts commit 4eef8d4. * address PR comments from Alex Co-authored-by: matthewvon <[email protected]> Co-authored-by: MatthewVon <[email protected]>
- Loading branch information