From: Bart Polot Date: Mon, 27 Apr 2015 19:15:18 +0000 (+0000) Subject: - add getter for peer's permanent ECDH key X-Git-Tag: initial-import-from-subversion-38251~2006 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fb772645f6a082e37d5ee50a2bb45a6b239f3af0;p=oweals%2Fgnunet.git - add getter for peer's permanent ECDH key --- diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 1185091c6..de86c0502 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c @@ -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. diff --git a/src/cadet/gnunet-service-cadet_peer.h b/src/cadet/gnunet-service-cadet_peer.h index 53a26b2e9..298ef50e7 100644 --- a/src/cadet/gnunet-service-cadet_peer.h +++ b/src/cadet/gnunet-service-cadet_peer.h @@ -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.