aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2010-03-31 17:28:46 +0200
committerTobias Brunner <tobias@strongswan.org>2010-04-06 12:47:40 +0200
commit8b0e09103b5e7e55b20380c44f093b1cef95480c (patch)
tree2b231876b34c525a20ad2b5fc15d8aabb57eba99 /src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c
parent9ed6341d3f1f48c9528a21b9d2da83bfc05bb756 (diff)
downloadstrongswan-8b0e09103b5e7e55b20380c44f093b1cef95480c.tar.bz2
strongswan-8b0e09103b5e7e55b20380c44f093b1cef95480c.tar.xz
Adding DBG_LIB to all calls of libstrongswan's version of DBG*.
Diffstat (limited to 'src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c')
-rw-r--r--src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c b/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c
index f4808f2d4..056bdaac5 100644
--- a/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c
+++ b/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c
@@ -119,7 +119,8 @@ static void set_other_public_value(private_gmp_diffie_hellman_t *this, chunk_t v
}
else
{
- DBG1("public DH value verification failed: y ^ q mod p != 1");
+ DBG1(DBG_LIB, "public DH value verification failed:"
+ " y ^ q mod p != 1");
}
mpz_clear(one);
#else
@@ -129,7 +130,8 @@ static void set_other_public_value(private_gmp_diffie_hellman_t *this, chunk_t v
}
else
{
- DBG1("public DH value verification failed: y < 2 || y > p - 1 ");
+ DBG1(DBG_LIB, "public DH value verification failed:"
+ " y < 2 || y > p - 1 ");
}
mpz_clear(p_min_1);
}
@@ -228,7 +230,8 @@ gmp_diffie_hellman_t *gmp_diffie_hellman_create(diffie_hellman_group_t group)
rng = lib->crypto->create_rng(lib->crypto, RNG_STRONG);
if (!rng)
{
- DBG1("no RNG found for quality %N", rng_quality_names, RNG_STRONG);
+ DBG1(DBG_LIB, "no RNG found for quality %N", rng_quality_names,
+ RNG_STRONG);
destroy(this);
return NULL;
}
@@ -243,7 +246,8 @@ gmp_diffie_hellman_t *gmp_diffie_hellman_create(diffie_hellman_group_t group)
}
mpz_import(this->xa, random.len, 1, 1, 1, 0, random.ptr);
chunk_free(&random);
- DBG2("size of DH secret exponent: %u bits", mpz_sizeinbase(this->xa, 2));
+ DBG2(DBG_LIB, "size of DH secret exponent: %u bits",
+ mpz_sizeinbase(this->xa, 2));
mpz_powm(this->ya, this->g, this->xa, this->p);