summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-08-29 11:14:49 +0200
committerSimon Josefsson <simon@josefsson.org>2008-08-29 11:14:49 +0200
commit0c0fdef9b3fb603e8a170a598351aec5c27896c7 (patch)
tree3fcc24d71d4819c2ff18e75b2557945cdc2c3c00 /lib
parentc6de7cca81ff88231815866178d5d553bed21b7b (diff)
downloadgnutls-0c0fdef9b3fb603e8a170a598351aec5c27896c7.tar.gz
Fix warnings.
Diffstat (limited to 'lib')
-rw-r--r--lib/auth_cert.c10
-rw-r--r--lib/auth_srp_passwd.h4
-rw-r--r--lib/auth_srp_sb64.c3
-rw-r--r--lib/gnutls_constate.c6
-rw-r--r--lib/gnutls_global.c2
-rw-r--r--lib/gnutls_helper.c3
-rw-r--r--lib/gnutls_int.h2
-rw-r--r--lib/gnutls_srp.c2
-rw-r--r--lib/gnutls_supplemental.c3
-rw-r--r--lib/gnutls_x509.c6
-rw-r--r--lib/mac-libgcrypt.c2
-rw-r--r--lib/mpi-libgcrypt.c32
-rw-r--r--lib/opencdk/armor.c16
-rw-r--r--lib/opencdk/hash.c10
-rw-r--r--lib/opencdk/keydb.c2
-rw-r--r--lib/opencdk/literal.c30
-rw-r--r--lib/opencdk/main.h3
-rw-r--r--lib/opencdk/opencdk.h7
-rw-r--r--lib/opencdk/stream.c3
-rw-r--r--lib/openpgp/extras.c3
-rw-r--r--lib/pk-libgcrypt.c8
21 files changed, 81 insertions, 76 deletions
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index f0a03ec4d2..1703790b09 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -643,7 +643,7 @@ cleanup:
/* Generate client certificate
*/
-int
+static int
_gnutls_gen_x509_crt (gnutls_session_t session, opaque ** data)
{
int ret, i;
@@ -702,7 +702,7 @@ enum PGPKeyDescriptorType
{ PGP_KEY_FINGERPRINT, PGP_KEY, PGP_KEY_SUBKEY, PGP_KEY_FINGERPRINT_SUBKEY };
#ifdef ENABLE_OPENPGP
-int
+static int
_gnutls_gen_openpgp_certificate (gnutls_session_t session, opaque ** data)
{
int ret;
@@ -775,7 +775,7 @@ _gnutls_gen_openpgp_certificate (gnutls_session_t session, opaque ** data)
return ret;
}
-int
+static int
_gnutls_gen_openpgp_certificate_fpr (gnutls_session_t session, opaque ** data)
{
int ret, packet_size;
@@ -894,7 +894,7 @@ _gnutls_gen_cert_server_certificate (gnutls_session_t session, opaque ** data)
*/
#define CLEAR_CERTS for(x=0;x<peer_certificate_list_size;x++) _gnutls_gcert_deinit(&peer_certificate_list[x])
-int
+static int
_gnutls_proc_x509_server_certificate (gnutls_session_t session,
opaque * data, size_t data_size)
{
@@ -1037,7 +1037,7 @@ cleanup:
#define CLEAR_CERTS for(x=0;x<peer_certificate_list_size;x++) _gnutls_gcert_deinit(&peer_certificate_list[x])
#ifdef ENABLE_OPENPGP
-int
+static int
_gnutls_proc_openpgp_server_certificate (gnutls_session_t session,
opaque * data, size_t data_size)
{
diff --git a/lib/auth_srp_passwd.h b/lib/auth_srp_passwd.h
index 169b2585b3..8baf03df85 100644
--- a/lib/auth_srp_passwd.h
+++ b/lib/auth_srp_passwd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+ * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -38,8 +38,6 @@ typedef struct
int _gnutls_srp_pwd_read_entry (gnutls_session_t state, char *username,
SRP_PWD_ENTRY **);
void _gnutls_srp_entry_free (SRP_PWD_ENTRY * entry);
-int _gnutls_sbase64_encode (uint8_t * data, size_t data_size,
- uint8_t ** result);
int _gnutls_sbase64_decode (uint8_t * data, size_t data_size,
uint8_t ** result);
diff --git a/lib/auth_srp_sb64.c b/lib/auth_srp_sb64.c
index 57dd5214c7..209b563710 100644
--- a/lib/auth_srp_sb64.c
+++ b/lib/auth_srp_sb64.c
@@ -25,6 +25,7 @@
#include <gnutls_int.h>
#include <gnutls_errors.h>
#include <gnutls_datum.h>
+#include <auth_srp_passwd.h>
#ifdef ENABLE_SRP
@@ -147,7 +148,7 @@ encode (uint8_t * result, const uint8_t * rdata, int left)
/* encodes data and puts the result into result (locally allocated)
* The result_size is the return value
*/
-int
+static int
_gnutls_sbase64_encode (uint8_t * data, size_t data_size, uint8_t ** result)
{
unsigned i, j;
diff --git a/lib/gnutls_constate.c b/lib/gnutls_constate.c
index ae21196a7d..bc724d82ce 100644
--- a/lib/gnutls_constate.c
+++ b/lib/gnutls_constate.c
@@ -54,7 +54,7 @@ static const int servwrite_length = sizeof (servwrite) - 1;
* This function creates the keys and stores them into pending session.
* (session->cipher_specs)
*/
-int
+static int
_gnutls_set_keys (gnutls_session_t session, int hash_size, int IV_size,
int key_size, int export_flag)
{
@@ -381,7 +381,7 @@ _gnutls_set_keys (gnutls_session_t session, int hash_size, int IV_size,
return 0;
}
-int
+static int
_gnutls_set_read_keys (gnutls_session_t session)
{
int hash_size;
@@ -402,7 +402,7 @@ _gnutls_set_read_keys (gnutls_session_t session)
export_flag);
}
-int
+static int
_gnutls_set_write_keys (gnutls_session_t session)
{
int hash_size;
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index 5b42ec4f83..bf2b6e1937 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -95,8 +95,6 @@ dlog (int level, const char *str)
}
#endif
-int _gnutls_is_secure_mem_null (const void *);
-
/**
* gnutls_global_set_mem_functions - set the memory allocation functions
* @alloc_func: it's the default memory allocation function. Like malloc().
diff --git a/lib/gnutls_helper.c b/lib/gnutls_helper.c
index ae421716b8..68bae1b7f5 100644
--- a/lib/gnutls_helper.c
+++ b/lib/gnutls_helper.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Free Software Foundation
+ * Copyright (C) 2005, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -23,6 +23,7 @@
*/
#include <gnutls_int.h>
+#include <gnutls_helper.h>
int
_gnutls_file_exists (const char *file)
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 390b729173..1e40d1c248 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -677,4 +677,6 @@ void _gnutls_free_auth_info (gnutls_session_t session);
void _gnutls_set_adv_version (gnutls_session_t, gnutls_protocol_t);
gnutls_protocol_t _gnutls_get_adv_version (gnutls_session_t);
+int _gnutls_is_secure_mem_null (const void *);
+
#endif /* GNUTLS_INT_H */
diff --git a/lib/gnutls_srp.c b/lib/gnutls_srp.c
index a6722a8e33..2c0c9293ab 100644
--- a/lib/gnutls_srp.c
+++ b/lib/gnutls_srp.c
@@ -284,7 +284,7 @@ _gnutls_calc_srp_A (bigint_t * a, bigint_t g, bigint_t n)
/* generate x = SHA(s | SHA(U | ":" | p))
* The output is exactly 20 bytes
*/
-int
+static int
_gnutls_calc_srp_sha (const char *username, const char *password,
opaque * salt, int salt_size, size_t * size,
void *digest)
diff --git a/lib/gnutls_supplemental.c b/lib/gnutls_supplemental.c
index cf6362c22c..f0ea269dd7 100644
--- a/lib/gnutls_supplemental.c
+++ b/lib/gnutls_supplemental.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Free Software Foundation
+ * Copyright (C) 2007, 2008 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -108,7 +108,6 @@ _gnutls_gen_supplemental (gnutls_session_t session, gnutls_buffer * buf)
{
supp_send_func supp_send = p->supp_send_func;
size_t sizepos = buf->length;
- int ret;
/* Make room for supplement type and length byte length field. */
ret = _gnutls_buffer_append (buf, "\0\0\0\0", 4);
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c
index 651ba61aa1..5a6f4cead7 100644
--- a/lib/gnutls_x509.c
+++ b/lib/gnutls_x509.c
@@ -1560,7 +1560,7 @@ parse_pkcs12 (gnutls_certificate_credentials_t res,
gnutls_x509_crt_t * cert, gnutls_x509_crl_t * crl)
{
gnutls_pkcs12_bag_t bag = NULL;
- int index = 0;
+ int idx = 0;
int ret;
for (;;)
@@ -1576,7 +1576,7 @@ parse_pkcs12 (gnutls_certificate_credentials_t res,
goto done;
}
- ret = gnutls_pkcs12_get_bag (p12, index, bag);
+ ret = gnutls_pkcs12_get_bag (p12, idx, bag);
if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
break;
if (ret < 0)
@@ -1691,7 +1691,7 @@ parse_pkcs12 (gnutls_certificate_credentials_t res,
}
}
- index++;
+ idx++;
gnutls_pkcs12_bag_deinit (bag);
}
diff --git a/lib/mac-libgcrypt.c b/lib/mac-libgcrypt.c
index 9d17169831..4bd777cd2a 100644
--- a/lib/mac-libgcrypt.c
+++ b/lib/mac-libgcrypt.c
@@ -115,7 +115,7 @@ wrap_gcry_hash_init (gnutls_digest_algorithm_t algo, void **ctx)
return GNUTLS_E_ENCRYPTION_FAILED;
}
-int
+static int
wrap_gcry_mac_output (void *src_ctx, void *digest, size_t digestsize)
{
opaque *_digest = gcry_md_read (src_ctx, 0);
diff --git a/lib/mpi-libgcrypt.c b/lib/mpi-libgcrypt.c
index 29e31b9cf2..948967a2c7 100644
--- a/lib/mpi-libgcrypt.c
+++ b/lib/mpi-libgcrypt.c
@@ -49,7 +49,7 @@ _format_conv (gnutls_bigint_format_t format)
/* returns zero on success
*/
-bigint_t
+static bigint_t
wrap_gcry_mpi_scan (const void *buffer, size_t nbytes,
gnutls_bigint_format_t format)
{
@@ -63,7 +63,7 @@ wrap_gcry_mpi_scan (const void *buffer, size_t nbytes,
return ret_mpi;
}
-int
+static int
wrap_gcry_mpi_print (const bigint_t a, void *buffer, size_t * nbytes,
gnutls_bigint_format_t format)
{
@@ -84,7 +84,7 @@ wrap_gcry_mpi_print (const bigint_t a, void *buffer, size_t * nbytes,
#undef _gnutls_mpi_alloc_like
#define _gnutls_mpi_alloc_like(x) gcry_mpi_new(gcry_mpi_get_nbits(x))
-bigint_t
+static bigint_t
wrap_gcry_mpi_mod (const bigint_t a, const bigint_t b)
{
bigint_t r = _gnutls_mpi_alloc_like (b);
@@ -97,7 +97,7 @@ wrap_gcry_mpi_mod (const bigint_t a, const bigint_t b)
return r;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_powm (bigint_t w, const bigint_t b, const bigint_t e,
const bigint_t m)
{
@@ -112,7 +112,7 @@ wrap_gcry_mpi_powm (bigint_t w, const bigint_t b, const bigint_t e,
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_addm (bigint_t w, const bigint_t a, const bigint_t b,
const bigint_t m)
{
@@ -127,7 +127,7 @@ wrap_gcry_mpi_addm (bigint_t w, const bigint_t a, const bigint_t b,
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_subm (bigint_t w, const bigint_t a, const bigint_t b,
const bigint_t m)
{
@@ -142,7 +142,7 @@ wrap_gcry_mpi_subm (bigint_t w, const bigint_t a, const bigint_t b,
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_mulm (bigint_t w, const bigint_t a, const bigint_t b,
const bigint_t m)
{
@@ -157,7 +157,7 @@ wrap_gcry_mpi_mulm (bigint_t w, const bigint_t a, const bigint_t b,
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_add (bigint_t w, const bigint_t a, const bigint_t b)
{
if (w == NULL)
@@ -171,7 +171,7 @@ wrap_gcry_mpi_add (bigint_t w, const bigint_t a, const bigint_t b)
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_sub (bigint_t w, const bigint_t a, const bigint_t b)
{
if (w == NULL)
@@ -185,7 +185,7 @@ wrap_gcry_mpi_sub (bigint_t w, const bigint_t a, const bigint_t b)
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_mul (bigint_t w, const bigint_t a, const bigint_t b)
{
if (w == NULL)
@@ -200,7 +200,7 @@ wrap_gcry_mpi_mul (bigint_t w, const bigint_t a, const bigint_t b)
}
/* q = a / b */
-bigint_t
+static bigint_t
wrap_gcry_mpi_div (bigint_t q, const bigint_t a, const bigint_t b)
{
if (q == NULL)
@@ -214,7 +214,7 @@ wrap_gcry_mpi_div (bigint_t q, const bigint_t a, const bigint_t b)
return q;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_add_ui (bigint_t w, const bigint_t a, unsigned long b)
{
if (w == NULL)
@@ -228,7 +228,7 @@ wrap_gcry_mpi_add_ui (bigint_t w, const bigint_t a, unsigned long b)
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_sub_ui (bigint_t w, const bigint_t a, unsigned long b)
{
if (w == NULL)
@@ -242,7 +242,7 @@ wrap_gcry_mpi_sub_ui (bigint_t w, const bigint_t a, unsigned long b)
return w;
}
-bigint_t
+static bigint_t
wrap_gcry_mpi_mul_ui (bigint_t w, const bigint_t a, unsigned long b)
{
if (w == NULL)
@@ -256,13 +256,13 @@ wrap_gcry_mpi_mul_ui (bigint_t w, const bigint_t a, unsigned long b)
return w;
}
-int
+static int
wrap_gcry_prime_check (bigint_t pp)
{
return gcry_prime_check (pp, 0);
}
-int
+static int
wrap_gcry_generate_group (gnutls_group_st * group, unsigned int bits)
{
bigint_t g = NULL, prime = NULL;
diff --git a/lib/opencdk/armor.c b/lib/opencdk/armor.c
index 9919890d1a..90dea6980b 100644
--- a/lib/opencdk/armor.c
+++ b/lib/opencdk/armor.c
@@ -338,9 +338,9 @@ update_crc (u32 crc, const byte * buf, size_t buflen)
static cdk_error_t
-armor_encode (void *opaque, FILE * in, FILE * out)
+armor_encode (void *data, FILE * in, FILE * out)
{
- armor_filter_t *afx = opaque;
+ armor_filter_t *afx = data;
struct stat statbuf;
char crcbuf[5], buf[128], raw[49];
byte crcbuf2[3];
@@ -446,9 +446,9 @@ _cdk_armor_get_lineend (void)
static cdk_error_t
-armor_decode (void *opaque, FILE * in, FILE * out)
+armor_decode (void *data, FILE * in, FILE * out)
{
- armor_filter_t *afx = opaque;
+ armor_filter_t *afx = data;
const char *s;
char buf[127];
byte raw[128], crcbuf[4];
@@ -655,15 +655,15 @@ cdk_file_dearmor (const char *file, const char *output)
int
-_cdk_filter_armor (void *opaque, int ctl, FILE * in, FILE * out)
+_cdk_filter_armor (void *data, int ctl, FILE * in, FILE * out)
{
if (ctl == STREAMCTL_READ)
- return armor_decode (opaque, in, out);
+ return armor_decode (data, in, out);
else if (ctl == STREAMCTL_WRITE)
- return armor_encode (opaque, in, out);
+ return armor_encode (data, in, out);
else if (ctl == STREAMCTL_FREE)
{
- armor_filter_t *afx = opaque;
+ armor_filter_t *afx = data;
if (afx)
{
_cdk_log_debug ("free armor filter\n");
diff --git a/lib/opencdk/hash.c b/lib/opencdk/hash.c
index afc5c990c2..5886f72a4e 100644
--- a/lib/opencdk/hash.c
+++ b/lib/opencdk/hash.c
@@ -33,9 +33,9 @@
#include "filters.h"
static cdk_error_t
-hash_encode (void *opaque, FILE * in, FILE * out)
+hash_encode (void *data, FILE * in, FILE * out)
{
- md_filter_t *mfx = opaque;
+ md_filter_t *mfx = data;
byte buf[BUFSIZE];
int err;
int nread;
@@ -67,13 +67,13 @@ hash_encode (void *opaque, FILE * in, FILE * out)
}
cdk_error_t
-_cdk_filter_hash (void *opaque, int ctl, FILE * in, FILE * out)
+_cdk_filter_hash (void *data, int ctl, FILE * in, FILE * out)
{
if (ctl == STREAMCTL_READ)
- return hash_encode (opaque, in, out);
+ return hash_encode (data, in, out);
else if (ctl == STREAMCTL_FREE)
{
- md_filter_t *mfx = opaque;
+ md_filter_t *mfx = data;
if (mfx)
{
_cdk_log_debug ("free hash filter\n");
diff --git a/lib/opencdk/keydb.c b/lib/opencdk/keydb.c
index 7407f5c121..66f8b1be39 100644
--- a/lib/opencdk/keydb.c
+++ b/lib/opencdk/keydb.c
@@ -397,7 +397,7 @@ cdk_keydb_free (cdk_keydb_hd_t hd)
}
-cdk_error_t
+static cdk_error_t
_cdk_keydb_open (cdk_keydb_hd_t hd, cdk_stream_t * ret_kr)
{
cdk_error_t rc;
diff --git a/lib/opencdk/literal.c b/lib/opencdk/literal.c
index 5e16bd1ef4..aee17eea23 100644
--- a/lib/opencdk/literal.c
+++ b/lib/opencdk/literal.c
@@ -49,9 +49,9 @@ dup_trim_filename (const char *s)
static cdk_error_t
-literal_decode (void *opaque, FILE * in, FILE * out)
+literal_decode (void *data, FILE * in, FILE * out)
{
- literal_filter_t *pfx = opaque;
+ literal_filter_t *pfx = data;
cdk_stream_t si, so;
cdk_packet_t pkt;
cdk_pkt_literal_t pt;
@@ -173,9 +173,9 @@ intmode_to_char (int mode)
static cdk_error_t
-literal_encode (void *opaque, FILE * in, FILE * out)
+literal_encode (void *data, FILE * in, FILE * out)
{
- literal_filter_t *pfx = opaque;
+ literal_filter_t *pfx = data;
cdk_pkt_literal_t pt;
cdk_stream_t si;
cdk_packet_t pkt;
@@ -225,15 +225,15 @@ literal_encode (void *opaque, FILE * in, FILE * out)
int
-_cdk_filter_literal (void *opaque, int ctl, FILE * in, FILE * out)
+_cdk_filter_literal (void *data, int ctl, FILE * in, FILE * out)
{
if (ctl == STREAMCTL_READ)
- return literal_decode (opaque, in, out);
+ return literal_decode (data, in, out);
else if (ctl == STREAMCTL_WRITE)
- return literal_encode (opaque, in, out);
+ return literal_encode (data, in, out);
else if (ctl == STREAMCTL_FREE)
{
- literal_filter_t *pfx = opaque;
+ literal_filter_t *pfx = data;
if (pfx)
{
_cdk_log_debug ("free literal filter\n");
@@ -249,7 +249,7 @@ _cdk_filter_literal (void *opaque, int ctl, FILE * in, FILE * out)
static int
-text_encode (void *opaque, FILE * in, FILE * out)
+text_encode (void *data, FILE * in, FILE * out)
{
const char *s;
char buf[2048];
@@ -272,9 +272,9 @@ text_encode (void *opaque, FILE * in, FILE * out)
static int
-text_decode (void *opaque, FILE * in, FILE * out)
+text_decode (void *data, FILE * in, FILE * out)
{
- text_filter_t *tfx = opaque;
+ text_filter_t *tfx = data;
const char *s;
char buf[2048];
@@ -296,15 +296,15 @@ text_decode (void *opaque, FILE * in, FILE * out)
int
-_cdk_filter_text (void *opaque, int ctl, FILE * in, FILE * out)
+_cdk_filter_text (void *data, int ctl, FILE * in, FILE * out)
{
if (ctl == STREAMCTL_READ)
- return text_encode (opaque, in, out);
+ return text_encode (data, in, out);
else if (ctl == STREAMCTL_WRITE)
- return text_decode (opaque, in, out);
+ return text_decode (data, in, out);
else if (ctl == STREAMCTL_FREE)
{
- text_filter_t *tfx = opaque;
+ text_filter_t *tfx = data;
if (tfx)
{
_cdk_log_debug ("free text filter\n");
diff --git a/lib/opencdk/main.h b/lib/opencdk/main.h
index 6ff4176f26..613bc940f3 100644
--- a/lib/opencdk/main.h
+++ b/lib/opencdk/main.h
@@ -98,6 +98,7 @@ int _cdk_check_args( int overwrite, const char * in, const char * out );
u32 _cdk_buftou32 (const byte * buf);
void _cdk_u32tobuf (u32 u, byte * buf);
const char *_cdk_memistr (const char * buf, size_t buflen, const char * sub);
+FILE *_cdk_tmpfile (void);
/* Helper to provide case insentensive strstr version. */
#define stristr(haystack, needle) \
@@ -196,5 +197,5 @@ int _gnutls_hash_algo_to_pgp(int algo);
int _pgp_hash_algo_to_gnutls(int algo);
int _gnutls_cipher_to_pgp(int cipher);
int _pgp_cipher_to_gnutls(int cipher);
-
+
#endif /* CDK_MAIN_H */
diff --git a/lib/opencdk/opencdk.h b/lib/opencdk/opencdk.h
index af2b6d6b32..df83f9bd09 100644
--- a/lib/opencdk/opencdk.h
+++ b/lib/opencdk/opencdk.h
@@ -916,6 +916,13 @@ cdk_error_t cdk_kbnode_write_to_mem_alloc (cdk_kbnode_t node,
size_t *r_buflen);
void cdk_kbnode_release (cdk_kbnode_t node);
+void cdk_kbnode_delete (cdk_kbnode_t node);
+void cdk_kbnode_insert (cdk_kbnode_t root, cdk_kbnode_t node,
+ cdk_packet_type_t pkttype);
+int cdk_kbnode_commit (cdk_kbnode_t * root);
+void cdk_kbnode_remove (cdk_kbnode_t * root, cdk_kbnode_t node);
+void cdk_kbnode_move (cdk_kbnode_t * root, cdk_kbnode_t node,
+ cdk_kbnode_t where);
cdk_kbnode_t cdk_kbnode_walk (cdk_kbnode_t root, cdk_kbnode_t * ctx, int all);
cdk_packet_t cdk_kbnode_find_packet (cdk_kbnode_t node, cdk_packet_type_t pkttype);
cdk_packet_t cdk_kbnode_get_packet (cdk_kbnode_t node);
diff --git a/lib/opencdk/stream.c b/lib/opencdk/stream.c
index 96119173c7..1217404894 100644
--- a/lib/opencdk/stream.c
+++ b/lib/opencdk/stream.c
@@ -49,9 +49,6 @@ static int stream_cache_flush (cdk_stream_t s, FILE * fp);
struct stream_filter_s *filter_add (cdk_stream_t s, filter_fnct_t fnc,
int type);
-/* Customized tmpfile() version from misc.c */
-FILE *_cdk_tmpfile (void);
-
/* FIXME: The read/write/putc/getc function cannot directly
return an error code. It is stored in an error variable
diff --git a/lib/openpgp/extras.c b/lib/openpgp/extras.c
index 745e95ba82..c2e330e49e 100644
--- a/lib/openpgp/extras.c
+++ b/lib/openpgp/extras.c
@@ -145,6 +145,8 @@ gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring,
*/
if (format == GNUTLS_OPENPGP_FMT_BASE64)
{
+ size_t written = 0;
+
err = cdk_stream_tmp_from_mem (data->data, data->size, &input);
if (!err)
err = cdk_stream_set_armor_flag (input, 0);
@@ -171,7 +173,6 @@ gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring,
goto error;
}
- size_t written = 0;
do
{
err =
diff --git a/lib/pk-libgcrypt.c b/lib/pk-libgcrypt.c
index df7ded6c11..ce1dd70bb8 100644
--- a/lib/pk-libgcrypt.c
+++ b/lib/pk-libgcrypt.c
@@ -46,7 +46,7 @@
int (*generate) (gnutls_pk_algorithm_t, unsigned int level /*bits */ ,
gnutls_pk_params_st *);
-int
+static int
_wrap_gcry_pk_encrypt (gnutls_pk_algorithm_t algo,
gnutls_datum_t * ciphertext,
const gnutls_datum_t * plaintext,
@@ -156,7 +156,7 @@ cleanup:
return ret;
}
-int
+static int
_wrap_gcry_pk_decrypt (gnutls_pk_algorithm_t algo,
gnutls_datum_t * plaintext,
const gnutls_datum_t * ciphertext,
@@ -259,7 +259,7 @@ cleanup:
/* in case of DSA puts into data, r,s
*/
-int
+static int
_wrap_gcry_pk_sign (gnutls_pk_algorithm_t algo, gnutls_datum_t * signature,
const gnutls_datum_t * vdata,
const gnutls_pk_params_st * pk_params)
@@ -409,7 +409,7 @@ cleanup:
return ret;
}
-int
+static int
_wrap_gcry_pk_verify (gnutls_pk_algorithm_t algo,
const gnutls_datum_t * vdata,
const gnutls_datum_t * signature,