- case GNUNET_GNSRECORD_TYPE_PKEY:
- if (GNUNET_OK !=
- GNUNET_CRYPTO_ecdsa_public_key_from_string (s, strlen (s), &pkey))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Unable to parse PKEY record `%s'\n"),
- s);
- return GNUNET_SYSERR;
- }
- *data = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey);
- memcpy (*data, &pkey, sizeof (pkey));
- *data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
- return GNUNET_OK;
-
- case GNUNET_GNSRECORD_TYPE_NICK:
- *data = GNUNET_strdup (s);
- *data_size = strlen (s);
- return GNUNET_OK;
- case GNUNET_GNSRECORD_TYPE_LEHO:
- *data = GNUNET_strdup (s);
- *data_size = strlen (s);
- return GNUNET_OK;
- case GNUNET_GNSRECORD_TYPE_GNS2DNS:
- {
- char nsbuf[514];
- char *cpy;
- char *at;
- size_t off;
-
- cpy = GNUNET_strdup (s);
- at = strchr (cpy, '@');
- if (NULL == at)
+ case GNUNET_GNSRECORD_TYPE_PKEY:
+ if (GNUNET_OK !=
+ GNUNET_CRYPTO_ecdsa_public_key_from_string (s,
+ strlen (s),
+ &pkey))