diff options
author | jospaeth <spaethj@in.tum.de> | 2020-07-10 13:45:09 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-07-10 13:45:09 +0200 |
commit | 45016bc5f75a0182db4596df54bf68fe83ecd12a (patch) | |
tree | 42040ebd05ec6552f18c1c3d2ace82dc4f319a4a /src/include/gnunet_escrow_lib.h | |
parent | 8e22ed9734ca214dae90a0a2f9bf0f2e1f5499bb (diff) | |
download | gnunet-45016bc5f75a0182db4596df54bf68fe83ecd12a.tar.gz gnunet-45016bc5f75a0182db4596df54bf68fe83ecd12a.zip |
add escrow API methods, change plugin functions
Diffstat (limited to 'src/include/gnunet_escrow_lib.h')
-rw-r--r-- | src/include/gnunet_escrow_lib.h | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/src/include/gnunet_escrow_lib.h b/src/include/gnunet_escrow_lib.h index 8467dae5d..21d1b4d19 100644 --- a/src/include/gnunet_escrow_lib.h +++ b/src/include/gnunet_escrow_lib.h | |||
@@ -43,13 +43,71 @@ extern "C" { | |||
43 | /** | 43 | /** |
44 | * Enum for the different key escrow methods | 44 | * Enum for the different key escrow methods |
45 | */ | 45 | */ |
46 | enum GNUNET_RECLAIM_Key_Escrow_Method { | 46 | enum GNUNET_ESCROW_Key_Escrow_Method { |
47 | GNUNET_ESCROW_KEY_PLAINTEXT, | 47 | GNUNET_ESCROW_KEY_PLAINTEXT, |
48 | GNUNET_ESCROW_KEY_GNS, | 48 | GNUNET_ESCROW_KEY_GNS, |
49 | GNUNET_ESCROW_KEY_ANASTASIS | 49 | GNUNET_ESCROW_KEY_ANASTASIS |
50 | }; | 50 | }; |
51 | 51 | ||
52 | 52 | ||
53 | /** | ||
54 | * Put some data in escrow using the specified escrow method | ||
55 | * | ||
56 | * @param ego the identity ego to put in escrow | ||
57 | * @param method the escrow method to use | ||
58 | * | ||
59 | * @return the escrow anchor needed to get the data back | ||
60 | */ | ||
61 | void * | ||
62 | GNUNET_ESCROW_put ( | ||
63 | const struct GNUNET_IDENTITY_Ego *ego, | ||
64 | enum GNUNET_ESCROW_Key_Escrow_Method method); | ||
65 | |||
66 | |||
67 | /** | ||
68 | * Renew the escrow of the data related to the given escrow anchor | ||
69 | * | ||
70 | * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method | ||
71 | * @param method the escrow method to use | ||
72 | * | ||
73 | * @return the escrow anchor needed to get the data back | ||
74 | */ | ||
75 | void * | ||
76 | GNUNET_ESCROW_renew ( | ||
77 | void *escrowAnchor, | ||
78 | enum GNUNET_ESCROW_Key_Escrow_Method method); | ||
79 | |||
80 | |||
81 | /** | ||
82 | * Get the escrowed data back | ||
83 | * | ||
84 | * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method | ||
85 | * @param method the escrow method to use | ||
86 | * | ||
87 | * @return a new identity ego restored from the escrow | ||
88 | */ | ||
89 | const struct GNUNET_IDENTITY_Ego * | ||
90 | GNUNET_ESCROW_get ( | ||
91 | void *escrowAnchor, | ||
92 | enum GNUNET_ESCROW_Key_Escrow_Method method); | ||
93 | |||
94 | |||
95 | /** | ||
96 | * Verify the escrowed data | ||
97 | * | ||
98 | * @param ego the identity ego that was put into escrow | ||
99 | * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method | ||
100 | * @param method the escrow method to use | ||
101 | * | ||
102 | * @return GNUNET_OK if the escrow could successfully by restored | ||
103 | */ | ||
104 | int | ||
105 | GNUNET_ESCROW_verify ( | ||
106 | const struct GNUNET_IDENTITY_Ego *ego, | ||
107 | void *escrowAnchor, | ||
108 | enum GNUNET_ESCROW_Key_Escrow_Method method); | ||
109 | |||
110 | |||
53 | #if 0 /* keep Emacsens' auto-indent happy */ | 111 | #if 0 /* keep Emacsens' auto-indent happy */ |
54 | { | 112 | { |
55 | #endif | 113 | #endif |