summaryrefslogtreecommitdiffabout
path: root/pwmanager
Side-by-side diff
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/libcrypt/cipher/serpent.c4
-rw-r--r--pwmanager/pwmanager/binentrygen.cpp5
-rw-r--r--pwmanager/pwmanager/binentrygen.h2
-rw-r--r--pwmanager/pwmanager/blowfish.cpp2
-rw-r--r--pwmanager/pwmanager/blowfish.h4
-rw-r--r--pwmanager/pwmanager/genpasswd.cpp1
-rw-r--r--pwmanager/pwmanager/libgcryptif.h4
-rw-r--r--pwmanager/pwmanager/pwmexception.h3
-rw-r--r--pwmanager/pwmanager/randomizer.h1
9 files changed, 17 insertions, 9 deletions
diff --git a/pwmanager/libcrypt/cipher/serpent.c b/pwmanager/libcrypt/cipher/serpent.c
index d606d9f..fb5df20 100644
--- a/pwmanager/libcrypt/cipher/serpent.c
+++ b/pwmanager/libcrypt/cipher/serpent.c
@@ -668,31 +668,31 @@ serpent_setkey_internal (serpent_context_t *context,
const byte_t *key, unsigned int key_length)
{
serpent_key_t key_prepared;
serpent_key_prepare (key, key_length, key_prepared);
serpent_subkeys_generate (key_prepared, context->keys);
_gcry_burn_stack (272 * sizeof (u32_t));
}
-
+ static const char *serpent_test (void);
/* Initialize CTX with the key KEY of KEY_LENGTH bytes. */
static gcry_err_code_t
serpent_setkey (void *ctx,
const byte_t *key, unsigned int key_length)
{
serpent_context_t *context = ctx;
static const char *serpent_test_ret;
static int serpent_init_done;
gcry_err_code_t ret = GPG_ERR_NO_ERROR;
if (! serpent_init_done)
{
/* Execute a self-test the first time, Serpent is used. */
- static const char *serpent_test (void);
+
serpent_test_ret = serpent_test ();
if (serpent_test_ret)
log_error ("Serpent test failure: %s\n", serpent_test_ret);
serpent_init_done = 1;
}
if (serpent_test_ret)
diff --git a/pwmanager/pwmanager/binentrygen.cpp b/pwmanager/pwmanager/binentrygen.cpp
index 7d5ae45..f156a5e 100644
--- a/pwmanager/pwmanager/binentrygen.cpp
+++ b/pwmanager/pwmanager/binentrygen.cpp
@@ -12,21 +12,21 @@
/***************************************************************************
* copyright (C) 2004 by Ulf Schenk
* This file is originaly based on version 1.0.1 of pwmanager
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
-
#include "binentrygen.h"
#include "base64.h"
-#include "pwmexception.h"
+#include "pwmexception.h"
+#include "globalstuff.h"
void BinEntryGen::encode(const QByteArray &data,
PwMDataItem *ret,
DataType type)
{
ret->clear();
ret->name = tostr(static_cast<int>(type));
ret->binary = true;
@@ -64,8 +64,9 @@ void BinEntryGen::decode(const PwMDataItem &data,
BinEntryGen::DataType BinEntryGen::binType(const PwMDataItem &data)
{
if (!data.binary)
return None;
int type = strtol(data.name.c_str(), 0, 10);
return (static_cast<DataType>(type));
}
+
diff --git a/pwmanager/pwmanager/binentrygen.h b/pwmanager/pwmanager/binentrygen.h
index a58cd42..49288aa 100644
--- a/pwmanager/pwmanager/binentrygen.h
+++ b/pwmanager/pwmanager/binentrygen.h
@@ -15,20 +15,20 @@
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#ifndef __BINENTRYGEN_H
#define __BINENTRYGEN_H
-#include "pwmdoc.h"
#include <qcstring.h>
+#include "pwmdoc.h"
/** Binary entry generator.
* This generator generates a normal struct PwMDataItem
* from binary data (using base64 encoding).
* This mechanism is used to support the binary interface functions
* of the KWallet emulation, for example.
*
* The format of the encoded binary data as a PwMDataItem is as follows:
diff --git a/pwmanager/pwmanager/blowfish.cpp b/pwmanager/pwmanager/blowfish.cpp
index 2ca58ce..ee29756 100644
--- a/pwmanager/pwmanager/blowfish.cpp
+++ b/pwmanager/pwmanager/blowfish.cpp
@@ -38,19 +38,19 @@
*
* $Id$
**************************************************************************/
#include <string.h>
#include <stdlib.h>
-#include "blowfish.h"
#include "globalstuff.h"
+#include "blowfish.h"
/* precomputed S boxes */
static const uint32_t ks0[256] = {
0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, 0xB8E1AFED, 0x6A267E96,
0xBA7C9045, 0xF12C7F99, 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16,
0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, 0x0D95748F, 0x728EB658,
0x718BCD58, 0x82154AEE, 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013,
0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, 0x8E79DCB0, 0x603A180E,
diff --git a/pwmanager/pwmanager/blowfish.h b/pwmanager/pwmanager/blowfish.h
index 5129eab..862cccb 100644
--- a/pwmanager/pwmanager/blowfish.h
+++ b/pwmanager/pwmanager/blowfish.h
@@ -18,17 +18,17 @@
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#ifndef BLOWFISH_H
#define BLOWFISH_H
-#include "pwmexception.h"
+//#include "pwmexception.h"
#ifndef _WIN32_
#include <stdint.h>
#else
#endif
#include <string>
using std::string;
@@ -39,16 +39,18 @@ using std::string;
#ifndef _WIN32_
typedef uint8_t byte;
#else
#define uint8_t Q_UINT8
#define byte Q_UINT8
#define uint32_t Q_UINT32
#endif
+//#include "pwmexception.h"
+
/** blowfish encryption algorithm.
* Derived from libgcrypt-1.1.12
*/
class Blowfish
{
struct BLOWFISH_context
{
uint32_t s0[256];
diff --git a/pwmanager/pwmanager/genpasswd.cpp b/pwmanager/pwmanager/genpasswd.cpp
index b0cceff..41078b3 100644
--- a/pwmanager/pwmanager/genpasswd.cpp
+++ b/pwmanager/pwmanager/genpasswd.cpp
@@ -15,16 +15,17 @@
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#include "genpasswd.h"
#include "pwmexception.h"
#include "randomizer.h"
+#include "globalstuff.h"
/* how often can a char of the same charset be reused in order */
#define FILTER_MAX_CHARSET_REUSE 3
/* re-randomize all charsets on every iteration (0/1) */
#define RERAND_CHARSET 0
diff --git a/pwmanager/pwmanager/libgcryptif.h b/pwmanager/pwmanager/libgcryptif.h
index 9a987a2..a08d678 100644
--- a/pwmanager/pwmanager/libgcryptif.h
+++ b/pwmanager/pwmanager/libgcryptif.h
@@ -19,32 +19,34 @@
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#ifndef __LIBGCRYPTIF_H
#define __LIBGCRYPTIF_H
-#include "pwmexception.h"
//#undef CONFIG_PWMANAGER_GCRY // for debugging only.
#ifdef CONFIG_PWMANAGER_GCRY
#include <stddef.h>
#include <sys/types.h>
#ifndef _WIN32_
#include <stdint.h>
#else
#define uint8_t Q_UINT8
#define byte Q_UINT8
#define uint32_t Q_UINT32
#endif
#define STRING2KEY_SALTLEN 8
+#include "pwmexception.h"
+
+
/** interface class for the libgcrypt cipher and hash algorithms
* NOTE: Always allocate 1024 extra bytes for the inBuf (for padding)
*/
class LibGCryptIf
{
protected:
struct STRING2KEY
{
diff --git a/pwmanager/pwmanager/pwmexception.h b/pwmanager/pwmanager/pwmexception.h
index 301ebd7..7f5a3a6 100644
--- a/pwmanager/pwmanager/pwmexception.h
+++ b/pwmanager/pwmanager/pwmexception.h
@@ -15,17 +15,17 @@
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#ifndef __PWMEXCEPTION_H
#define __PWMEXCEPTION_H
-#include "globalstuff.h"
+//#include "globalstuff.h"
#include <iostream>
#include <string>
using std::string;
using std::cerr;
using std::cout;
using std::endl;
@@ -209,9 +209,10 @@ void __printError(const string &msg);
#else
# define printDebug(x) do { } while (0)
#endif
#define printInfo(x) __printInfo(x)
#define printWarn(x) __printWarn(x)
#define printError(x) __printError(x)
+#include "globalstuff.h"
#endif // __PWMEXCEPTION_H
diff --git a/pwmanager/pwmanager/randomizer.h b/pwmanager/pwmanager/randomizer.h
index f2a6015..44cc28e 100644
--- a/pwmanager/pwmanager/randomizer.h
+++ b/pwmanager/pwmanager/randomizer.h
@@ -16,16 +16,17 @@
*
* $Id$
**************************************************************************/
#ifndef __RANDOMIZER_H
#define __RANDOMIZER_H
#include "pwmexception.h"
+#include "globalstuff.h"
#ifndef PWM_EMBEDDED
#include <qmutex.h>
#endif
#include <string>
using std::string;