summaryrefslogtreecommitdiff
path: root/src/reclaim/pabc_helper.h
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-02-22 10:16:16 +0100
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-04-24 00:56:26 +0200
commit3cd24823660a0447e590ff352e9da7eb076b292b (patch)
tree7e6feb37058bd9885ef0447d38c2fb77f6f97c57 /src/reclaim/pabc_helper.h
parent8d48dbafe69193f8a23765154be1f7db851bfa1c (diff)
RECLAIM: Added libpabc credential support.dev/schanzen/pabc
Diffstat (limited to 'src/reclaim/pabc_helper.h')
-rw-r--r--src/reclaim/pabc_helper.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/reclaim/pabc_helper.h b/src/reclaim/pabc_helper.h
new file mode 100644
index 000000000..045ad5dda
--- /dev/null
+++ b/src/reclaim/pabc_helper.h
@@ -0,0 +1,41 @@
+#include "platform.h"
+#include "gnunet_util_lib.h"
+#include <pabc/pabc.h>
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define PABC_ISK_EXT ".isk"
+
+#define PABC_PP_EXT ".pp"
+
+#define PABC_USR_EXT ".usr"
+
+#define PABC_ATTR_DELIM "="
+
+enum GNUNET_GenericReturnValue
+PABC_write_public_parameters (char const *const pp_name,
+ struct pabc_public_parameters *const pp);
+
+
+enum GNUNET_GenericReturnValue
+PABC_load_public_parameters (struct pabc_context *const ctx,
+ char const *const pp_name,
+ struct pabc_public_parameters **pp);
+
+enum GNUNET_GenericReturnValue
+PABC_write_usr_ctx (char const *const user_name,
+ char const *const pp_name,
+ struct pabc_context const *const ctx,
+ struct pabc_public_parameters const *const
+ pp,
+ struct pabc_user_context *const usr_ctx);
+
+enum GNUNET_GenericReturnValue
+PABC_read_usr_ctx (char const *const user_name,
+ char const *const pp_name,
+ struct pabc_context const *const ctx,
+ struct pabc_public_parameters const *const
+ pp,
+ struct pabc_user_context **usr_ctx);