mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kwalletd: use definition to check the password hash size
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4d67708b98
commit
df4c601719
3 changed files with 4 additions and 3 deletions
|
@ -147,7 +147,7 @@ int Backend::openPreHashed(const QByteArray &passwordHash)
|
|||
}
|
||||
|
||||
// check the password hash for correct size (currently fixed)
|
||||
if (passwordHash.size() != 20 && passwordHash.size() != 128) {
|
||||
if (passwordHash.size() != KWALLET_SHA512_KEYSIZE) {
|
||||
return -42; // unsupported encryption scheme
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include "kwalletentry.h"
|
||||
#include "backendpersisthandler.h"
|
||||
|
||||
#define KWALLET_SHA512_KEYSIZE 128
|
||||
|
||||
namespace KWallet {
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,10 +32,9 @@
|
|||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
#include "kwalletd.h"
|
||||
#include "backend/kwalletbackend.h" //For the hash size
|
||||
#include "backend/kwalletbackend.h" // For the hash size
|
||||
|
||||
#define BSIZE 1000
|
||||
#define KWALLET_SHA512_KEYSIZE 128
|
||||
|
||||
static int pipefd = 0;
|
||||
static int socketfd = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue