aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/dl_group/dl_group.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-11 02:29:39 +0000
committerlloyd <[email protected]>2008-11-11 02:29:39 +0000
commit686f1b30a4a7be70697644a071d50973a547f58e (patch)
treeb646ebda7d30ba41b505a804e9f58ea6253728ad /src/pubkey/dl_group/dl_group.cpp
parent788e47caeff1588bec4a36f4644574b95eda1a7c (diff)
Bubble up use of global algo factory out of DSA parameter gen to DL_Group
Diffstat (limited to 'src/pubkey/dl_group/dl_group.cpp')
-rw-r--r--src/pubkey/dl_group/dl_group.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pubkey/dl_group/dl_group.cpp b/src/pubkey/dl_group/dl_group.cpp
index b37bc238c..d97c86e38 100644
--- a/src/pubkey/dl_group/dl_group.cpp
+++ b/src/pubkey/dl_group/dl_group.cpp
@@ -71,7 +71,9 @@ DL_Group::DL_Group(RandomNumberGenerator& rng,
else
{
qbits = qbits ? qbits : ((pbits == 1024) ? 160 : 256);
- generate_dsa_primes(rng, p, q, pbits, qbits);
+ generate_dsa_primes(rng,
+ global_state().algorithm_factory(),
+ p, q, pbits, qbits);
}
g = make_dsa_generator(p, q);
@@ -86,7 +88,9 @@ DL_Group::DL_Group(RandomNumberGenerator& rng,
DL_Group::DL_Group(RandomNumberGenerator& rng,
const MemoryRegion<byte>& seed, u32bit pbits, u32bit qbits)
{
- if(!generate_dsa_primes(rng, p, q, pbits, qbits, seed))
+ if(!generate_dsa_primes(rng,
+ global_state().algorithm_factory(),
+ p, q, pbits, qbits, seed))
throw Invalid_Argument("DL_Group: The seed given does not "
"generate a DSA group");