gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libfints] 01/03: init method takes key dir in args.


From: gnunet
Subject: [GNUnet-SVN] [libfints] 01/03: init method takes key dir in args.
Date: Fri, 12 Oct 2018 09:55:33 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository libfints.

commit 719d7d83b5f32fd3c2f74af5bfa0c89e93b8692a
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Oct 12 09:37:51 2018 +0200

    init method takes key dir in args.
---
 src/libebics.c | 20 +++++++++++++-------
 src/libebics.h |  4 +++-
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/libebics.c b/src/libebics.c
index ee145fb..3af8d4c 100644
--- a/src/libebics.c
+++ b/src/libebics.c
@@ -271,10 +271,10 @@ free_zlib ()
  *          EBICS_ERROR on non critical errors
  *          and EBICS_FATAL else.
  */
-int
-EBICS_init_keymaterial (struct EBICS_Key keyList[],
-                        char *keyDir,
-                        const char *keyFiles[])
+static int
+init_keymaterial (struct EBICS_Key keyList[],
+                  const char *keyDir,
+                  const char *keyFiles[])
 {
   int retv;
   int result = EBICS_SUCCESS;
@@ -514,12 +514,18 @@ free_genex_documents (struct EBICS_genex_document 
genexList[])
  * as well as it allocates the "genex" templates to
  * be copied and instantiated during the library life.
  *
+ * @param key_dir directory where keys to be imported
+ *        are located.
  * @return EBICS_SUCCESS or EBICS_ERROR.
  */
 int
-EBICS_init_library ()
+EBICS_init_library (const char *key_dir)
 {
   int retv;
+
+  /**
+   * Directory where XML templates are stored.
+   */
   char *data_dir;
 
   const char *genexFilenames[EBICS_GENEX_MAX_ENTRIES] = {
@@ -571,9 +577,9 @@ EBICS_init_library ()
     return EBICS_ERROR;
   }
 
-  if (EBICS_SUCCESS != EBICS_init_keymaterial
+  if (EBICS_SUCCESS != init_keymaterial
       (keyList,
-       data_dir,
+       key_dir,
        keyFilenames))
   {
     GNUNET_break (0);
diff --git a/src/libebics.h b/src/libebics.h
index 50eb167..57cce3a 100644
--- a/src/libebics.h
+++ b/src/libebics.h
@@ -52,10 +52,12 @@
  * as well as it allocates the "genex" templates to
  * be copied and instantiated during the library life.
  *
+ * @param key_dir directory where keys to be imported
+ *        are located.
  * @return EBICS_SUCCESS or EBICS_ERROR.
  */
 int
-EBICS_init_library ();
+EBICS_init_library (const char *key_dir);
 
 
 /**

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]