mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
replace OpenSSL references with CipherV1::init
git-svn-id: http://encfs.googlecode.com/svn/trunk@111 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
1e6b715380
commit
b59d806e4b
@ -36,14 +36,6 @@
|
||||
|
||||
#include <glog/logging.h>
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
#define NO_DES
|
||||
#include <openssl/ssl.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/text_format.h>
|
||||
|
||||
#ifdef HAVE_TR1_UNORDERED_SET
|
||||
@ -210,6 +202,8 @@ bool runTests(const shared_ptr<CipherV1> &cipher, bool verbose)
|
||||
cipher->setKey(encodingKey);
|
||||
cipher->writeKey( key, keyBuf );
|
||||
CipherKey key2 = cipher->readKey( keyBuf, true );
|
||||
delete[] keyBuf;
|
||||
|
||||
if(!key2.valid())
|
||||
{
|
||||
if(verbose)
|
||||
@ -247,6 +241,8 @@ bool runTests(const shared_ptr<CipherV1> &cipher, bool verbose)
|
||||
encryptedKey->set_ciphertext( keyBuf, encodedKeySize );
|
||||
cfg.set_block_size(FSBlockSize);
|
||||
|
||||
delete[] keyBuf;
|
||||
|
||||
// save config
|
||||
string data;
|
||||
google::protobuf::TextFormat::PrintToString(cfg, &data);
|
||||
@ -474,17 +470,8 @@ int main(int argc, char *argv[])
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
google::InstallFailureSignalHandler();
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
SSL_load_error_strings();
|
||||
SSL_library_init();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE_load_builtin_engines();
|
||||
ENGINE_register_all_ciphers();
|
||||
ENGINE_register_all_digests();
|
||||
ENGINE_register_all_RAND();
|
||||
#endif
|
||||
#endif
|
||||
bool isThreaded = false;
|
||||
CipherV1::init(isThreaded);
|
||||
|
||||
srand( time(0) );
|
||||
|
||||
@ -550,6 +537,8 @@ int main(int argc, char *argv[])
|
||||
runTests( cipher, true );
|
||||
}
|
||||
|
||||
CipherV1::shutdown(isThreaded);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -45,11 +45,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
#define NO_DES
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
|
||||
using namespace encfs;
|
||||
using gnu::autosprintf;
|
||||
using std::cerr;
|
||||
@ -864,10 +859,8 @@ int main(int argc, char **argv)
|
||||
textdomain( PACKAGE );
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
SSL_load_error_strings();
|
||||
SSL_library_init();
|
||||
#endif
|
||||
bool isThreaded = false;
|
||||
CipherV1::init(isThreaded);
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
@ -907,5 +900,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
CipherV1::shutdown(isThreaded);
|
||||
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user