[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU shishi branch, master, updated. shishi-0-0-40-21-g270d193
From: |
Simon Josefsson |
Subject: |
[SCM] GNU shishi branch, master, updated. shishi-0-0-40-21-g270d193 |
Date: |
Tue, 12 Jan 2010 18:04:59 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU shishi".
http://git.savannah.gnu.org/cgit/shishi.git/commit/?id=270d193e03654f0d4ac2d11e585e875e7b7e652e
The branch, master has been updated
via 270d193e03654f0d4ac2d11e585e875e7b7e652e (commit)
from 2b6ec59e6b6805d98c924073197696c6451c6581 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 270d193e03654f0d4ac2d11e585e875e7b7e652e
Author: Simon Josefsson <address@hidden>
Date: Tue Jan 12 19:04:54 2010 +0100
Add a quick-random configuration keyword.
-----------------------------------------------------------------------
Summary of changes:
NEWS | 4 +++-
lib/cfg.c | 8 ++++++++
lib/low-crypto.c | 8 +++++++-
lib/low-crypto.h | 3 ++-
shishi.conf.in | 4 ++++
5 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index 5a8eff2..37394bf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,11 @@
Shishi NEWS -- History of user-visible changes. -*- outline -*-
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson
+Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Simon
Josefsson
See the end for copying conditions.
* Version 0.0.41 (unreleased)
+** Add configuration keyword 'quick-random' to speed up libgcrypt.
+
** API and ABI modifications:
No changes since last version.
diff --git a/lib/cfg.c b/lib/cfg.c
index 1c15379..b2992a4 100644
--- a/lib/cfg.c
+++ b/lib/cfg.c
@@ -25,6 +25,8 @@
/* Get prototypes. */
#include "cfg.h"
+#include "low-crypto.h"
+
#define KDC_SERVICE_PORT "\x6b\x65\x72\x62\x65\x72\x6f\x73"
enum
@@ -45,6 +47,7 @@ enum
VERBOSE_NOISE_OPTION,
VERBOSE_OPTION,
STRINGPROCESS_OPTION,
+ QUICK_RANDOM,
THE_END
};
@@ -65,6 +68,7 @@ static const char * const _shishi_opts[] = {
/* [VERBOSE_NOISE_OPTION] = */ "verbose-noise",
/* [VERBOSE_OPTION] = */ "verbose",
/* [STRINGPROCESS_OPTION] = */ "stringprocess",
+ /* [QUICK_RANDOM] = */ "quick-random",
/* [THE_END] = */ NULL
};
@@ -237,6 +241,10 @@ shishi_cfg (Shishi * handle, const char *option)
handle->stringprocess = xstrdup (value);
break;
+ case QUICK_RANDOM:
+ _shishi_quick_random ();
+ break;
+
case VERBOSE_OPTION:
handle->verbose = value && atoi (value) ? atoi (value) :
~0 & ~VERBOSES;
diff --git a/lib/low-crypto.c b/lib/low-crypto.c
index 0fc2807..0507f99 100644
--- a/lib/low-crypto.c
+++ b/lib/low-crypto.c
@@ -1,5 +1,5 @@
/* low-crypto.c --- Shishi crypto wrappers around generic crypto.
- * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 Simon
Josefsson
*
* This file is part of Shishi.
*
@@ -38,6 +38,12 @@ _shishi_crypto_init (Shishi * handle)
return SHISHI_OK;
}
+void
+_shishi_quick_random (void)
+{
+ gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+}
+
/**
* shishi_randomize:
* @handle: shishi handle as allocated by shishi_init().
diff --git a/lib/low-crypto.h b/lib/low-crypto.h
index 8c08203..b6d9705 100644
--- a/lib/low-crypto.h
+++ b/lib/low-crypto.h
@@ -1,5 +1,5 @@
/* low-crypto.h --- Crypto initialization prototypes.
- * Copyright (C) 2002, 2003, 2004, 2007, 2008 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2007, 2008, 2010 Simon Josefsson
*
* This file is part of Shishi.
*
@@ -24,5 +24,6 @@
#define LOW_CRYPTO_H
int _shishi_crypto_init (Shishi * handle);
+void _shishi_quick_random (void);
#endif
diff --git a/shishi.conf.in b/shishi.conf.in
index 1745028..da109a7 100644
--- a/shishi.conf.in
+++ b/shishi.conf.in
@@ -119,4 +119,8 @@ stringprocess=UTF-8
#renew-life=friday 17:00
#renew-life=sunday
+# Setup libgcrypt to use quicker entropy generation. If you want to
+# use /dev/random instead of /dev/urandom, uncomment this.
+quick-random
+
# System configuration file ends here
hooks/post-receive
--
GNU shishi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU shishi branch, master, updated. shishi-0-0-40-21-g270d193,
Simon Josefsson <=