mirror of
https://github.com/vgough/encfs.git
synced 2025-06-20 11:47:58 +02: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>
|
#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>
|
#include <google/protobuf/text_format.h>
|
||||||
|
|
||||||
#ifdef HAVE_TR1_UNORDERED_SET
|
#ifdef HAVE_TR1_UNORDERED_SET
|
||||||
@ -210,6 +202,8 @@ bool runTests(const shared_ptr<CipherV1> &cipher, bool verbose)
|
|||||||
cipher->setKey(encodingKey);
|
cipher->setKey(encodingKey);
|
||||||
cipher->writeKey( key, keyBuf );
|
cipher->writeKey( key, keyBuf );
|
||||||
CipherKey key2 = cipher->readKey( keyBuf, true );
|
CipherKey key2 = cipher->readKey( keyBuf, true );
|
||||||
|
delete[] keyBuf;
|
||||||
|
|
||||||
if(!key2.valid())
|
if(!key2.valid())
|
||||||
{
|
{
|
||||||
if(verbose)
|
if(verbose)
|
||||||
@ -247,6 +241,8 @@ bool runTests(const shared_ptr<CipherV1> &cipher, bool verbose)
|
|||||||
encryptedKey->set_ciphertext( keyBuf, encodedKeySize );
|
encryptedKey->set_ciphertext( keyBuf, encodedKeySize );
|
||||||
cfg.set_block_size(FSBlockSize);
|
cfg.set_block_size(FSBlockSize);
|
||||||
|
|
||||||
|
delete[] keyBuf;
|
||||||
|
|
||||||
// save config
|
// save config
|
||||||
string data;
|
string data;
|
||||||
google::protobuf::TextFormat::PrintToString(cfg, &data);
|
google::protobuf::TextFormat::PrintToString(cfg, &data);
|
||||||
@ -474,17 +470,8 @@ int main(int argc, char *argv[])
|
|||||||
google::InitGoogleLogging(argv[0]);
|
google::InitGoogleLogging(argv[0]);
|
||||||
google::InstallFailureSignalHandler();
|
google::InstallFailureSignalHandler();
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
bool isThreaded = false;
|
||||||
SSL_load_error_strings();
|
CipherV1::init(isThreaded);
|
||||||
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
|
|
||||||
|
|
||||||
srand( time(0) );
|
srand( time(0) );
|
||||||
|
|
||||||
@ -550,6 +537,8 @@ int main(int argc, char *argv[])
|
|||||||
runTests( cipher, true );
|
runTests( cipher, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CipherV1::shutdown(isThreaded);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,11 +45,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
|
||||||
#define NO_DES
|
|
||||||
#include <openssl/ssl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace encfs;
|
using namespace encfs;
|
||||||
using gnu::autosprintf;
|
using gnu::autosprintf;
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
@ -864,10 +859,8 @@ int main(int argc, char **argv)
|
|||||||
textdomain( PACKAGE );
|
textdomain( PACKAGE );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
bool isThreaded = false;
|
||||||
SSL_load_error_strings();
|
CipherV1::init(isThreaded);
|
||||||
SSL_library_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(argc < 2)
|
if(argc < 2)
|
||||||
{
|
{
|
||||||
@ -907,5 +900,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CipherV1::shutdown(isThreaded);
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user