diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-15 17:39:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-15 17:39:44 +0100 |
commit | ca8612b6db0b40c801ab8cb0a6fdf80af90c657e (patch) | |
tree | fbf7e455167e34e2d0f6a1ac2d699ed490291b8c /src | |
parent | ee2180b144eea0b73fd615101ffb3d315d48a2c8 (diff) |
documenting
Diffstat (limited to 'src')
-rw-r--r-- | src/mint/key_io.c | 65 | ||||
-rw-r--r-- | src/mint/key_io.h | 18 |
2 files changed, 76 insertions, 7 deletions
diff --git a/src/mint/key_io.c b/src/mint/key_io.c index ee9bc1332..928d51db3 100644 --- a/src/mint/key_io.c +++ b/src/mint/key_io.c @@ -21,18 +21,39 @@ * @author Benedikt Mueller * @author Sree Harsha Totakura * @author Christian Grothoff + * + * TODO: + * - document better + * - revisit IO with respect to variable-size RSA keys! */ #include "platform.h" #include "key_io.h" - +/** + * + */ struct SignkeysIterateContext { + + /** + * + */ TALER_MINT_SignkeyIterator it; + + /** + * + */ void *it_cls; }; +/** + * + * + * @param cls + * @param filename + * @return + */ static int signkeys_iterate_dir_iter (void *cls, const char *filename) @@ -181,19 +202,40 @@ TALER_MINT_write_denom_key (const char *filename, } +/** + * + */ struct DenomkeysIterateContext { + + /** + * + */ const char *alias; + + /** + * + */ TALER_MINT_DenomkeyIterator it; + + /** + * + */ void *it_cls; }; +/** + * + * + * @param cls + * @param filename + * @return + */ static int denomkeys_iterate_keydir_iter (void *cls, const char *filename) { - struct DenomkeysIterateContext *dic = cls; struct TALER_MINT_DenomKeyIssuePriv issue; @@ -206,10 +248,19 @@ denomkeys_iterate_keydir_iter (void *cls, filename); return GNUNET_OK; } - return dic->it (dic->it_cls, dic->alias, &issue); + return dic->it (dic->it_cls, + dic->alias, + &issue); } +/** + * + * + * @param cls + * @param filename + * @return + */ static int denomkeys_iterate_topdir_iter (void *cls, const char *filename) @@ -229,7 +280,8 @@ denomkeys_iterate_topdir_iter (void *cls, int TALER_MINT_denomkeys_iterate (const char *mint_base_dir, - TALER_MINT_DenomkeyIterator it, void *cls) + TALER_MINT_DenomkeyIterator it, + void *it_cls) { char *dir; size_t len; @@ -241,7 +293,7 @@ TALER_MINT_denomkeys_iterate (const char *mint_base_dir, GNUNET_assert (len > 0); dic.it = it; - dic.it_cls = cls; + dic.it_cls = it_cls; // scan over alias dirs return GNUNET_DISK_directory_scan (dir, @@ -250,5 +302,4 @@ TALER_MINT_denomkeys_iterate (const char *mint_base_dir, } - -/* end of mint_common.c */ +/* end of key_io.c */ diff --git a/src/mint/key_io.h b/src/mint/key_io.h index 85c0166da..ae7f183e4 100644 --- a/src/mint/key_io.h +++ b/src/mint/key_io.h @@ -29,9 +29,17 @@ #include <gnunet/gnunet_util_lib.h> #include "taler_signatures.h" +/** + * + */ #define DIR_SIGNKEYS "signkeys" + +/** + * + */ #define DIR_DENOMKEYS "denomkeys" + /** * On disk format used for a mint signing key. * Includes the private key followed by the signed @@ -104,6 +112,11 @@ typedef int /** * FIXME + * + * @param mint_base_dir + * @param it + * @param it_cls closure for @a it + * @return */ int TALER_MINT_signkeys_iterate (const char *mint_base_dir, @@ -113,6 +126,11 @@ TALER_MINT_signkeys_iterate (const char *mint_base_dir, /** * FIXME + * + * @param mint_base_dir + * @param it + * @param it_cls closure for @a it + * @return */ int TALER_MINT_denomkeys_iterate (const char *mint_base_dir, |