* @param cls closure, NULL
* @param server handle to the server for this service
* @param my_identity the public identity of this peer
- * @param publicKey the public key of this peer
*/
static void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Core initialized\n");
me = my_identity;
/**
* Public key of the local peer.
*/
- struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded publicKey;
+ struct GNUNET_PeerIdentity my_identity;
};
trigger_next_request (h, GNUNET_NO);
}
h->retry_backoff = GNUNET_TIME_UNIT_MILLISECONDS;
- GNUNET_CRYPTO_hash (&m->publicKey,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
- &h->me.hashPubKey);
+ h->me = m->my_identity;
if (NULL != (init = h->init))
{
/* mark so we don't call init on reconnect */
"Connected to core service of peer `%s'.\n",
GNUNET_i2s (&h->me));
#endif
- init (h->cls, h, &h->me, &m->publicKey);
+ init (h->cls, h, &h->me);
}
else
{
irm.header.size = htons (sizeof (struct InitReplyMessage));
irm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY);
irm.reserved = htonl (0);
- memcpy (&irm.publicKey, &my_public_key,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
+ irm.my_identity = my_identity;
#if DEBUG_CORE_CLIENT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message to client.\n",
"INIT_REPLY");
irm.header.size = htons (sizeof (struct InitReplyMessage));
irm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY);
irm.reserved = htonl (0);
- irm.publicKey = GSC_my_public_key;
+ irm.my_identity = GSC_my_identity;
send_to_client (c, &irm.header, GNUNET_NO);
if (0 != (c->options & GNUNET_CORE_OPTION_SEND_CONNECT))
GSC_SESSIONS_notify_client_about_sessions (c);
static void
init_notify (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
static void
init_notify (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
static void
init_notify (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
static void
init_notify (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
static void
init_notify (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
* @param cls service closure
* @param server handle to the server for this service
* @param identity the public identity of this peer
- * @param publicKey the public key of this peer
*/
static void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *identity)
{
GNUNET_assert (server != NULL);
my_identity = *identity;
*/
void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *identity)
{
if (server == NULL)
static void
init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
static void
init_notify_peer1 (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
total_server_connections++;
#if VERBOSE
* @param cls closure
* @param server handle to the server, NULL if we failed
* @param my_identity ID of this peer, NULL if we failed
- * @param publicKey public key of this peer, NULL if we failed
*/
static void
peer_init_handler (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
my_id = *my_identity;
}
static void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
me = *my_identity;
}
/**
- * Function called after GNUNET_CORE_connect has succeeded
- * (or failed for good). Note that the private key of the
- * peer is intentionally not exposed here; if you need it,
- * your process should try to read the private key file
- * directly (which should work if you are authorized...).
+ * Function called after GNUNET_CORE_connect has succeeded (or failed
+ * for good). Note that the private key of the peer is intentionally
+ * not exposed here; if you need it, your process should try to read
+ * the private key file directly (which should work if you are
+ * authorized...).
*
* @param cls closure
* @param server handle to the server, NULL if we failed
* @param my_identity ID of this peer, NULL if we failed
- * @param publicKey public key of this peer, NULL if we failed
*/
typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
struct GNUNET_CORE_Handle * server,
- const struct GNUNET_PeerIdentity *
- my_identity,
- const struct
- GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- * publicKey);
+ const struct GNUNET_PeerIdentity *my_identity);
/**
* @param handle connection to transport service
* @param target who should receive the message
* @param size how big is the message we want to transmit?
- * @param priority how important is the message?
+ * @param priority how important is the message? @deprecated - remove?
* @param timeout after how long should we give up (and call
* notify with buf NULL and size 0)?
* @param notify function to call when we are ready to
* @param cls service closure
* @param server handle to the server for this service
* @param identity the public identity of this peer
- * @param publicKey the public key of this peer
*/
static void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *identity)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Core init\n");
core_handle = server;
static void
core_startup (void *cls, struct GNUNET_CORE_Handle *core
__attribute__ ((unused)),
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey
- __attribute__ ((unused)))
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct GNUNET_MESH_Handle *handle = cls;
* @param cls service closure
* @param server handle to the server for this service
* @param identity the public identity of this peer
- * @param publicKey the public key of this peer
*/
static void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *identity)
{
struct GNUNET_TIME_Absolute now;
struct GNUNET_TIME_Absolute prev_time;
static void
init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct TestMessageContext *pos = cls;
static void
init_notify_peer1 (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct TestMessageContext *pos = cls;
static void
init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct TestMessageContext *pos = cls;
static void
init_notify_peer1 (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct TestMessageContext *pos = cls;
* @param cls a ConnectContext
* @param server handle to the core service
* @param my_identity the peer identity of this peer
- * @param publicKey the public key of the peer
*/
void
core_init_notify (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey)
+ const struct GNUNET_PeerIdentity *my_identity)
{
struct GNUNET_TESTING_ConnectContext *connect_ctx = cls;
* @param cls a struct SendHelloContext *
* @param server handle to the core service
* @param my_identity the peer identity of this peer
- * @param publicKey the public key of the peer
*/
void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ struct GNUNET_PeerIdentity *my_identity)
{
struct SendHelloContext *send_hello_context = cls;
* @param cls closure
* @param server handle to the server, NULL if we failed
* @param my_id ID of this peer, NULL if we failed
- * @param publicKey public key of this peer, NULL if we failed
*/
static void
core_init (void *cls, struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_id,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_PeerIdentity *my_id)
{
if (server == NULL)
{