- add getter for peer's permanent ECDH key
authorBart Polot <bart@net.in.tum.de>
Mon, 27 Apr 2015 19:15:18 +0000 (19:15 +0000)
committerBart Polot <bart@net.in.tum.de>
Mon, 27 Apr 2015 19:15:18 +0000 (19:15 +0000)
src/cadet/gnunet-service-cadet_peer.c
src/cadet/gnunet-service-cadet_peer.h

index 1185091c620c337e33dbfff1443cb3279c2f43ce..de86c05022e513d75b42de5635ab6005aed5cdb6 100644 (file)
@@ -2418,6 +2418,21 @@ GCP_check_key (struct CadetPeer *peer,
 }
 
 
+/**
+ * Get the Identity ECDH key of the peer.
+ *
+ * @param peer Peer whose key to get.
+ *
+ * @return Peer's permanent ECDH key (might be all 0: unknown).
+ *
+ */
+struct GNUNET_CRYPTO_EcdhePublicKey *
+GCP_get_ecdh_key (struct CadetPeer *peer)
+{
+  return &peer->ax_key;
+}
+
+
 /**
  * Notify a peer that a link between two other peers is broken. If any path
  * used that link, eliminate it.
index 53a26b2e966c36583e5da67a5c92b09a095fdbf4..298ef50e7cc1db77205379131d3fadcbe2e60004 100644 (file)
@@ -408,6 +408,16 @@ GCP_check_key (struct CadetPeer *peer,
                const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
                const struct GNUNET_CRYPTO_EddsaSignature *sig);
 
+/**
+ * Get the Identity ECDH key of the peer.
+ *
+ * @param peer Peer whose key to get.
+ *
+ * @return Peer's permanent ECDH key (might be all 0: unknown).
+ */
+struct GNUNET_CRYPTO_EddsaPublicKey *
+GCP_get_key (struct CadetPeer *peer);
+
 /**
  * Notify a peer that a link between two other peers is broken. If any path
  * used that link, eliminate it.