diff options
Diffstat (limited to 'src/reclaim/did_helper.c')
-rw-r--r-- | src/reclaim/did_helper.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/reclaim/did_helper.c b/src/reclaim/did_helper.c index 17f3b21b2..3aac027ee 100644 --- a/src/reclaim/did_helper.c +++ b/src/reclaim/did_helper.c | |||
@@ -42,12 +42,12 @@ | |||
42 | * TODO: Check if EdDSA | 42 | * TODO: Check if EdDSA |
43 | */ | 43 | */ |
44 | char* | 44 | char* |
45 | DID_pkey_to_did (struct GNUNET_IDENTITY_PublicKey *pkey) | 45 | DID_pkey_to_did (struct GNUNET_CRYPTO_PublicKey *pkey) |
46 | { | 46 | { |
47 | char *pkey_str; | 47 | char *pkey_str; |
48 | char *did_str; | 48 | char *did_str; |
49 | 49 | ||
50 | pkey_str = GNUNET_IDENTITY_public_key_to_string (pkey); | 50 | pkey_str = GNUNET_CRYPTO_public_key_to_string (pkey); |
51 | GNUNET_asprintf (&did_str, "%s%s", | 51 | GNUNET_asprintf (&did_str, "%s%s", |
52 | GNUNET_DID_METHOD_PREFIX, | 52 | GNUNET_DID_METHOD_PREFIX, |
53 | pkey_str); | 53 | pkey_str); |
@@ -66,7 +66,7 @@ DID_pkey_to_did (struct GNUNET_IDENTITY_PublicKey *pkey) | |||
66 | char* | 66 | char* |
67 | DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego) | 67 | DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego) |
68 | { | 68 | { |
69 | struct GNUNET_IDENTITY_PublicKey pkey; | 69 | struct GNUNET_CRYPTO_PublicKey pkey; |
70 | 70 | ||
71 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); | 71 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); |
72 | return DID_pkey_to_did (&pkey); | 72 | return DID_pkey_to_did (&pkey); |
@@ -76,7 +76,7 @@ DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego) | |||
76 | * @brief Return the public key of a DID | 76 | * @brief Return the public key of a DID |
77 | */ | 77 | */ |
78 | enum GNUNET_GenericReturnValue | 78 | enum GNUNET_GenericReturnValue |
79 | DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey) | 79 | DID_did_to_pkey (const char *did, struct GNUNET_CRYPTO_PublicKey *pkey) |
80 | { | 80 | { |
81 | char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH + 1]; /* 0-term */ | 81 | char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH + 1]; /* 0-term */ |
82 | 82 | ||
@@ -84,7 +84,7 @@ DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey) | |||
84 | GNUNET_DID_METHOD_PREFIX "%" | 84 | GNUNET_DID_METHOD_PREFIX "%" |
85 | STR (MAX_DID_SPECIFIC_IDENTIFIER_LENGTH) | 85 | STR (MAX_DID_SPECIFIC_IDENTIFIER_LENGTH) |
86 | "s", pkey_str))) || | 86 | "s", pkey_str))) || |
87 | (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string (pkey_str, pkey))) | 87 | (GNUNET_OK != GNUNET_CRYPTO_public_key_from_string (pkey_str, pkey))) |
88 | { | 88 | { |
89 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Could not decode given DID: %s\n", | 89 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Could not decode given DID: %s\n", |
90 | did); | 90 | did); |
@@ -97,7 +97,7 @@ DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey) | |||
97 | /** | 97 | /** |
98 | * @brief Convert a base 64 encoded public key to a GNUNET key | 98 | * @brief Convert a base 64 encoded public key to a GNUNET key |
99 | */ | 99 | */ |
100 | struct GNUNET_IDENTITY_PublicKey * | 100 | struct GNUNET_CRYPTO_PublicKey * |
101 | GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str) | 101 | GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str) |
102 | { | 102 | { |
103 | return NULL; | 103 | return NULL; |
@@ -108,7 +108,7 @@ GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str) | |||
108 | */ | 108 | */ |
109 | char * | 109 | char * |
110 | DID_key_convert_gnunet_to_multibase_base64 (struct | 110 | DID_key_convert_gnunet_to_multibase_base64 (struct |
111 | GNUNET_IDENTITY_PublicKey * | 111 | GNUNET_CRYPTO_PublicKey * |
112 | pkey) | 112 | pkey) |
113 | { | 113 | { |
114 | struct GNUNET_CRYPTO_EddsaPublicKey pubkey = pkey->eddsa_key; | 114 | struct GNUNET_CRYPTO_EddsaPublicKey pubkey = pkey->eddsa_key; |
@@ -135,7 +135,7 @@ DID_key_convert_gnunet_to_multibase_base64 (struct | |||
135 | * @return void* Return pointer to the DID Document | 135 | * @return void* Return pointer to the DID Document |
136 | */ | 136 | */ |
137 | char * | 137 | char * |
138 | DID_pkey_to_did_document (struct GNUNET_IDENTITY_PublicKey *pkey) | 138 | DID_pkey_to_did_document (struct GNUNET_CRYPTO_PublicKey *pkey) |
139 | { | 139 | { |
140 | 140 | ||
141 | /* FIXME-MSC: This is effectively creating a DID Document default template for | 141 | /* FIXME-MSC: This is effectively creating a DID Document default template for |
@@ -196,7 +196,7 @@ DID_pkey_to_did_document (struct GNUNET_IDENTITY_PublicKey *pkey) | |||
196 | char * | 196 | char * |
197 | DID_identity_to_did_document (struct GNUNET_IDENTITY_Ego *ego) | 197 | DID_identity_to_did_document (struct GNUNET_IDENTITY_Ego *ego) |
198 | { | 198 | { |
199 | struct GNUNET_IDENTITY_PublicKey pkey; | 199 | struct GNUNET_CRYPTO_PublicKey pkey; |
200 | 200 | ||
201 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); | 201 | GNUNET_IDENTITY_ego_get_public_key (ego, &pkey); |
202 | return DID_pkey_to_did (&pkey); | 202 | return DID_pkey_to_did (&pkey); |