aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_crypto_lib.h18
-rw-r--r--src/transport/gnunet-service-transport_validation.c2
-rw-r--r--src/util/plugin.c17
3 files changed, 22 insertions, 15 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 7aedd58a8..ac50685e2 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1178,6 +1178,10 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename);
1178struct GNUNET_CRYPTO_EddsaPrivateKey * 1178struct GNUNET_CRYPTO_EddsaPrivateKey *
1179GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename); 1179GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename);
1180 1180
1181
1182/**
1183 * Forward declaration to simplify #include-structure.
1184 */
1181struct GNUNET_CONFIGURATION_Handle; 1185struct GNUNET_CONFIGURATION_Handle;
1182 1186
1183 1187
@@ -1679,7 +1683,7 @@ GNUNET_CRYPTO_rsa_blinding_key_free (struct GNUNET_CRYPTO_rsa_BlindingKey *bkey)
1679 */ 1683 */
1680size_t 1684size_t
1681GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 1685GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKey *bkey,
1682 char **buffer); 1686 char **buffer);
1683 1687
1684 1688
1685/** 1689/**
@@ -1692,7 +1696,7 @@ GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKe
1692 */ 1696 */
1693struct GNUNET_CRYPTO_rsa_BlindingKey * 1697struct GNUNET_CRYPTO_rsa_BlindingKey *
1694GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf, 1698GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf,
1695 size_t len); 1699 size_t len);
1696 1700
1697 1701
1698/** 1702/**
@@ -1706,9 +1710,9 @@ GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf,
1706 */ 1710 */
1707size_t 1711size_t
1708GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, 1712GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash,
1709 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 1713 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey,
1710 struct GNUNET_CRYPTO_rsa_PublicKey *pkey, 1714 struct GNUNET_CRYPTO_rsa_PublicKey *pkey,
1711 char **buffer); 1715 char **buffer);
1712 1716
1713 1717
1714/** 1718/**
@@ -1721,8 +1725,8 @@ GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash,
1721 */ 1725 */
1722struct GNUNET_CRYPTO_rsa_Signature * 1726struct GNUNET_CRYPTO_rsa_Signature *
1723GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_rsa_PrivateKey *key, 1727GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_rsa_PrivateKey *key,
1724 const void *msg, 1728 const void *msg,
1725 size_t msg_len); 1729 size_t msg_len);
1726 1730
1727 1731
1728/** 1732/**
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index ccd077aab..7dfe28ae8 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -1482,7 +1482,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
1482 ve->expecting_pong = GNUNET_NO; 1482 ve->expecting_pong = GNUNET_NO;
1483 ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION); 1483 ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION);
1484 ve->pong_sig_cache = pong->signature; 1484 ve->pong_sig_cache = pong->signature;
1485 ve->pong_sig_valid_until = GNUNET_TIME_absolute_ntoh (pong->expiration); 1485 ve->pong_sig_valid_until = GNUNET_TIME_absolute_ntoh (pong->expiration);
1486 ve->latency = GNUNET_TIME_absolute_get_duration (ve->send_time); 1486 ve->latency = GNUNET_TIME_absolute_get_duration (ve->send_time);
1487 { 1487 {
1488 if (GNUNET_YES == ve->known_to_ats) 1488 if (GNUNET_YES == ve->known_to_ats)
diff --git a/src/util/plugin.c b/src/util/plugin.c
index 18a90b6c3..c88ab8791 100644
--- a/src/util/plugin.c
+++ b/src/util/plugin.c
@@ -57,7 +57,6 @@ struct PluginList
57 */ 57 */
58static int initialized; 58static int initialized;
59 59
60
61/** 60/**
62 * Libtool search path before we started. 61 * Libtool search path before we started.
63 */ 62 */
@@ -89,12 +88,12 @@ plugin_init ()
89 return; 88 return;
90 } 89 }
91 opath = lt_dlgetsearchpath (); 90 opath = lt_dlgetsearchpath ();
92 if (opath != NULL) 91 if (NULL != opath)
93 old_dlsearchpath = GNUNET_strdup (opath); 92 old_dlsearchpath = GNUNET_strdup (opath);
94 path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBDIR); 93 path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBDIR);
95 if (path != NULL) 94 if (NULL != path)
96 { 95 {
97 if (opath != NULL) 96 if (NULL != opath)
98 { 97 {
99 GNUNET_asprintf (&cpath, "%s:%s", opath, path); 98 GNUNET_asprintf (&cpath, "%s:%s", opath, path);
100 lt_dlsetsearchpath (cpath); 99 lt_dlsetsearchpath (cpath);
@@ -117,7 +116,7 @@ static void
117plugin_fini () 116plugin_fini ()
118{ 117{
119 lt_dlsetsearchpath (old_dlsearchpath); 118 lt_dlsetsearchpath (old_dlsearchpath);
120 if (old_dlsearchpath != NULL) 119 if (NULL != old_dlsearchpath)
121 { 120 {
122 GNUNET_free (old_dlsearchpath); 121 GNUNET_free (old_dlsearchpath);
123 old_dlsearchpath = NULL; 122 old_dlsearchpath = NULL;
@@ -134,12 +133,16 @@ plugin_fini ()
134 * @return NULL if the symbol was not found 133 * @return NULL if the symbol was not found
135 */ 134 */
136static GNUNET_PLUGIN_Callback 135static GNUNET_PLUGIN_Callback
137resolve_function (struct PluginList *plug, const char *name) 136resolve_function (struct PluginList *plug,
137 const char *name)
138{ 138{
139 char *initName; 139 char *initName;
140 void *mptr; 140 void *mptr;
141 141
142 GNUNET_asprintf (&initName, "_%s_%s", plug->name, name); 142 GNUNET_asprintf (&initName,
143 "_%s_%s",
144 plug->name,
145 name);
143 mptr = lt_dlsym (plug->handle, &initName[1]); 146 mptr = lt_dlsym (plug->handle, &initName[1]);
144 if (NULL == mptr) 147 if (NULL == mptr)
145 mptr = lt_dlsym (plug->handle, initName); 148 mptr = lt_dlsym (plug->handle, initName);