aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/crypto/diffie_hellman.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-10-18 11:46:13 +0000
committerMartin Willi <martin@strongswan.org>2006-10-18 11:46:13 +0000
commit60356f3375da67375e48691bb1d732c02d1681a1 (patch)
tree1bfa3bd28d46c4211a17a831094e7fcbceea8bb6 /src/libstrongswan/crypto/diffie_hellman.c
parent8cdce67afa4bc4b4ff1a05e956db08cddc5dc48e (diff)
downloadstrongswan-60356f3375da67375e48691bb1d732c02d1681a1.tar.bz2
strongswan-60356f3375da67375e48691bb1d732c02d1681a1.tar.xz
introduced new logging subsystem using bus:
passive listeners can register on the bus active listeners wait for signals actively multiplexing allows multiple listeners to receive debug signals a lot more...
Diffstat (limited to 'src/libstrongswan/crypto/diffie_hellman.c')
-rw-r--r--src/libstrongswan/crypto/diffie_hellman.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/libstrongswan/crypto/diffie_hellman.c b/src/libstrongswan/crypto/diffie_hellman.c
index fdb508ee9..e4062066c 100644
--- a/src/libstrongswan/crypto/diffie_hellman.c
+++ b/src/libstrongswan/crypto/diffie_hellman.c
@@ -23,29 +23,26 @@
* for more details.
*/
-#include <gmp.h>
-#include <stdio.h>
+#include <gmp.h>
+#include <stdio.h>
#include "diffie_hellman.h"
#include <utils/randomizer.h>
-
-/**
- * String mappings for diffie_hellman_group_t.
- */
-mapping_t diffie_hellman_group_m[] = {
- {MODP_NONE, "MODP_NONE"},
- {MODP_768_BIT, "MODP_768_BIT"},
- {MODP_1024_BIT, "MODP_1024_BIT"},
- {MODP_1536_BIT, "MODP_1536_BIT"},
- {MODP_2048_BIT, "MODP_2048_BIT"},
- {MODP_3072_BIT, "MODP_3072_BIT"},
- {MODP_4096_BIT, "MODP_4096_BIT"},
- {MODP_6144_BIT, "MODP_6144_BIT"},
- {MODP_8192_BIT, "MODP_8192_BIT"},
- {MAPPING_END, NULL}
-};
+ENUM_BEGIN(diffie_hellman_group_names, MODP_NONE, MODP_1024_BIT,
+ "MODP_NONE",
+ "MODP_768_BIT",
+ "MODP_1024_BIT");
+ENUM_NEXT(diffie_hellman_group_names, MODP_1536_BIT, MODP_1536_BIT, MODP_1024_BIT,
+ "MODP_1536_BIT");
+ENUM_NEXT(diffie_hellman_group_names, MODP_2048_BIT, MODP_8192_BIT, MODP_1536_BIT,
+ "MODP_2048_BIT",
+ "MODP_3072_BIT",
+ "MODP_4096_BIT",
+ "MODP_6144_BIT",
+ "MODP_8192_BIT");
+ENUM_END(diffie_hellman_group_names, MODP_8192_BIT);
/**