mirror of
https://github.com/vgough/encfs.git
synced 2025-06-20 03:37:50 +02:00
fix cipher initialization
git-svn-id: http://encfs.googlecode.com/svn/trunk@110 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
c44b208078
commit
1e6b715380
@ -358,8 +358,9 @@ CipherKey CipherV1::newKey(const char *password, int passwdLength,
|
|||||||
{
|
{
|
||||||
LOG(ERROR) << "openssl error, PBKDF2 failed";
|
LOG(ERROR) << "openssl error, PBKDF2 failed";
|
||||||
return CipherKey();
|
return CipherKey();
|
||||||
} else
|
} else {
|
||||||
*iterationCount = res;
|
*iterationCount = res;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
// known iteration length
|
// known iteration length
|
||||||
@ -574,7 +575,6 @@ int CipherV1::keySize() const
|
|||||||
|
|
||||||
int CipherV1::cipherBlockSize() const
|
int CipherV1::cipherBlockSize() const
|
||||||
{
|
{
|
||||||
rAssert( _keySet );
|
|
||||||
return _blockCipher->blockSize();
|
return _blockCipher->blockSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1170,7 +1170,8 @@ RootPtr createConfig( EncFS_Context *ctx,
|
|||||||
|
|
||||||
void showFSInfo( const EncfsConfig &config )
|
void showFSInfo( const EncfsConfig &config )
|
||||||
{
|
{
|
||||||
shared_ptr<CipherV1> cipher = CipherV1::New( config.cipher(), -1 );
|
shared_ptr<CipherV1> cipher = CipherV1::New( config.cipher(),
|
||||||
|
config.key().size() );
|
||||||
{
|
{
|
||||||
cout << autosprintf(
|
cout << autosprintf(
|
||||||
// xgroup(diag)
|
// xgroup(diag)
|
||||||
@ -1204,11 +1205,6 @@ void showFSInfo( const EncfsConfig &config )
|
|||||||
cout << "\n";
|
cout << "\n";
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
// Set a null key - the cipher won't work, but it will at least know the
|
|
||||||
// key size and blocksize.
|
|
||||||
CipherKey tmpKey(config.key().size());
|
|
||||||
cipher->setKey(tmpKey);
|
|
||||||
|
|
||||||
// check if we support the filename encoding interface..
|
// check if we support the filename encoding interface..
|
||||||
shared_ptr<NameIO> nameCoder = NameIO::New( config.naming(), cipher );
|
shared_ptr<NameIO> nameCoder = NameIO::New( config.naming(), cipher );
|
||||||
if(!nameCoder)
|
if(!nameCoder)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user