gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-199-g08b0052


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-199-g08b0052
Date: Wed, 14 Apr 2010 13:37:23 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=08b0052dae6738cdc619be7ff105682e8d63be32

The branch, master has been updated
       via  08b0052dae6738cdc619be7ff105682e8d63be32 (commit)
       via  66d0a122fcaa10b963420ac316585ed5bbace2a1 (commit)
      from  3965579aaf5ae277b388414e7d7829196ec78fbf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 08b0052dae6738cdc619be7ff105682e8d63be32
Author: Simon Josefsson <address@hidden>
Date:   Wed Apr 14 15:37:00 2010 +0200

    Fix indent bug.

commit 66d0a122fcaa10b963420ac316585ed5bbace2a1
Author: Simon Josefsson <address@hidden>
Date:   Wed Apr 14 15:33:15 2010 +0200

    More indentation.

-----------------------------------------------------------------------

Summary of changes:
 cfg.mk                             |    2 +-
 doc/examples/examples.h            |   12 +-
 guile/src/errors.h                 |    6 +-
 guile/src/utils.h                  |   18 +-
 lib/auth_cert.h                    |    6 +-
 lib/auth_dh_common.h               |    9 +-
 lib/crypto.h                       |   11 +-
 lib/ext_oprfi.h                    |    6 +-
 lib/ext_safe_renegotiation.h       |    9 +-
 lib/ext_session_ticket.h           |    3 +-
 lib/ext_signature.h                |   24 +-
 lib/gnutls_algorithms.h            |   12 +-
 lib/gnutls_cipher_int.h            |   34 +-
 lib/gnutls_compress.h              |    4 +-
 lib/gnutls_cryptodev.h             |    4 +-
 lib/gnutls_errors.h                |   11 +-
 lib/gnutls_extensions.h            |    2 +-
 lib/gnutls_hash_int.h              |   55 +-
 lib/gnutls_int.h                   |   45 +-
 lib/gnutls_mpi.h                   |   20 +-
 lib/gnutls_pk.h                    |   20 +-
 lib/gnutls_sig.h                   |   29 +-
 lib/gnutls_srp.h                   |   10 +-
 lib/gnutls_state.h                 |    3 +-
 lib/gnutls_str.h                   |   14 +-
 lib/gnutls_supplemental.h          |    6 +-
 lib/includes/gnutls/crypto.h       |  119 ++--
 lib/includes/gnutls/gnutls.h.in    |  782 +++++++++++----------
 lib/includes/gnutls/openpgp.h      |  185 +++---
 lib/includes/gnutls/pkcs12.h       |   15 +-
 lib/includes/gnutls/x509.h         |   96 ++--
 lib/opencdk/context.h              |   73 ++-
 lib/opencdk/filters.h              |   58 +-
 lib/opencdk/keydb.h                |   41 +-
 lib/opencdk/main.h                 |   97 ++--
 lib/opencdk/opencdk.h              | 1363 ++++++++++++++++++------------------
 lib/opencdk/packet.h               |   21 +-
 lib/opencdk/stream.h               |   37 +-
 lib/opencdk/types.h                |    6 +-
 lib/openpgp/gnutls_openpgp.h       |    3 +-
 lib/openpgp/openpgp_int.h          |   28 +-
 lib/x509/pbkdf2-sha1.h             |    5 +-
 lib/x509/x509_int.h                |  114 ++--
 libextra/includes/gnutls/extra.h   |   24 +-
 libextra/includes/gnutls/openssl.h |    5 +-
 src/certtool-cfg.h                 |   10 +-
 src/certtool-common.h              |   51 +-
 src/common.h                       |    3 +-
 48 files changed, 1815 insertions(+), 1696 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 7b6c9b2..7fe32ae 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -23,7 +23,7 @@ WFLAGS ?= --enable-gcc-warnings
 ADDFLAGS ?=
 CFGFLAGS ?= --enable-gtk-doc $(ADDFLAGS) $(WFLAGS)
 
-INDENT_SOURCES = `find . -name \*.c|grep -v -e ^./lib/gl -e ^./gl -e 
^./src/cfg -e -gaa.c -e asn1_tab.c`
+INDENT_SOURCES = `find . -name \*.[ch] -o -name gnutls.h.in | grep -v -e 
^./build-aux/ -e ^./lib/minitasn1/ -e ^./lib/build-aux/ -e ^./lib/gl/ -e ^./gl/ 
-e ^./libextra/gl/ -e ^./src/cfg/ -e -gaa.[ch] -e asn1_tab.c`
 
 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
 .DEFAULT_GOAL := bootstrap
diff --git a/doc/examples/examples.h b/doc/examples/examples.h
index 0667dc4..1b1f79b 100644
--- a/doc/examples/examples.h
+++ b/doc/examples/examples.h
@@ -1,21 +1,17 @@
 #ifndef EXAMPLES_H
 # define EXAMPLES_H
 
-void
-check_alert (gnutls_session_t session, int ret);
+void check_alert (gnutls_session_t session, int ret);
 
 int
 write_pkcs12 (const gnutls_datum_t * cert,
              const gnutls_datum_t * pkcs8_key, const char *password);
 
-void
-verify_certificate (gnutls_session_t session, const char *hostname);
+void verify_certificate (gnutls_session_t session, const char *hostname);
 
-int
-print_info (gnutls_session_t session);
+int print_info (gnutls_session_t session);
 
-void
-print_x509_certificate_info (gnutls_session_t session);
+void print_x509_certificate_info (gnutls_session_t session);
 
 void
 verify_certificate_chain (gnutls_session_t session,
diff --git a/guile/src/errors.h b/guile/src/errors.h
index fd5740e..00c5969 100644
--- a/guile/src/errors.h
+++ b/guile/src/errors.h
@@ -22,8 +22,10 @@
 
 #include "utils.h"
 
-SCM_API void scm_gnutls_error (int, const char *) NO_RETURN;
-SCM_API void scm_init_gnutls_error (void);
+SCM_API void
+scm_gnutls_error (int, const char *)
+  NO_RETURN;
+     SCM_API void scm_init_gnutls_error (void);
 
 #endif
 
diff --git a/guile/src/utils.h b/guile/src/utils.h
index 4dd20a8..0122b46 100644
--- a/guile/src/utils.h
+++ b/guile/src/utils.h
@@ -21,8 +21,8 @@
 /* Common utilities.  */
 
 #include <libguile.h>
-
 
+
 /* Compiler twiddling.  */
 
 #ifdef __GNUC__
@@ -35,8 +35,8 @@
 
 #define EXPECT_TRUE(_expr)  EXPECT ((_expr), 1)
 #define EXPECT_FALSE(_expr) EXPECT ((_expr), 0)
-
 
+
 /* Arrays as byte vectors.  */
 
 extern const char scm_gnutls_array_error_message[];
@@ -44,8 +44,8 @@ extern const char scm_gnutls_array_error_message[];
 /* Initialize C_HANDLE and C_LEN and return the contiguous C array
    corresponding to ARRAY.  */
 static inline const char *
-scm_gnutls_get_array (SCM array, scm_t_array_handle *c_handle, size_t *c_len,
-                     const char *func_name)
+scm_gnutls_get_array (SCM array, scm_t_array_handle * c_handle,
+                     size_t * c_len, const char *func_name)
 {
   const char *c_array = NULL;
   const scm_t_array_dim *c_dims;
@@ -74,9 +74,8 @@ scm_gnutls_get_array (SCM array, scm_t_array_handle 
*c_handle, size_t *c_len,
 /* Initialize C_HANDLE and C_LEN and return the contiguous C array
    corresponding to ARRAY.  The returned array can be written to.  */
 static inline char *
-scm_gnutls_get_writable_array (SCM array, scm_t_array_handle *c_handle,
-                              size_t *c_len,
-                              const char *func_name)
+scm_gnutls_get_writable_array (SCM array, scm_t_array_handle * c_handle,
+                              size_t * c_len, const char *func_name)
 {
   char *c_array = NULL;
   const scm_t_array_dim *c_dims;
@@ -96,16 +95,17 @@ scm_gnutls_get_writable_array (SCM array, 
scm_t_array_handle *c_handle,
       c_elem_size = scm_array_handle_uniform_element_size (c_handle);
       *c_len = c_elem_size * (c_dims->ubnd - c_dims->lbnd + 1);
 
-      c_array = (char *) scm_array_handle_uniform_writable_elements (c_handle);
+      c_array =
+       (char *) scm_array_handle_uniform_writable_elements (c_handle);
     }
 
   return (c_array);
 }
 
 #define scm_gnutls_release_array  scm_array_handle_release
+
 
 
-
 /* Type conversion.  */
 
 /* Return a list corresponding to the key usage values ORed in C_USAGE.  */
diff --git a/lib/auth_cert.h b/lib/auth_cert.h
index 40c2ce8..de22a87 100644
--- a/lib/auth_cert.h
+++ b/lib/auth_cert.h
@@ -159,8 +159,8 @@ gnutls_rsa_params_t _gnutls_certificate_get_rsa_params 
(gnutls_rsa_params_t
                                                        gnutls_session_t);
 
 int _gnutls_get_auth_info_gcert (gnutls_cert * gcert,
-                              gnutls_certificate_type_t type,
-                              cert_auth_info_t info,
-                              int flags /* OR of ConvFlags */ );
+                                gnutls_certificate_type_t type,
+                                cert_auth_info_t info,
+                                int flags /* OR of ConvFlags */ );
 
 #endif
diff --git a/lib/auth_dh_common.h b/lib/auth_dh_common.h
index 57d17ff..fecc717 100644
--- a/lib/auth_dh_common.h
+++ b/lib/auth_dh_common.h
@@ -40,10 +40,9 @@ int _gnutls_gen_dh_common_client_kx (gnutls_session_t, 
opaque **);
 int _gnutls_proc_dh_common_client_kx (gnutls_session_t session,
                                      opaque * data, size_t _data_size,
                                      bigint_t p, bigint_t g);
-int _gnutls_dh_common_print_server_kx (gnutls_session_t, bigint_t g, bigint_t 
p,
-                                      opaque ** data, int psk);
-int _gnutls_proc_dh_common_server_kx (gnutls_session_t session,
-                                     opaque * data, size_t _data_size,
-                                     int psk);
+int _gnutls_dh_common_print_server_kx (gnutls_session_t, bigint_t g,
+                                      bigint_t p, opaque ** data, int psk);
+int _gnutls_proc_dh_common_server_kx (gnutls_session_t session, opaque * data,
+                                     size_t _data_size, int psk);
 
 #endif
diff --git a/lib/crypto.h b/lib/crypto.h
index ae4e9c2..b5c8828 100644
--- a/lib/crypto.h
+++ b/lib/crypto.h
@@ -25,9 +25,12 @@
 #ifndef CRYPTO_H
 # define CRYPTO_H
 
-const gnutls_crypto_cipher_st *_gnutls_get_crypto_cipher( 
gnutls_cipher_algorithm_t algo);
-const gnutls_crypto_digest_st *_gnutls_get_crypto_digest( 
gnutls_digest_algorithm_t algo);
-const gnutls_crypto_mac_st *_gnutls_get_crypto_mac( gnutls_mac_algorithm_t 
algo);
-void _gnutls_crypto_deregister(void);
+const gnutls_crypto_cipher_st
+  * _gnutls_get_crypto_cipher (gnutls_cipher_algorithm_t algo);
+const gnutls_crypto_digest_st
+  * _gnutls_get_crypto_digest (gnutls_digest_algorithm_t algo);
+const gnutls_crypto_mac_st *_gnutls_get_crypto_mac (gnutls_mac_algorithm_t
+                                                   algo);
+void _gnutls_crypto_deregister (void);
 
 #endif /* CRYPTO_H */
diff --git a/lib/ext_oprfi.h b/lib/ext_oprfi.h
index 479efa3..8802d47 100644
--- a/lib/ext_oprfi.h
+++ b/lib/ext_oprfi.h
@@ -25,9 +25,7 @@
 #include <gnutls_int.h>
 
 int _gnutls_oprfi_recv_params (gnutls_session_t state,
-                              const opaque * data,
-                              size_t data_size);
+                              const opaque * data, size_t data_size);
 
 int _gnutls_oprfi_send_params (gnutls_session_t state,
-                              opaque * data,
-                              size_t data_size);
+                              opaque * data, size_t data_size);
diff --git a/lib/ext_safe_renegotiation.h b/lib/ext_safe_renegotiation.h
index b70e481..0042606 100644
--- a/lib/ext_safe_renegotiation.h
+++ b/lib/ext_safe_renegotiation.h
@@ -25,9 +25,10 @@
 #ifndef EXT_SAFE_RENEGOTIATION_H
 # define EXT_SAFE_RENEGOTIATION_H
 
-int _gnutls_safe_renegotiation_recv_params (gnutls_session_t state, 
-               const opaque * data, size_t data_size);
-int _gnutls_safe_renegotiation_send_params (gnutls_session_t state, 
-               opaque * data, size_t);
+int _gnutls_safe_renegotiation_recv_params (gnutls_session_t state,
+                                           const opaque * data,
+                                           size_t data_size);
+int _gnutls_safe_renegotiation_send_params (gnutls_session_t state,
+                                           opaque * data, size_t);
 
 #endif /* EXT_SAFE_RENEGOTIATION_H */
diff --git a/lib/ext_session_ticket.h b/lib/ext_session_ticket.h
index 49ca7f4..265fad6 100644
--- a/lib/ext_session_ticket.h
+++ b/lib/ext_session_ticket.h
@@ -25,7 +25,8 @@
 #ifdef ENABLE_SESSION_TICKET
 
 int _gnutls_session_ticket_recv_params (gnutls_session_t session,
-                                       const opaque * data, size_t data_size);
+                                       const opaque * data,
+                                       size_t data_size);
 int _gnutls_session_ticket_send_params (gnutls_session_t session,
                                        opaque * data, size_t data_size);
 
diff --git a/lib/ext_signature.h b/lib/ext_signature.h
index 7123637..43c8ac7 100644
--- a/lib/ext_signature.h
+++ b/lib/ext_signature.h
@@ -26,13 +26,21 @@
 /* signature algorithms extension
  */
 int _gnutls_signature_algorithm_recv_params (gnutls_session_t session,
-                                  const opaque * data, size_t data_size);
-int _gnutls_signature_algorithm_send_params (gnutls_session_t session, opaque 
* data,
-                                  size_t);
+                                            const opaque * data,
+                                            size_t data_size);
+int _gnutls_signature_algorithm_send_params (gnutls_session_t session,
+                                            opaque * data, size_t);
 int _gnutls_session_sign_algo_requested (gnutls_session_t session,
-                                     gnutls_sign_algorithm_t sig);
-gnutls_sign_algorithm_t _gnutls_session_get_sign_algo (gnutls_session_t 
session, gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t *hash);
-int _gnutls_sign_algorithm_parse_data(gnutls_session_t session, const opaque* 
data, size_t data_size);
-int _gnutls_sign_algorithm_write_params(gnutls_session_t session, opaque 
*data, size_t max_data_size);
+                                        gnutls_sign_algorithm_t sig);
+gnutls_sign_algorithm_t _gnutls_session_get_sign_algo (gnutls_session_t
+                                                      session,
+                                                      gnutls_pk_algorithm_t
+                                                      pk,
+                                                      gnutls_digest_algorithm_t
+                                                      * hash);
+int _gnutls_sign_algorithm_parse_data (gnutls_session_t session,
+                                      const opaque * data, size_t data_size);
+int _gnutls_sign_algorithm_write_params (gnutls_session_t session,
+                                        opaque * data, size_t max_data_size);
 int _gnutls_session_sign_algo_enabled (gnutls_session_t session,
-                                     gnutls_sign_algorithm_t sig);
+                                      gnutls_sign_algorithm_t sig);
diff --git a/lib/gnutls_algorithms.h b/lib/gnutls_algorithms.h
index 2a0f76c..ed103ba 100644
--- a/lib/gnutls_algorithms.h
+++ b/lib/gnutls_algorithms.h
@@ -68,8 +68,10 @@ gnutls_kx_algorithm_t _gnutls_cipher_suite_get_kx_algo 
(const cipher_suite_st
 gnutls_mac_algorithm_t _gnutls_cipher_suite_get_mac_algo (const
                                                          cipher_suite_st *
                                                          algorithm);
-gnutls_protocol_t _gnutls_cipher_suite_is_version_supported (const 
cipher_suite_st *
-                                                   algorithm, 
gnutls_protocol_t);
+gnutls_protocol_t _gnutls_cipher_suite_is_version_supported (const
+                                                            cipher_suite_st *
+                                                            algorithm,
+                                                            gnutls_protocol_t);
 cipher_suite_st _gnutls_cipher_suite_get_suite_name (cipher_suite_st *
                                                     algorithm);
 
@@ -109,9 +111,11 @@ gnutls_sign_algorithm_t _gnutls_x509_pk_to_sign 
(gnutls_pk_algorithm_t pk,
 gnutls_pk_algorithm_t _gnutls_x509_sign_to_pk (gnutls_sign_algorithm_t sign);
 const char *_gnutls_x509_sign_to_oid (gnutls_pk_algorithm_t,
                                      gnutls_mac_algorithm_t mac);
-gnutls_sign_algorithm_t _gnutls_tls_aid_to_sign (const sign_algorithm_st* aid);
+gnutls_sign_algorithm_t _gnutls_tls_aid_to_sign (const sign_algorithm_st *
+                                                aid);
 sign_algorithm_st _gnutls_sign_to_tls_aid (gnutls_sign_algorithm_t sign);
-gnutls_mac_algorithm_t _gnutls_sign_get_hash_algorithm 
(gnutls_sign_algorithm_t);
+gnutls_mac_algorithm_t
+_gnutls_sign_get_hash_algorithm (gnutls_sign_algorithm_t);
 gnutls_pk_algorithm_t _gnutls_sign_get_pk_algorithm (gnutls_sign_algorithm_t);
 
 int _gnutls_mac_priority (gnutls_session_t session,
diff --git a/lib/gnutls_cipher_int.h b/lib/gnutls_cipher_int.h
index 55abc09..d032e0c 100644
--- a/lib/gnutls_cipher_int.h
+++ b/lib/gnutls_cipher_int.h
@@ -31,25 +31,29 @@
 extern int crypto_cipher_prio;
 extern gnutls_crypto_cipher_st _gnutls_cipher_ops;
 
-typedef struct {
-  const gnutls_crypto_single_cipher_st* cc;
-  void* ctx;
+typedef struct
+{
+  const gnutls_crypto_single_cipher_st *cc;
+  void *ctx;
 } reg_hd;
 
-typedef struct {
-       int registered; /* true or false(0) */
-       union {
-               void* gc; /* when not registered */
-               reg_hd rh; /* when registered */
-       } hd;
+typedef struct
+{
+  int registered;              /* true or false(0) */
+  union
+  {
+    void *gc;                  /* when not registered */
+    reg_hd rh;                 /* when registered */
+  } hd;
 } cipher_hd_st;
 
-int _gnutls_cipher_init (cipher_hd_st*, gnutls_cipher_algorithm_t cipher,
-                                const gnutls_datum_t * key,
-                                const gnutls_datum_t * iv);
-int _gnutls_cipher_encrypt (const cipher_hd_st *handle, void *text, int 
textlen);
-int _gnutls_cipher_decrypt (const cipher_hd_st *handle, void *ciphertext,
+int _gnutls_cipher_init (cipher_hd_st *, gnutls_cipher_algorithm_t cipher,
+                        const gnutls_datum_t * key,
+                        const gnutls_datum_t * iv);
+int _gnutls_cipher_encrypt (const cipher_hd_st * handle, void *text,
+                           int textlen);
+int _gnutls_cipher_decrypt (const cipher_hd_st * handle, void *ciphertext,
                            int ciphertextlen);
-void _gnutls_cipher_deinit (cipher_hd_st* handle);
+void _gnutls_cipher_deinit (cipher_hd_st * handle);
 
 #endif /* GNUTLS_CIPHER_INT */
diff --git a/lib/gnutls_compress.h b/lib/gnutls_compress.h
index 35cfcab..96df289 100644
--- a/lib/gnutls_compress.h
+++ b/lib/gnutls_compress.h
@@ -27,10 +27,10 @@
 
 int _gnutls_m_plaintext2compressed (gnutls_session_t session,
                                    gnutls_datum_t * compressed,
-                                   const gnutls_datum_t *plaintext);
+                                   const gnutls_datum_t * plaintext);
 int _gnutls_m_compressed2plaintext (gnutls_session_t session,
                                    gnutls_datum_t * plain,
-                                   const gnutls_datum_t* compressed);
+                                   const gnutls_datum_t * compressed);
 
 /* Algorithm handling. */
 int _gnutls_supported_compression_methods (gnutls_session_t session,
diff --git a/lib/gnutls_cryptodev.h b/lib/gnutls_cryptodev.h
index c655479..ff9ce48 100644
--- a/lib/gnutls_cryptodev.h
+++ b/lib/gnutls_cryptodev.h
@@ -1,2 +1,2 @@
-void _gnutls_cryptodev_deinit(void);
-int _gnutls_cryptodev_init(void);
+void _gnutls_cryptodev_deinit (void);
+int _gnutls_cryptodev_init (void);
diff --git a/lib/gnutls_errors.h b/lib/gnutls_errors.h
index 9dd9a39..6c288ee 100644
--- a/lib/gnutls_errors.h
+++ b/lib/gnutls_errors.h
@@ -42,14 +42,15 @@
 #endif
 
 int _gnutls_asn2err (int asn_err);
-void _gnutls_log (int, const char *fmt, ...)
+void
+_gnutls_log (int, const char *fmt, ...)
 #ifdef __GNUC__
-__attribute__ ((format (printf, 2, 3)));
+  __attribute__ ((format (printf, 2, 3)));
 #else
-;
+ ;
 #endif
 
-void _gnutls_mpi_log (const char *prefix, bigint_t a);
+     void _gnutls_mpi_log (const char *prefix, bigint_t a);
 
 #ifdef C99_MACROS
 #define LEVEL(l, ...) if (_gnutls_log_level >= l || _gnutls_log_level > 9) \
@@ -78,7 +79,7 @@ void _gnutls_mpi_log (const char *prefix, bigint_t a);
 # define _gnutls_write_log _gnutls_null_log
 # define _gnutls_x509_log _gnutls_null_log
 
-void _gnutls_null_log (void *, ...);
+     void _gnutls_null_log (void *, ...);
 
 #endif /* C99_MACROS */
 
diff --git a/lib/gnutls_extensions.h b/lib/gnutls_extensions.h
index 3a4d532..3e5a773 100644
--- a/lib/gnutls_extensions.h
+++ b/lib/gnutls_extensions.h
@@ -25,7 +25,7 @@
 
 int _gnutls_parse_extensions (gnutls_session_t session,
                              gnutls_ext_parse_type_t parse_type,
-                             const opaque *data, int data_size);
+                             const opaque * data, int data_size);
 int _gnutls_gen_extensions (gnutls_session_t session, opaque * data,
                            size_t data_size, gnutls_ext_parse_type_t);
 int _gnutls_ext_init (void);
diff --git a/lib/gnutls_hash_int.h b/lib/gnutls_hash_int.h
index 0df6967..874fa86 100644
--- a/lib/gnutls_hash_int.h
+++ b/lib/gnutls_hash_int.h
@@ -38,17 +38,19 @@ extern gnutls_crypto_mac_st _gnutls_mac_ops;
 extern int crypto_digest_prio;
 extern gnutls_crypto_digest_st _gnutls_digest_ops;
 
-typedef struct {
-  const gnutls_crypto_mac_st* cc;
-  void* ctx;
+typedef struct
+{
+  const gnutls_crypto_mac_st *cc;
+  void *ctx;
 } digest_reg_hd;
 
 typedef struct
 {
-  int registered; /* true or false(0) */
-  union {
-    void* gc; /* when not registered */
-    digest_reg_hd rh; /* when registered */
+  int registered;              /* true or false(0) */
+  union
+  {
+    void *gc;                  /* when not registered */
+    digest_reg_hd rh;          /* when registered */
   } hd;
   gnutls_mac_algorithm_t algorithm;
   const void *key;
@@ -57,33 +59,32 @@ typedef struct
 } digest_hd_st;
 
 /* basic functions */
-int _gnutls_hmac_init (digest_hd_st*, gnutls_mac_algorithm_t algorithm,
-                           const void *key, int keylen);
+int _gnutls_hmac_init (digest_hd_st *, gnutls_mac_algorithm_t algorithm,
+                      const void *key, int keylen);
 int _gnutls_hmac_get_algo_len (gnutls_mac_algorithm_t algorithm);
-int _gnutls_hmac (digest_hd_st* handle, const void *text,
-                 size_t textlen);
+int _gnutls_hmac (digest_hd_st * handle, const void *text, size_t textlen);
 
-int _gnutls_hmac_fast( gnutls_mac_algorithm_t algorithm, const void* key, int 
keylen, 
-       const void* text, size_t textlen, void* digest);
+int _gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm, const void *key,
+                      int keylen, const void *text, size_t textlen,
+                      void *digest);
 
-void _gnutls_hmac_deinit (digest_hd_st* handle, void *digest);
-void _gnutls_hmac_output (digest_hd_st* handle, void *digest);
+void _gnutls_hmac_deinit (digest_hd_st * handle, void *digest);
+void _gnutls_hmac_output (digest_hd_st * handle, void *digest);
 
-int _gnutls_hash_init (digest_hd_st*, gnutls_digest_algorithm_t algorithm);
+int _gnutls_hash_init (digest_hd_st *, gnutls_digest_algorithm_t algorithm);
 int _gnutls_hash_get_algo_len (gnutls_digest_algorithm_t algorithm);
-int _gnutls_hash (digest_hd_st* handle, const void *text,
-                 size_t textlen);
-void _gnutls_hash_deinit (digest_hd_st* handle, void *digest);
-void _gnutls_hash_output (digest_hd_st* handle, void *digest);
+int _gnutls_hash (digest_hd_st * handle, const void *text, size_t textlen);
+void _gnutls_hash_deinit (digest_hd_st * handle, void *digest);
+void _gnutls_hash_output (digest_hd_st * handle, void *digest);
 
 int
 _gnutls_hash_fast (gnutls_digest_algorithm_t algorithm,
-                   const void *text, size_t textlen, void *digest);
-                   
+                  const void *text, size_t textlen, void *digest);
+
 /* help functions */
-int _gnutls_mac_init_ssl3 (digest_hd_st*, gnutls_mac_algorithm_t algorithm, 
void *key,
-                               int keylen);
-void _gnutls_mac_deinit_ssl3 (digest_hd_st* handle, void *digest);
+int _gnutls_mac_init_ssl3 (digest_hd_st *, gnutls_mac_algorithm_t algorithm,
+                          void *key, int keylen);
+void _gnutls_mac_deinit_ssl3 (digest_hd_st * handle, void *digest);
 
 int _gnutls_ssl3_generate_random (void *secret, int secret_len,
                                  void *rnd, int random_len, int bytes,
@@ -92,9 +93,9 @@ int _gnutls_ssl3_hash_md5 (const void *first, int first_len,
                           const void *second, int second_len,
                           int ret_len, opaque * ret);
 
-void _gnutls_mac_deinit_ssl3_handshake (digest_hd_st* handle, void *digest,
+void _gnutls_mac_deinit_ssl3_handshake (digest_hd_st * handle, void *digest,
                                        opaque * key, uint32_t key_size);
 
-int _gnutls_hash_copy (digest_hd_st* dst_handle, digest_hd_st * src_handle);
+int _gnutls_hash_copy (digest_hd_st * dst_handle, digest_hd_st * src_handle);
 
 #endif /* GNUTLS_HASH_INT_H */
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index b8b8bbd..b1c1261 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -179,7 +179,7 @@ typedef enum extensions_t
   GNUTLS_EXTENSION_SIGNATURE_ALGORITHMS = 13,
   GNUTLS_EXTENSION_SESSION_TICKET = 35,
   GNUTLS_EXTENSION_INNER_APPLICATION = 37703,
-  GNUTLS_EXTENSION_SAFE_RENEGOTIATION = 65281, /* aka: 0xff01 */
+  GNUTLS_EXTENSION_SAFE_RENEGOTIATION = 65281, /* aka: 0xff01 */
 } extensions_t;
 
 typedef enum
@@ -205,7 +205,7 @@ typedef enum content_type_t
 
 typedef enum
 {
-  HANDSHAKE_MAC_TYPE_10=1,
+  HANDSHAKE_MAC_TYPE_10 = 1,
   HANDSHAKE_MAC_TYPE_12
 } handshake_mac_type_t;
 
@@ -284,7 +284,7 @@ typedef struct
 typedef struct
 {
   uint8_t hash_algorithm;
-  uint8_t sign_algorithm; /* pk algorithm actually */
+  uint8_t sign_algorithm;      /* pk algorithm actually */
 } sign_algorithm_st;
 
 /* This structure holds parameters got from TLS extension
@@ -302,13 +302,14 @@ typedef struct
 #define MAX_SERVER_NAME_EXTENSIONS 3
 #define MAX_SIGNATURE_ALGORITHMS 16
 
-struct gnutls_session_ticket_key_st {
+struct gnutls_session_ticket_key_st
+{
   opaque key_name[SESSION_TICKET_KEY_NAME_SIZE];
   opaque key[SESSION_TICKET_KEY_SIZE];
   opaque mac_secret[SESSION_TICKET_MAC_SECRET_SIZE];
 };
 
-#define MAX_VERIFY_DATA_SIZE 36 /* in SSL 3.0, 12 in TLS 1.0 */
+#define MAX_VERIFY_DATA_SIZE 36        /* in SSL 3.0, 12 in TLS 1.0 */
 
 /* If you want the extension data to be kept across resuming sessions
  * then modify CPY_EXTENSIONS in gnutls_constate.c
@@ -345,11 +346,11 @@ typedef struct
   uint16_t oprfi_server_len;
 
   /* Safe renegotiation. */
-  uint8_t client_verify_data[MAX_VERIFY_DATA_SIZE]; 
+  uint8_t client_verify_data[MAX_VERIFY_DATA_SIZE];
   size_t client_verify_data_len;
   uint8_t server_verify_data[MAX_VERIFY_DATA_SIZE];
   size_t server_verify_data_len;
-  uint8_t ri_extension_data[MAX_VERIFY_DATA_SIZE*2]; /* max signal is 72 bytes 
in s->c sslv3 */
+  uint8_t ri_extension_data[MAX_VERIFY_DATA_SIZE * 2]; /* max signal is 72 
bytes in s->c sslv3 */
   size_t ri_extension_data_len;
 
 } tls_ext_st;
@@ -387,7 +388,7 @@ typedef struct
   gnutls_cipher_algorithm_t write_bulk_cipher_algorithm;
   gnutls_mac_algorithm_t write_mac_algorithm;
   gnutls_compression_method_t write_compression_algorithm;
-  handshake_mac_type_t handshake_mac_handle_type; /* one of HANDSHAKE_TYPE_10 
and HANDSHAKE_TYPE_12 */
+  handshake_mac_type_t handshake_mac_handle_type;      /* one of 
HANDSHAKE_TYPE_10 and HANDSHAKE_TYPE_12 */
 
   /* this is the ciphersuite we are going to use 
    * moved here from internals in order to be restored
@@ -507,19 +508,19 @@ typedef struct
   gnutls_buffer handshake_hash_buffer; /* used to keep the last received 
handshake 
                                         * message */
   union
+  {
+    struct
+    {
+      digest_hd_st sha;                /* hash of the handshake messages */
+      digest_hd_st md5;                /* hash of the handshake messages */
+    } tls10;
+    struct
     {
-      struct 
-        {
-          digest_hd_st sha;    /* hash of the handshake messages */
-          digest_hd_st md5;    /* hash of the handshake messages */
-        } tls10;
-      struct
-        {
-          digest_hd_st sha1;   /* hash of the handshake messages for TLS 1.2+ 
*/
-          digest_hd_st sha256; /* hash of the handshake messages for TLS 1.2+ 
*/
-        } tls12;
-    } handshake_mac_handle;
-  int handshake_mac_handle_init; /* 1 when the previous union and type were 
initialized */
+      digest_hd_st sha1;       /* hash of the handshake messages for TLS 1.2+ 
*/
+      digest_hd_st sha256;     /* hash of the handshake messages for TLS 1.2+ 
*/
+    } tls12;
+  } handshake_mac_handle;
+  int handshake_mac_handle_init;       /* 1 when the previous union and type 
were initialized */
 
   gnutls_buffer handshake_data_buffer; /* this is a buffer that holds the 
current handshake message */
   gnutls_buffer ia_data_buffer;        /* holds inner application data 
(TLS/IA) */
@@ -557,7 +558,7 @@ typedef struct
 
   /* sockets internals */
   int lowat;
-  
+
   /* These buffers are used in the handshake
    * protocol only. freed using _gnutls_handshake_io_buffer_clear();
    */
@@ -637,7 +638,7 @@ typedef struct
   gnutls_db_retr_func db_retrieve_func;
   gnutls_db_remove_func db_remove_func;
   void *db_ptr;
-  
+
   /* post client hello callback (server side only)
    */
   gnutls_handshake_post_client_hello_func user_hello_func;
diff --git a/lib/gnutls_mpi.h b/lib/gnutls_mpi.h
index cd3d05a..97be326 100644
--- a/lib/gnutls_mpi.h
+++ b/lib/gnutls_mpi.h
@@ -33,11 +33,12 @@
 extern int crypto_bigint_prio;
 extern gnutls_crypto_bigint_st _gnutls_mpi_ops;
 
-bigint_t _gnutls_mpi_randomize( bigint_t, unsigned int bits, 
gnutls_rnd_level_t level);
+bigint_t _gnutls_mpi_randomize (bigint_t, unsigned int bits,
+                               gnutls_rnd_level_t level);
 
 #define _gnutls_mpi_new(x) _gnutls_mpi_ops.bigint_new(x)
 #define _gnutls_mpi_cmp(x,y) _gnutls_mpi_ops.bigint_cmp(x,y)
-#define _gnutls_mpi_cmp_ui(x,y) _gnutls_mpi_ops.bigint_cmp_ui(x,y) 
+#define _gnutls_mpi_cmp_ui(x,y) _gnutls_mpi_ops.bigint_cmp_ui(x,y)
 #define _gnutls_mpi_mod(x,y) _gnutls_mpi_ops.bigint_mod(x,y)
 #define _gnutls_mpi_set(x,y) _gnutls_mpi_ops.bigint_set(x,y)
 #define _gnutls_mpi_set_ui(x,y) _gnutls_mpi_ops.bigint_set_ui(x,y)
@@ -62,13 +63,16 @@ bigint_t _gnutls_mpi_randomize( bigint_t, unsigned int 
bits, gnutls_rnd_level_t
 
 void _gnutls_mpi_release (bigint_t * x);
 
-int _gnutls_mpi_scan (bigint_t * ret_mpi, const void * buffer, size_t nbytes);
-int _gnutls_mpi_scan_nz (bigint_t * ret_mpi, const void * buffer, size_t 
nbytes);
-int _gnutls_mpi_scan_pgp (bigint_t * ret_mpi, const void * buffer, size_t 
nbytes);
+int _gnutls_mpi_scan (bigint_t * ret_mpi, const void *buffer, size_t nbytes);
+int _gnutls_mpi_scan_nz (bigint_t * ret_mpi, const void *buffer,
+                        size_t nbytes);
+int _gnutls_mpi_scan_pgp (bigint_t * ret_mpi, const void *buffer,
+                         size_t nbytes);
 
-int _gnutls_mpi_dprint_lz ( const bigint_t a, gnutls_datum_t * dest);
-int _gnutls_mpi_dprint ( const bigint_t a, gnutls_datum_t * dest);
-int _gnutls_mpi_dprint_size (const bigint_t a, gnutls_datum_t * dest, size_t 
size);
+int _gnutls_mpi_dprint_lz (const bigint_t a, gnutls_datum_t * dest);
+int _gnutls_mpi_dprint (const bigint_t a, gnutls_datum_t * dest);
+int _gnutls_mpi_dprint_size (const bigint_t a, gnutls_datum_t * dest,
+                            size_t size);
 
 #define _gnutls_mpi_generate_group( gg, bits) 
_gnutls_mpi_ops.bigint_generate_group( gg, bits)
 
diff --git a/lib/gnutls_pk.h b/lib/gnutls_pk.h
index 0a0f7c0..765be99 100644
--- a/lib/gnutls_pk.h
+++ b/lib/gnutls_pk.h
@@ -35,16 +35,21 @@ extern gnutls_crypto_pk_st _gnutls_pk_ops;
 #define _gnutls_pk_verify( algo, data, sig, params) _gnutls_pk_ops.verify( 
algo, data, sig, params)
 
 inline static int
-_gnutls_pk_fixup( gnutls_pk_algorithm_t algo, gnutls_direction_t direction, 
gnutls_pk_params_st* params)
+_gnutls_pk_fixup (gnutls_pk_algorithm_t algo, gnutls_direction_t direction,
+                 gnutls_pk_params_st * params)
 {
-       if (_gnutls_pk_ops.pk_fixup_private_params) return 
_gnutls_pk_ops.pk_fixup_private_params(algo, direction, params);
-       return 0;
+  if (_gnutls_pk_ops.pk_fixup_private_params)
+    return _gnutls_pk_ops.pk_fixup_private_params (algo, direction, params);
+  return 0;
 }
 
-int _gnutls_pk_params_copy( gnutls_pk_params_st* dst, bigint_t* params, int 
params_len);
+int _gnutls_pk_params_copy (gnutls_pk_params_st * dst, bigint_t * params,
+                           int params_len);
 
-int _gnutls_rsa_generate_params (bigint_t * resarr, unsigned int *resarr_len, 
int bits);
-int _gnutls_dsa_generate_params (bigint_t * resarr, unsigned int *resarr_len, 
int bits);
+int _gnutls_rsa_generate_params (bigint_t * resarr, unsigned int *resarr_len,
+                                int bits);
+int _gnutls_dsa_generate_params (bigint_t * resarr, unsigned int *resarr_len,
+                                int bits);
 
 /* The internal PK interface */
 int _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext,
@@ -69,6 +74,7 @@ int
 _gnutls_encode_ber_rs (gnutls_datum_t * sig_value, bigint_t r, bigint_t s);
 
 int
-_gnutls_decode_ber_rs (const gnutls_datum_t * sig_value, bigint_t * r, 
bigint_t * s);
+_gnutls_decode_ber_rs (const gnutls_datum_t * sig_value, bigint_t * r,
+                      bigint_t * s);
 
 #endif /* GNUTLS_PK_H */
diff --git a/lib/gnutls_sig.h b/lib/gnutls_sig.h
index a19f236..a87f14c 100644
--- a/lib/gnutls_sig.h
+++ b/lib/gnutls_sig.h
@@ -27,26 +27,27 @@
 # define GNUTLS_SIG_H
 
 int _gnutls_handshake_sign_cert_vrfy (gnutls_session_t session,
-                           gnutls_cert * cert,
-                           gnutls_privkey * pkey,
-                           gnutls_datum_t * signature);
+                                     gnutls_cert * cert,
+                                     gnutls_privkey * pkey,
+                                     gnutls_datum_t * signature);
 
 int _gnutls_handshake_sign_data (gnutls_session_t session,
-                            gnutls_cert * cert,
-                            gnutls_privkey * pkey,
-                            gnutls_datum_t * params,
-                            gnutls_datum_t * signature,
-                            gnutls_sign_algorithm_t * algo);
+                                gnutls_cert * cert,
+                                gnutls_privkey * pkey,
+                                gnutls_datum_t * params,
+                                gnutls_datum_t * signature,
+                                gnutls_sign_algorithm_t * algo);
 
 int _gnutls_handshake_verify_cert_vrfy (gnutls_session_t session,
-                             gnutls_cert * cert, gnutls_datum_t * signature,
-                             gnutls_sign_algorithm_t);
+                                       gnutls_cert * cert,
+                                       gnutls_datum_t * signature,
+                                       gnutls_sign_algorithm_t);
 
 int _gnutls_handshake_verify_data (gnutls_session_t session,
-                              gnutls_cert * cert,
-                              const gnutls_datum_t * params,
-                              gnutls_datum_t * signature,
-                              gnutls_sign_algorithm_t algo);
+                                  gnutls_cert * cert,
+                                  const gnutls_datum_t * params,
+                                  gnutls_datum_t * signature,
+                                  gnutls_sign_algorithm_t algo);
 
 int _gnutls_sign (gnutls_pk_algorithm_t algo,
                  bigint_t * params, int params_size,
diff --git a/lib/gnutls_srp.h b/lib/gnutls_srp.h
index 0c12d41..54b57f1 100644
--- a/lib/gnutls_srp.h
+++ b/lib/gnutls_srp.h
@@ -27,12 +27,14 @@
 
 int _gnutls_srp_gx (opaque * text, size_t textsize, opaque ** result,
                    bigint_t g, bigint_t prime, gnutls_alloc_function);
-bigint_t _gnutls_calc_srp_B (bigint_t * ret_b, bigint_t g, bigint_t n, 
bigint_t v);
+bigint_t _gnutls_calc_srp_B (bigint_t * ret_b, bigint_t g, bigint_t n,
+                            bigint_t v);
 bigint_t _gnutls_calc_srp_u (bigint_t A, bigint_t B, bigint_t N);
-bigint_t _gnutls_calc_srp_S1 (bigint_t A, bigint_t b, bigint_t u, bigint_t v, 
bigint_t n);
+bigint_t _gnutls_calc_srp_S1 (bigint_t A, bigint_t b, bigint_t u, bigint_t v,
+                             bigint_t n);
 bigint_t _gnutls_calc_srp_A (bigint_t * a, bigint_t g, bigint_t n);
-bigint_t _gnutls_calc_srp_S2 (bigint_t B, bigint_t g, bigint_t x, bigint_t a, 
bigint_t u,
-                          bigint_t n);
+bigint_t _gnutls_calc_srp_S2 (bigint_t B, bigint_t g, bigint_t x, bigint_t a,
+                             bigint_t u, bigint_t n);
 int _gnutls_calc_srp_x (char *username, char *password, opaque * salt,
                        size_t salt_size, size_t * size, void *digest);
 int _gnutls_srp_gn (opaque ** ret_g, opaque ** ret_n, int bits);
diff --git a/lib/gnutls_state.h b/lib/gnutls_state.h
index 0b85ca4..bc69bd3 100644
--- a/lib/gnutls_state.h
+++ b/lib/gnutls_state.h
@@ -45,7 +45,8 @@ int _gnutls_session_cert_type_supported (gnutls_session_t,
 int _gnutls_dh_set_secret_bits (gnutls_session_t session, unsigned bits);
 
 int _gnutls_dh_set_peer_public (gnutls_session_t session, bigint_t public);
-int _gnutls_dh_set_group (gnutls_session_t session, bigint_t gen, bigint_t 
prime);
+int _gnutls_dh_set_group (gnutls_session_t session, bigint_t gen,
+                         bigint_t prime);
 
 int _gnutls_dh_get_allowed_prime_bits (gnutls_session_t session);
 void _gnutls_handshake_internal_state_clear (gnutls_session_t);
diff --git a/lib/gnutls_str.h b/lib/gnutls_str.h
index 32ee16c..9888ea3 100644
--- a/lib/gnutls_str.h
+++ b/lib/gnutls_str.h
@@ -35,10 +35,10 @@ void _gnutls_str_cat (char *dest, size_t dest_tot_size, 
const char *src);
 
 typedef struct
 {
-  opaque *allocd; /* pointer to allocated data */
-  opaque *data; /* API: pointer to data to copy from */
+  opaque *allocd;              /* pointer to allocated data */
+  opaque *data;                        /* API: pointer to data to copy from */
   size_t max_length;
-  size_t length; /* API: current length */
+  size_t length;               /* API: current length */
   gnutls_realloc_function realloc_func;
   gnutls_alloc_function alloc_func;
   gnutls_free_function free_func;
@@ -53,8 +53,9 @@ int _gnutls_string_append_str (gnutls_string *, const char 
*str);
 int _gnutls_string_append_data (gnutls_string *, const void *data,
                                size_t data_size);
 
-void _gnutls_string_get_data( gnutls_string *, void*, size_t *size);
-void _gnutls_string_get_datum( gnutls_string *, gnutls_datum_t *, size_t 
max_size);
+void _gnutls_string_get_data (gnutls_string *, void *, size_t * size);
+void _gnutls_string_get_datum (gnutls_string *, gnutls_datum_t *,
+                              size_t max_size);
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */
@@ -80,7 +81,8 @@ char *_gnutls_bin2hex (const void *old, size_t oldlen, char 
*buffer,
 int _gnutls_hex2bin (const opaque * hex_data, int hex_size, opaque * bin_data,
                     size_t * bin_size);
 
-int _gnutls_hostname_compare (const char *certname, size_t certnamesize, const 
char *hostname);
+int _gnutls_hostname_compare (const char *certname, size_t certnamesize,
+                             const char *hostname);
 #define MAX_CN 256
 
 #endif
diff --git a/lib/gnutls_supplemental.h b/lib/gnutls_supplemental.h
index 67e4673..4a70f14 100644
--- a/lib/gnutls_supplemental.h
+++ b/lib/gnutls_supplemental.h
@@ -25,7 +25,5 @@
 #include <gnutls_int.h>
 
 int _gnutls_parse_supplemental (gnutls_session_t session,
-                               const uint8_t *data,
-                               int data_size);
-int _gnutls_gen_supplemental (gnutls_session_t session,
-                             gnutls_buffer *buf);
+                               const uint8_t * data, int data_size);
+int _gnutls_gen_supplemental (gnutls_session_t session, gnutls_buffer * buf);
diff --git a/lib/includes/gnutls/crypto.h b/lib/includes/gnutls/crypto.h
index 46fba9b..7e0b65d 100644
--- a/lib/includes/gnutls/crypto.h
+++ b/lib/includes/gnutls/crypto.h
@@ -25,40 +25,42 @@
 #ifndef GNUTLS_CRYPTO_H
 # define GNUTLS_CRYPTO_H
 
-typedef struct cipher_hd_st* gnutls_cipher_hd_t;
+typedef struct cipher_hd_st *gnutls_cipher_hd_t;
 
-int gnutls_cipher_init (gnutls_cipher_hd_t *handle,
+int gnutls_cipher_init (gnutls_cipher_hd_t * handle,
                        gnutls_cipher_algorithm_t cipher,
                        const gnutls_datum_t * key,
                        const gnutls_datum_t * iv);
 int gnutls_cipher_encrypt (const gnutls_cipher_hd_t handle,
                           void *text, int textlen);
 int gnutls_cipher_decrypt (const gnutls_cipher_hd_t handle,
-                          void *ciphertext,
-                          int ciphertextlen);
+                          void *ciphertext, int ciphertextlen);
 void gnutls_cipher_deinit (gnutls_cipher_hd_t handle);
 int gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm);
 
 
-typedef struct hash_hd_st* gnutls_hash_hd_t;
-typedef struct hmac_hd_st* gnutls_hmac_hd_t;
+typedef struct hash_hd_st *gnutls_hash_hd_t;
+typedef struct hmac_hd_st *gnutls_hmac_hd_t;
 
-int gnutls_hmac_init (gnutls_hmac_hd_t * dig, gnutls_digest_algorithm_t 
algorithm,
-                  const void *key, int keylen);
+int gnutls_hmac_init (gnutls_hmac_hd_t * dig,
+                     gnutls_digest_algorithm_t algorithm, const void *key,
+                     int keylen);
 int gnutls_hmac (gnutls_hmac_hd_t handle, const void *text, size_t textlen);
 void gnutls_hmac_output (gnutls_hmac_hd_t handle, void *digest);
 void gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void *digest);
-int gnutls_hmac_get_len( gnutls_mac_algorithm_t algorithm);
-int gnutls_hmac_fast( gnutls_mac_algorithm_t algorithm, const void* key, int 
keylen, 
-       const void* text, size_t textlen, void* digest);
+int gnutls_hmac_get_len (gnutls_mac_algorithm_t algorithm);
+int gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm, const void *key,
+                     int keylen, const void *text, size_t textlen,
+                     void *digest);
 
-int gnutls_hash_init (gnutls_hash_hd_t * dig, gnutls_digest_algorithm_t 
algorithm);
+int gnutls_hash_init (gnutls_hash_hd_t * dig,
+                     gnutls_digest_algorithm_t algorithm);
 int gnutls_hash (gnutls_hash_hd_t handle, const void *text, size_t textlen);
 void gnutls_hash_output (gnutls_hash_hd_t handle, void *digest);
 void gnutls_hash_deinit (gnutls_hash_hd_t handle, void *digest);
-int gnutls_hash_get_len( gnutls_digest_algorithm_t algorithm);
+int gnutls_hash_get_len (gnutls_digest_algorithm_t algorithm);
 int gnutls_hash_fast (gnutls_digest_algorithm_t algorithm,
-                   const void *text, size_t textlen, void *digest);
+                     const void *text, size_t textlen, void *digest);
 
 /* register ciphers */
 
@@ -104,11 +106,11 @@ typedef gnutls_crypto_mac_st gnutls_crypto_digest_st;
  * Enumeration of random quality levels.
  */
 typedef enum gnutls_rnd_level
-  {
-    GNUTLS_RND_NONCE = 0,
-    GNUTLS_RND_RANDOM = 1,
-    GNUTLS_RND_KEY = 2
-  } gnutls_rnd_level_t;
+{
+  GNUTLS_RND_NONCE = 0,
+  GNUTLS_RND_RANDOM = 1,
+  GNUTLS_RND_KEY = 2
+} gnutls_rnd_level_t;
 
 /**
  * gnutls_pk_flag_t:
@@ -117,9 +119,9 @@ typedef enum gnutls_rnd_level
  * Enumeration of public-key flag.
  */
 typedef enum
-  {
-    GNUTLS_PK_FLAG_NONE = 0
-  } gnutls_pk_flag_t;
+{
+  GNUTLS_PK_FLAG_NONE = 0
+} gnutls_pk_flag_t;
 
 typedef struct gnutls_crypto_rnd
 {
@@ -165,38 +167,38 @@ typedef struct gnutls_crypto_bigint
   /* as bigint_cmp */
   int (*bigint_cmp_ui) (const bigint_t m1, unsigned long m2);
   /* ret = a % b */
-  bigint_t (*bigint_mod) (const bigint_t a, const bigint_t b);
+    bigint_t (*bigint_mod) (const bigint_t a, const bigint_t b);
   /* a = b -> ret == a */
-  bigint_t (*bigint_set) (bigint_t a, const bigint_t b);
+    bigint_t (*bigint_set) (bigint_t a, const bigint_t b);
   /* a = b -> ret == a */
-  bigint_t (*bigint_set_ui) (bigint_t a, unsigned long b);
+    bigint_t (*bigint_set_ui) (bigint_t a, unsigned long b);
   unsigned int (*bigint_get_nbits) (const bigint_t a);
   /* w = b ^ e mod m */
-  bigint_t (*bigint_powm) (bigint_t w, const bigint_t b,
-                          const bigint_t e, const bigint_t m);
+    bigint_t (*bigint_powm) (bigint_t w, const bigint_t b,
+                            const bigint_t e, const bigint_t m);
   /* w = a + b mod m */
-  bigint_t (*bigint_addm) (bigint_t w, const bigint_t a,
-                          const bigint_t b, const bigint_t m);
+    bigint_t (*bigint_addm) (bigint_t w, const bigint_t a,
+                            const bigint_t b, const bigint_t m);
   /* w = a - b mod m */
-  bigint_t (*bigint_subm) (bigint_t w, const bigint_t a, const bigint_t b,
-                          const bigint_t m);
+    bigint_t (*bigint_subm) (bigint_t w, const bigint_t a, const bigint_t b,
+                            const bigint_t m);
   /* w = a * b mod m */
-  bigint_t (*bigint_mulm) (bigint_t w, const bigint_t a, const bigint_t b,
-                          const bigint_t m);
+    bigint_t (*bigint_mulm) (bigint_t w, const bigint_t a, const bigint_t b,
+                            const bigint_t m);
   /* w = a + b */ bigint_t (*bigint_add) (bigint_t w, const bigint_t a,
                                          const bigint_t b);
   /* w = a - b */ bigint_t (*bigint_sub) (bigint_t w, const bigint_t a,
                                          const bigint_t b);
   /* w = a * b */
-  bigint_t (*bigint_mul) (bigint_t w, const bigint_t a, const bigint_t b);
+    bigint_t (*bigint_mul) (bigint_t w, const bigint_t a, const bigint_t b);
   /* w = a + b */
-  bigint_t (*bigint_add_ui) (bigint_t w, const bigint_t a, unsigned long b);
+    bigint_t (*bigint_add_ui) (bigint_t w, const bigint_t a, unsigned long b);
   /* w = a - b */
-  bigint_t (*bigint_sub_ui) (bigint_t w, const bigint_t a, unsigned long b);
+    bigint_t (*bigint_sub_ui) (bigint_t w, const bigint_t a, unsigned long b);
   /* w = a * b */
-  bigint_t (*bigint_mul_ui) (bigint_t w, const bigint_t a, unsigned long b);
+    bigint_t (*bigint_mul_ui) (bigint_t w, const bigint_t a, unsigned long b);
   /* q = a / b */
-  bigint_t (*bigint_div) (bigint_t q, const bigint_t a, const bigint_t b);
+    bigint_t (*bigint_div) (bigint_t q, const bigint_t a, const bigint_t b);
   /* 0 if prime */
   int (*bigint_prime_check) (const bigint_t pp);
   int (*bigint_generate_group) (gnutls_group_st * gg, unsigned int bits);
@@ -206,8 +208,8 @@ typedef struct gnutls_crypto_bigint
    * GNUTLS_E_SHORT_MEMORY_BUFFER if buf_size is not sufficient to
    * store this integer, and updates the buf_size;
    */
-  bigint_t (*bigint_scan) (const void *buf, size_t buf_size,
-                          gnutls_bigint_format_t format);
+    bigint_t (*bigint_scan) (const void *buf, size_t buf_size,
+                            gnutls_bigint_format_t format);
   int (*bigint_print) (const bigint_t a, void *buf, size_t * buf_size,
                       gnutls_bigint_format_t format);
 } gnutls_crypto_bigint_st;
@@ -252,10 +254,10 @@ void gnutls_pk_params_init (gnutls_pk_params_st * p);
  * Enumeration of different directions.
  */
 typedef enum
-  {
-    GNUTLS_IMPORT = 0,
-    GNUTLS_EXPORT = 1
-  } gnutls_direction_t;
+{
+  GNUTLS_IMPORT = 0,
+  GNUTLS_EXPORT = 1
+} gnutls_direction_t;
 
 /* Public key algorithms */
 typedef struct gnutls_crypto_pk
@@ -264,17 +266,17 @@ typedef struct gnutls_crypto_pk
    * parameters, depending on the operation */
   int (*encrypt) (gnutls_pk_algorithm_t, gnutls_datum_t * ciphertext,
                  const gnutls_datum_t * plaintext,
-                 const gnutls_pk_params_st *public);
+                 const gnutls_pk_params_st * public);
   int (*decrypt) (gnutls_pk_algorithm_t, gnutls_datum_t * plaintext,
                  const gnutls_datum_t * ciphertext,
-                 const gnutls_pk_params_st *private);
+                 const gnutls_pk_params_st * private);
 
   int (*sign) (gnutls_pk_algorithm_t, gnutls_datum_t * signature,
               const gnutls_datum_t * data,
-              const gnutls_pk_params_st *private);
+              const gnutls_pk_params_st * private);
   int (*verify) (gnutls_pk_algorithm_t, const gnutls_datum_t * data,
                 const gnutls_datum_t * signature,
-                const gnutls_pk_params_st *public);
+                const gnutls_pk_params_st * public);
 
   int (*generate) (gnutls_pk_algorithm_t, unsigned int nbits,
                   gnutls_pk_params_st *);
@@ -299,15 +301,22 @@ typedef struct gnutls_crypto_pk
   gnutls_crypto_single_digest_register2(algo, prio,                    \
                                        GNUTLS_CRYPTO_API_VERSION, st)
 
-int gnutls_crypto_single_cipher_register2 (gnutls_cipher_algorithm_t algorithm,
-                                          int priority, int version,
-                                          const gnutls_crypto_single_cipher_st 
*s);
+int gnutls_crypto_single_cipher_register2 (gnutls_cipher_algorithm_t
+                                          algorithm, int priority,
+                                          int version,
+                                          const
+                                          gnutls_crypto_single_cipher_st *
+                                          s);
 int gnutls_crypto_single_mac_register2 (gnutls_mac_algorithm_t algorithm,
                                        int priority, int version,
-                                       const gnutls_crypto_single_mac_st * s);
-int gnutls_crypto_single_digest_register2 (gnutls_digest_algorithm_t algorithm,
-                                          int priority, int version,
-                                          const gnutls_crypto_single_digest_st 
*s);
+                                       const gnutls_crypto_single_mac_st *
+                                       s);
+int gnutls_crypto_single_digest_register2 (gnutls_digest_algorithm_t
+                                          algorithm, int priority,
+                                          int version,
+                                          const
+                                          gnutls_crypto_single_digest_st *
+                                          s);
 
 # define gnutls_crypto_cipher_register(prio, st)                       \
   gnutls_crypto_cipher_register2 (prio, GNUTLS_CRYPTO_API_VERSION, st)
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 1db7534..8f19802 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -42,14 +42,16 @@
 /* Get ssize_t. */
 #ifndef HAVE_SSIZE_T
 # define HAVE_SSIZE_T
+/* *INDENT-OFF* */
 @DEFINE_SSIZE_T@
+/* *INDENT-ON* */
 #endif
 /* Get time_t. */
 #include <time.h>
 #include <gnutls/compat.h>
-
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
 #define GNUTLS_VERSION "@VERSION@"
@@ -92,32 +94,32 @@ extern "C" {
    * Enumeration of different symmetric encryption algorithms.
    */
   typedef enum gnutls_cipher_algorithm
-    {
-      GNUTLS_CIPHER_UNKNOWN = 0,
-      GNUTLS_CIPHER_NULL = 1,
-      GNUTLS_CIPHER_ARCFOUR_128 = 2,
-      GNUTLS_CIPHER_3DES_CBC = 3,
-      GNUTLS_CIPHER_AES_128_CBC = 4,
-      GNUTLS_CIPHER_AES_256_CBC = 5,
-      GNUTLS_CIPHER_ARCFOUR_40 = 6,
-      GNUTLS_CIPHER_CAMELLIA_128_CBC = 7,
-      GNUTLS_CIPHER_CAMELLIA_256_CBC = 8,
-      GNUTLS_CIPHER_RC2_40_CBC = 90,
-      GNUTLS_CIPHER_DES_CBC = 91,
-      GNUTLS_CIPHER_AES_192_CBC = 92,
-
-      /* used only for PGP internals. Ignored in TLS/SSL
-       */
-      GNUTLS_CIPHER_IDEA_PGP_CFB = 200,
-      GNUTLS_CIPHER_3DES_PGP_CFB = 201,
-      GNUTLS_CIPHER_CAST5_PGP_CFB = 202,
-      GNUTLS_CIPHER_BLOWFISH_PGP_CFB = 203,
-      GNUTLS_CIPHER_SAFER_SK128_PGP_CFB = 204,
-      GNUTLS_CIPHER_AES128_PGP_CFB = 205,
-      GNUTLS_CIPHER_AES192_PGP_CFB = 206,
-      GNUTLS_CIPHER_AES256_PGP_CFB = 207,
-      GNUTLS_CIPHER_TWOFISH_PGP_CFB = 208
-    } gnutls_cipher_algorithm_t;
+  {
+    GNUTLS_CIPHER_UNKNOWN = 0,
+    GNUTLS_CIPHER_NULL = 1,
+    GNUTLS_CIPHER_ARCFOUR_128 = 2,
+    GNUTLS_CIPHER_3DES_CBC = 3,
+    GNUTLS_CIPHER_AES_128_CBC = 4,
+    GNUTLS_CIPHER_AES_256_CBC = 5,
+    GNUTLS_CIPHER_ARCFOUR_40 = 6,
+    GNUTLS_CIPHER_CAMELLIA_128_CBC = 7,
+    GNUTLS_CIPHER_CAMELLIA_256_CBC = 8,
+    GNUTLS_CIPHER_RC2_40_CBC = 90,
+    GNUTLS_CIPHER_DES_CBC = 91,
+    GNUTLS_CIPHER_AES_192_CBC = 92,
+
+    /* used only for PGP internals. Ignored in TLS/SSL
+     */
+    GNUTLS_CIPHER_IDEA_PGP_CFB = 200,
+    GNUTLS_CIPHER_3DES_PGP_CFB = 201,
+    GNUTLS_CIPHER_CAST5_PGP_CFB = 202,
+    GNUTLS_CIPHER_BLOWFISH_PGP_CFB = 203,
+    GNUTLS_CIPHER_SAFER_SK128_PGP_CFB = 204,
+    GNUTLS_CIPHER_AES128_PGP_CFB = 205,
+    GNUTLS_CIPHER_AES192_PGP_CFB = 206,
+    GNUTLS_CIPHER_AES256_PGP_CFB = 207,
+    GNUTLS_CIPHER_TWOFISH_PGP_CFB = 208
+  } gnutls_cipher_algorithm_t;
 
   /**
    * gnutls_kx_algorithm_t:
@@ -136,19 +138,19 @@ extern "C" {
    * Enumeration of different key exchange algorithms.
    */
   typedef enum
-    {
-      GNUTLS_KX_UNKNOWN = 0,
-      GNUTLS_KX_RSA = 1,
-      GNUTLS_KX_DHE_DSS = 2,
-      GNUTLS_KX_DHE_RSA = 3,
-      GNUTLS_KX_ANON_DH = 4,
-      GNUTLS_KX_SRP = 5,
-      GNUTLS_KX_RSA_EXPORT = 6,
-      GNUTLS_KX_SRP_RSA = 7,
-      GNUTLS_KX_SRP_DSS = 8,
-      GNUTLS_KX_PSK = 9,
-      GNUTLS_KX_DHE_PSK = 10
-    } gnutls_kx_algorithm_t;
+  {
+    GNUTLS_KX_UNKNOWN = 0,
+    GNUTLS_KX_RSA = 1,
+    GNUTLS_KX_DHE_DSS = 2,
+    GNUTLS_KX_DHE_RSA = 3,
+    GNUTLS_KX_ANON_DH = 4,
+    GNUTLS_KX_SRP = 5,
+    GNUTLS_KX_RSA_EXPORT = 6,
+    GNUTLS_KX_SRP_RSA = 7,
+    GNUTLS_KX_SRP_DSS = 8,
+    GNUTLS_KX_PSK = 9,
+    GNUTLS_KX_DHE_PSK = 10
+  } gnutls_kx_algorithm_t;
 
   /**
    * gnutls_params_type_t:
@@ -158,10 +160,10 @@ extern "C" {
    * Enumeration of different TLS session parameter types.
    */
   typedef enum
-    {
-      GNUTLS_PARAMS_RSA_EXPORT = 1,
-      GNUTLS_PARAMS_DH = 2
-    } gnutls_params_type_t;
+  {
+    GNUTLS_PARAMS_RSA_EXPORT = 1,
+    GNUTLS_PARAMS_DH = 2
+  } gnutls_params_type_t;
 
   /**
    * gnutls_credentials_type_t:
@@ -174,13 +176,13 @@ extern "C" {
    * Enumeration of different credential types.
    */
   typedef enum
-    {
-      GNUTLS_CRD_CERTIFICATE = 1,
-      GNUTLS_CRD_ANON,
-      GNUTLS_CRD_SRP,
-      GNUTLS_CRD_PSK,
-      GNUTLS_CRD_IA
-    } gnutls_credentials_type_t;
+  {
+    GNUTLS_CRD_CERTIFICATE = 1,
+    GNUTLS_CRD_ANON,
+    GNUTLS_CRD_SRP,
+    GNUTLS_CRD_PSK,
+    GNUTLS_CRD_IA
+  } gnutls_credentials_type_t;
 
 #define GNUTLS_MAC_SHA GNUTLS_MAC_SHA1
 #define GNUTLS_DIG_SHA GNUTLS_DIG_SHA1
@@ -202,20 +204,20 @@ extern "C" {
    * algorithms.
    */
   typedef enum
-    {
-      GNUTLS_MAC_UNKNOWN = 0,
-      GNUTLS_MAC_NULL = 1,
-      GNUTLS_MAC_MD5 = 2,
-      GNUTLS_MAC_SHA1 = 3,
-      GNUTLS_MAC_RMD160 = 4,
-      GNUTLS_MAC_MD2 = 5,
-      GNUTLS_MAC_SHA256 = 6,
-      GNUTLS_MAC_SHA384 = 7,
-      GNUTLS_MAC_SHA512 = 8,
-      GNUTLS_MAC_SHA224 = 9
+  {
+    GNUTLS_MAC_UNKNOWN = 0,
+    GNUTLS_MAC_NULL = 1,
+    GNUTLS_MAC_MD5 = 2,
+    GNUTLS_MAC_SHA1 = 3,
+    GNUTLS_MAC_RMD160 = 4,
+    GNUTLS_MAC_MD2 = 5,
+    GNUTLS_MAC_SHA256 = 6,
+    GNUTLS_MAC_SHA384 = 7,
+    GNUTLS_MAC_SHA512 = 8,
+    GNUTLS_MAC_SHA224 = 9
       /* If you add anything here, make sure you align with
-        gnutls_digest_algorithm_t. */
-    } gnutls_mac_algorithm_t;
+         gnutls_digest_algorithm_t. */
+  } gnutls_mac_algorithm_t;
 
   /**
    * gnutls_digest_algorithm_t:
@@ -233,20 +235,20 @@ extern "C" {
    * Enumeration of different digest (hash) algorithms.
    */
   typedef enum
-    {
-      GNUTLS_DIG_UNKNOWN = GNUTLS_MAC_UNKNOWN,
-      GNUTLS_DIG_NULL = GNUTLS_MAC_NULL,
-      GNUTLS_DIG_MD5 = GNUTLS_MAC_MD5,
-      GNUTLS_DIG_SHA1 = GNUTLS_MAC_SHA1,
-      GNUTLS_DIG_RMD160 = GNUTLS_MAC_RMD160,
-      GNUTLS_DIG_MD2 = GNUTLS_MAC_MD2,
-      GNUTLS_DIG_SHA256 = GNUTLS_MAC_SHA256,
-      GNUTLS_DIG_SHA384 = GNUTLS_MAC_SHA384,
-      GNUTLS_DIG_SHA512 = GNUTLS_MAC_SHA512,
-      GNUTLS_DIG_SHA224 = GNUTLS_MAC_SHA224,
-      /* If you add anything here, make sure you align with
-        gnutls_mac_algorithm_t. */
-    } gnutls_digest_algorithm_t;
+  {
+    GNUTLS_DIG_UNKNOWN = GNUTLS_MAC_UNKNOWN,
+    GNUTLS_DIG_NULL = GNUTLS_MAC_NULL,
+    GNUTLS_DIG_MD5 = GNUTLS_MAC_MD5,
+    GNUTLS_DIG_SHA1 = GNUTLS_MAC_SHA1,
+    GNUTLS_DIG_RMD160 = GNUTLS_MAC_RMD160,
+    GNUTLS_DIG_MD2 = GNUTLS_MAC_MD2,
+    GNUTLS_DIG_SHA256 = GNUTLS_MAC_SHA256,
+    GNUTLS_DIG_SHA384 = GNUTLS_MAC_SHA384,
+    GNUTLS_DIG_SHA512 = GNUTLS_MAC_SHA512,
+    GNUTLS_DIG_SHA224 = GNUTLS_MAC_SHA224,
+    /* If you add anything here, make sure you align with
+       gnutls_mac_algorithm_t. */
+  } gnutls_digest_algorithm_t;
 
   /* exported for other gnutls headers. This is the maximum number of
    * algorithms (ciphers, kx or macs).
@@ -264,15 +266,15 @@ extern "C" {
    * Enumeration of different TLS compression methods.
    */
   typedef enum
-    {
-      GNUTLS_COMP_UNKNOWN = 0,
-      GNUTLS_COMP_NULL = 1,
-      GNUTLS_COMP_DEFLATE = 2,
-      GNUTLS_COMP_ZLIB = GNUTLS_COMP_DEFLATE,
-      GNUTLS_COMP_LZO = 3              /* only available if gnutls-extra has
-                                          been initialized
-                                       */
-    } gnutls_compression_method_t;
+  {
+    GNUTLS_COMP_UNKNOWN = 0,
+    GNUTLS_COMP_NULL = 1,
+    GNUTLS_COMP_DEFLATE = 2,
+    GNUTLS_COMP_ZLIB = GNUTLS_COMP_DEFLATE,
+    GNUTLS_COMP_LZO = 3                /* only available if gnutls-extra has
+                                  been initialized
+                                */
+  } gnutls_compression_method_t;
 
   /**
    * gnutls_connection_end_t:
@@ -282,10 +284,10 @@ extern "C" {
    * Enumeration of different TLS connection end types.
    */
   typedef enum
-    {
-      GNUTLS_SERVER = 1,
-      GNUTLS_CLIENT
-    } gnutls_connection_end_t;
+  {
+    GNUTLS_SERVER = 1,
+    GNUTLS_CLIENT
+  } gnutls_connection_end_t;
 
   /**
    * gnutls_alert_level_t:
@@ -295,10 +297,10 @@ extern "C" {
    * Enumeration of different TLS alert severities.
    */
   typedef enum
-    {
-      GNUTLS_AL_WARNING = 1,
-      GNUTLS_AL_FATAL
-    } gnutls_alert_level_t;
+  {
+    GNUTLS_AL_WARNING = 1,
+    GNUTLS_AL_FATAL
+  } gnutls_alert_level_t;
 
   /**
    * gnutls_alert_description_t:
@@ -342,38 +344,38 @@ extern "C" {
    * Enumeration of different TLS alerts.
    */
   typedef enum
-    {
-      GNUTLS_A_CLOSE_NOTIFY,
-      GNUTLS_A_UNEXPECTED_MESSAGE = 10,
-      GNUTLS_A_BAD_RECORD_MAC = 20,
-      GNUTLS_A_DECRYPTION_FAILED,
-      GNUTLS_A_RECORD_OVERFLOW,
-      GNUTLS_A_DECOMPRESSION_FAILURE = 30,
-      GNUTLS_A_HANDSHAKE_FAILURE = 40,
-      GNUTLS_A_SSL3_NO_CERTIFICATE = 41,
-      GNUTLS_A_BAD_CERTIFICATE = 42,
-      GNUTLS_A_UNSUPPORTED_CERTIFICATE,
-      GNUTLS_A_CERTIFICATE_REVOKED,
-      GNUTLS_A_CERTIFICATE_EXPIRED,
-      GNUTLS_A_CERTIFICATE_UNKNOWN,
-      GNUTLS_A_ILLEGAL_PARAMETER,
-      GNUTLS_A_UNKNOWN_CA,
-      GNUTLS_A_ACCESS_DENIED,
-      GNUTLS_A_DECODE_ERROR = 50,
-      GNUTLS_A_DECRYPT_ERROR,
-      GNUTLS_A_EXPORT_RESTRICTION = 60,
-      GNUTLS_A_PROTOCOL_VERSION = 70,
-      GNUTLS_A_INSUFFICIENT_SECURITY,
-      GNUTLS_A_INTERNAL_ERROR = 80,
-      GNUTLS_A_USER_CANCELED = 90,
-      GNUTLS_A_NO_RENEGOTIATION = 100,
-      GNUTLS_A_UNSUPPORTED_EXTENSION = 110,
-      GNUTLS_A_CERTIFICATE_UNOBTAINABLE = 111,
-      GNUTLS_A_UNRECOGNIZED_NAME = 112,
-      GNUTLS_A_UNKNOWN_PSK_IDENTITY = 115,
-      GNUTLS_A_INNER_APPLICATION_FAILURE = 208,
-      GNUTLS_A_INNER_APPLICATION_VERIFICATION = 209
-    } gnutls_alert_description_t;
+  {
+    GNUTLS_A_CLOSE_NOTIFY,
+    GNUTLS_A_UNEXPECTED_MESSAGE = 10,
+    GNUTLS_A_BAD_RECORD_MAC = 20,
+    GNUTLS_A_DECRYPTION_FAILED,
+    GNUTLS_A_RECORD_OVERFLOW,
+    GNUTLS_A_DECOMPRESSION_FAILURE = 30,
+    GNUTLS_A_HANDSHAKE_FAILURE = 40,
+    GNUTLS_A_SSL3_NO_CERTIFICATE = 41,
+    GNUTLS_A_BAD_CERTIFICATE = 42,
+    GNUTLS_A_UNSUPPORTED_CERTIFICATE,
+    GNUTLS_A_CERTIFICATE_REVOKED,
+    GNUTLS_A_CERTIFICATE_EXPIRED,
+    GNUTLS_A_CERTIFICATE_UNKNOWN,
+    GNUTLS_A_ILLEGAL_PARAMETER,
+    GNUTLS_A_UNKNOWN_CA,
+    GNUTLS_A_ACCESS_DENIED,
+    GNUTLS_A_DECODE_ERROR = 50,
+    GNUTLS_A_DECRYPT_ERROR,
+    GNUTLS_A_EXPORT_RESTRICTION = 60,
+    GNUTLS_A_PROTOCOL_VERSION = 70,
+    GNUTLS_A_INSUFFICIENT_SECURITY,
+    GNUTLS_A_INTERNAL_ERROR = 80,
+    GNUTLS_A_USER_CANCELED = 90,
+    GNUTLS_A_NO_RENEGOTIATION = 100,
+    GNUTLS_A_UNSUPPORTED_EXTENSION = 110,
+    GNUTLS_A_CERTIFICATE_UNOBTAINABLE = 111,
+    GNUTLS_A_UNRECOGNIZED_NAME = 112,
+    GNUTLS_A_UNKNOWN_PSK_IDENTITY = 115,
+    GNUTLS_A_INNER_APPLICATION_FAILURE = 208,
+    GNUTLS_A_INNER_APPLICATION_VERIFICATION = 209
+  } gnutls_alert_description_t;
 
   /**
    * gnutls_handshake_description_t:
@@ -393,20 +395,20 @@ extern "C" {
    * Enumeration of different TLS handshake packets.
    */
   typedef enum
-    {
-      GNUTLS_HANDSHAKE_HELLO_REQUEST = 0,
-      GNUTLS_HANDSHAKE_CLIENT_HELLO = 1,
-      GNUTLS_HANDSHAKE_SERVER_HELLO = 2,
-      GNUTLS_HANDSHAKE_NEW_SESSION_TICKET = 4,
-      GNUTLS_HANDSHAKE_CERTIFICATE_PKT = 11,
-      GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE = 12,
-      GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST = 13,
-      GNUTLS_HANDSHAKE_SERVER_HELLO_DONE = 14,
-      GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY = 15,
-      GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE = 16,
-      GNUTLS_HANDSHAKE_FINISHED = 20,
-      GNUTLS_HANDSHAKE_SUPPLEMENTAL = 23
-    } gnutls_handshake_description_t;
+  {
+    GNUTLS_HANDSHAKE_HELLO_REQUEST = 0,
+    GNUTLS_HANDSHAKE_CLIENT_HELLO = 1,
+    GNUTLS_HANDSHAKE_SERVER_HELLO = 2,
+    GNUTLS_HANDSHAKE_NEW_SESSION_TICKET = 4,
+    GNUTLS_HANDSHAKE_CERTIFICATE_PKT = 11,
+    GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE = 12,
+    GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST = 13,
+    GNUTLS_HANDSHAKE_SERVER_HELLO_DONE = 14,
+    GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY = 15,
+    GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE = 16,
+    GNUTLS_HANDSHAKE_FINISHED = 20,
+    GNUTLS_HANDSHAKE_SUPPLEMENTAL = 23
+  } gnutls_handshake_description_t;
 
   /**
    * gnutls_certificate_status_t:
@@ -428,15 +430,15 @@ extern "C" {
    * certificate verification.
    */
   typedef enum
-    {
-      GNUTLS_CERT_INVALID = 2,
-      GNUTLS_CERT_REVOKED = 32,
-      GNUTLS_CERT_SIGNER_NOT_FOUND = 64,
-      GNUTLS_CERT_SIGNER_NOT_CA = 128,
-      GNUTLS_CERT_INSECURE_ALGORITHM = 256,
-      GNUTLS_CERT_NOT_ACTIVATED = 512,
-      GNUTLS_CERT_EXPIRED = 1024
-    } gnutls_certificate_status_t;
+  {
+    GNUTLS_CERT_INVALID = 2,
+    GNUTLS_CERT_REVOKED = 32,
+    GNUTLS_CERT_SIGNER_NOT_FOUND = 64,
+    GNUTLS_CERT_SIGNER_NOT_CA = 128,
+    GNUTLS_CERT_INSECURE_ALGORITHM = 256,
+    GNUTLS_CERT_NOT_ACTIVATED = 512,
+    GNUTLS_CERT_EXPIRED = 1024
+  } gnutls_certificate_status_t;
 
   /**
    * gnutls_certificate_request_t:
@@ -447,11 +449,11 @@ extern "C" {
    * Enumeration of certificate request types.
    */
   typedef enum
-    {
-      GNUTLS_CERT_IGNORE = 0,
-      GNUTLS_CERT_REQUEST = 1,
-      GNUTLS_CERT_REQUIRE = 2
-    } gnutls_certificate_request_t;
+  {
+    GNUTLS_CERT_IGNORE = 0,
+    GNUTLS_CERT_REQUEST = 1,
+    GNUTLS_CERT_REQUIRE = 2
+  } gnutls_certificate_request_t;
 
   /**
    * gnutls_openpgp_crt_status_t:
@@ -461,10 +463,10 @@ extern "C" {
    * Enumeration of ways to send OpenPGP certificate.
    */
   typedef enum
-    {
-      GNUTLS_OPENPGP_CERT = 0,
-      GNUTLS_OPENPGP_CERT_FINGERPRINT = 1
-    } gnutls_openpgp_crt_status_t;
+  {
+    GNUTLS_OPENPGP_CERT = 0,
+    GNUTLS_OPENPGP_CERT_FINGERPRINT = 1
+  } gnutls_openpgp_crt_status_t;
 
   /**
    * gnutls_close_request_t:
@@ -474,10 +476,10 @@ extern "C" {
    * Enumeration of how TLS session should be terminated.  See gnutls_bye().
    */
   typedef enum
-    {
-      GNUTLS_SHUT_RDWR = 0,
-      GNUTLS_SHUT_WR = 1
-    } gnutls_close_request_t;
+  {
+    GNUTLS_SHUT_RDWR = 0,
+    GNUTLS_SHUT_WR = 1
+  } gnutls_close_request_t;
 
   /**
    * gnutls_protocol_t:
@@ -492,15 +494,15 @@ extern "C" {
    * Enumeration of different SSL/TLS protocol versions.
    */
   typedef enum
-    {
-      GNUTLS_SSL3 = 1,
-      GNUTLS_TLS1_0 = 2,
-      GNUTLS_TLS1 = GNUTLS_TLS1_0,
-      GNUTLS_TLS1_1 = 3,
-      GNUTLS_TLS1_2 = 4,
-      GNUTLS_VERSION_MAX = GNUTLS_TLS1_2,
-      GNUTLS_VERSION_UNKNOWN = 0xff
-    } gnutls_protocol_t;
+  {
+    GNUTLS_SSL3 = 1,
+    GNUTLS_TLS1_0 = 2,
+    GNUTLS_TLS1 = GNUTLS_TLS1_0,
+    GNUTLS_TLS1_1 = 3,
+    GNUTLS_TLS1_2 = 4,
+    GNUTLS_VERSION_MAX = GNUTLS_TLS1_2,
+    GNUTLS_VERSION_UNKNOWN = 0xff
+  } gnutls_protocol_t;
 
   /**
    * gnutls_certificate_type_t:
@@ -511,11 +513,11 @@ extern "C" {
    * Enumeration of different certificate types.
    */
   typedef enum
-    {
-      GNUTLS_CRT_UNKNOWN = 0,
-      GNUTLS_CRT_X509 = 1,
-      GNUTLS_CRT_OPENPGP = 2
-    } gnutls_certificate_type_t;
+  {
+    GNUTLS_CRT_UNKNOWN = 0,
+    GNUTLS_CRT_X509 = 1,
+    GNUTLS_CRT_OPENPGP = 2
+  } gnutls_certificate_type_t;
 
   /**
    * gnutls_x509_crt_fmt_t:
@@ -525,10 +527,10 @@ extern "C" {
    * Enumeration of different certificate encoding formats.
    */
   typedef enum
-    {
-      GNUTLS_X509_FMT_DER = 0,
-      GNUTLS_X509_FMT_PEM = 1
-    } gnutls_x509_crt_fmt_t;
+  {
+    GNUTLS_X509_FMT_DER = 0,
+    GNUTLS_X509_FMT_PEM = 1
+  } gnutls_x509_crt_fmt_t;
 
   /**
    * gnutls_certificate_print_formats_t:
@@ -539,11 +541,11 @@ extern "C" {
    * Enumeration of different certificate printing variants.
    */
   typedef enum gnutls_certificate_print_formats
-    {
-      GNUTLS_CRT_PRINT_FULL = 0,
-      GNUTLS_CRT_PRINT_ONELINE = 1,
-      GNUTLS_CRT_PRINT_UNSIGNED_FULL = 2
-    } gnutls_certificate_print_formats_t;
+  {
+    GNUTLS_CRT_PRINT_FULL = 0,
+    GNUTLS_CRT_PRINT_ONELINE = 1,
+    GNUTLS_CRT_PRINT_UNSIGNED_FULL = 2
+  } gnutls_certificate_print_formats_t;
 
   /**
    * gnutls_pk_algorithm_t:
@@ -580,23 +582,22 @@ extern "C" {
    * Enumeration of different digital signature algorithms.
    */
   typedef enum
-    {
-      GNUTLS_SIGN_UNKNOWN = 0,
-      GNUTLS_SIGN_RSA_SHA1 = 1,
-      GNUTLS_SIGN_RSA_SHA = GNUTLS_SIGN_RSA_SHA1,
-      GNUTLS_SIGN_DSA_SHA1 = 2,
-      GNUTLS_SIGN_DSA_SHA = GNUTLS_SIGN_DSA_SHA1,
-      GNUTLS_SIGN_RSA_MD5 = 3,
-      GNUTLS_SIGN_RSA_MD2 = 4,
-      GNUTLS_SIGN_RSA_RMD160 = 5,
-      GNUTLS_SIGN_RSA_SHA256 = 6,
-      GNUTLS_SIGN_RSA_SHA384 = 7,
-      GNUTLS_SIGN_RSA_SHA512 = 8,
-      GNUTLS_SIGN_RSA_SHA224 = 9
-    } gnutls_sign_algorithm_t;
-
-  const char *
-  gnutls_sign_algorithm_get_name (gnutls_sign_algorithm_t sign);
+  {
+    GNUTLS_SIGN_UNKNOWN = 0,
+    GNUTLS_SIGN_RSA_SHA1 = 1,
+    GNUTLS_SIGN_RSA_SHA = GNUTLS_SIGN_RSA_SHA1,
+    GNUTLS_SIGN_DSA_SHA1 = 2,
+    GNUTLS_SIGN_DSA_SHA = GNUTLS_SIGN_DSA_SHA1,
+    GNUTLS_SIGN_RSA_MD5 = 3,
+    GNUTLS_SIGN_RSA_MD2 = 4,
+    GNUTLS_SIGN_RSA_RMD160 = 5,
+    GNUTLS_SIGN_RSA_SHA256 = 6,
+    GNUTLS_SIGN_RSA_SHA384 = 7,
+    GNUTLS_SIGN_RSA_SHA512 = 8,
+    GNUTLS_SIGN_RSA_SHA224 = 9
+  } gnutls_sign_algorithm_t;
+
+  const char *gnutls_sign_algorithm_get_name (gnutls_sign_algorithm_t sign);
 
 /* If you want to change this, then also change the define in
  * gnutls_int.h, and recompile.
@@ -660,13 +661,13 @@ extern "C" {
   gnutls_cipher_algorithm_t gnutls_cipher_get (gnutls_session_t session);
   gnutls_kx_algorithm_t gnutls_kx_get (gnutls_session_t session);
   gnutls_mac_algorithm_t gnutls_mac_get (gnutls_session_t session);
-  gnutls_compression_method_t
-  gnutls_compression_get (gnutls_session_t session);
-  gnutls_certificate_type_t
-  gnutls_certificate_type_get (gnutls_session_t session);
+    gnutls_compression_method_t
+    gnutls_compression_get (gnutls_session_t session);
+    gnutls_certificate_type_t
+    gnutls_certificate_type_get (gnutls_session_t session);
   int gnutls_sign_algorithm_get_requested (gnutls_session_t session,
                                           size_t indx,
-                                          gnutls_sign_algorithm_t *algo);
+                                          gnutls_sign_algorithm_t * algo);
 
   size_t gnutls_cipher_get_key_size (gnutls_cipher_algorithm_t algorithm);
   size_t gnutls_mac_get_key_size (gnutls_mac_algorithm_t algorithm);
@@ -674,20 +675,20 @@ extern "C" {
 /* the name of the specified algorithms */
   const char *gnutls_cipher_get_name (gnutls_cipher_algorithm_t algorithm);
   const char *gnutls_mac_get_name (gnutls_mac_algorithm_t algorithm);
-  const char *
-  gnutls_compression_get_name (gnutls_compression_method_t algorithm);
+  const char *gnutls_compression_get_name (gnutls_compression_method_t
+                                          algorithm);
   const char *gnutls_kx_get_name (gnutls_kx_algorithm_t algorithm);
-  const char *
-  gnutls_certificate_type_get_name (gnutls_certificate_type_t type);
+  const char *gnutls_certificate_type_get_name (gnutls_certificate_type_t
+                                               type);
   const char *gnutls_pk_get_name (gnutls_pk_algorithm_t algorithm);
   const char *gnutls_sign_get_name (gnutls_sign_algorithm_t algorithm);
 
-  gnutls_mac_algorithm_t gnutls_mac_get_id (const char* name);
-  gnutls_compression_method_t gnutls_compression_get_id (const char* name);
-  gnutls_cipher_algorithm_t gnutls_cipher_get_id (const char* name);
-  gnutls_kx_algorithm_t gnutls_kx_get_id (const char* name);
-  gnutls_protocol_t gnutls_protocol_get_id (const char* name);
-  gnutls_certificate_type_t gnutls_certificate_type_get_id (const char* name);
+  gnutls_mac_algorithm_t gnutls_mac_get_id (const char *name);
+  gnutls_compression_method_t gnutls_compression_get_id (const char *name);
+  gnutls_cipher_algorithm_t gnutls_cipher_get_id (const char *name);
+  gnutls_kx_algorithm_t gnutls_kx_get_id (const char *name);
+  gnutls_protocol_t gnutls_protocol_get_id (const char *name);
+  gnutls_certificate_type_t gnutls_certificate_type_get_id (const char *name);
   gnutls_pk_algorithm_t gnutls_pk_get_id (const char *name);
   gnutls_sign_algorithm_t gnutls_sign_get_id (const char *name);
 
@@ -702,10 +703,10 @@ extern "C" {
   const gnutls_sign_algorithm_t *gnutls_sign_list (void);
   const char *gnutls_cipher_suite_info (size_t idx,
                                        char *cs_id,
-                                       gnutls_kx_algorithm_t *kx,
-                                       gnutls_cipher_algorithm_t *cipher,
-                                       gnutls_mac_algorithm_t *mac,
-                                       gnutls_protocol_t *version);
+                                       gnutls_kx_algorithm_t * kx,
+                                       gnutls_cipher_algorithm_t * cipher,
+                                       gnutls_mac_algorithm_t * mac,
+                                       gnutls_protocol_t * version);
 
   /* error functions */
   int gnutls_error_is_fatal (int error);
@@ -719,10 +720,10 @@ extern "C" {
  */
   void gnutls_handshake_set_private_extensions (gnutls_session_t session,
                                                int allow);
-  gnutls_handshake_description_t
-  gnutls_handshake_get_last_out (gnutls_session_t session);
-  gnutls_handshake_description_t
-  gnutls_handshake_get_last_in (gnutls_session_t session);
+    gnutls_handshake_description_t
+    gnutls_handshake_get_last_out (gnutls_session_t session);
+    gnutls_handshake_description_t
+    gnutls_handshake_get_last_in (gnutls_session_t session);
 
 /* Record layer functions.
  */
@@ -777,13 +778,13 @@ extern "C" {
    * is called.
    */
   typedef enum
-    {
-      GNUTLS_EXT_ANY = 0,
-      GNUTLS_EXT_APPLICATION = 1,
-      GNUTLS_EXT_TLS = 2,
-      GNUTLS_EXT_MANDATORY = 3,
-      GNUTLS_EXT_NONE = 4,
-    } gnutls_ext_parse_type_t;
+  {
+    GNUTLS_EXT_ANY = 0,
+    GNUTLS_EXT_APPLICATION = 1,
+    GNUTLS_EXT_TLS = 2,
+    GNUTLS_EXT_MANDATORY = 3,
+    GNUTLS_EXT_NONE = 4,
+  } gnutls_ext_parse_type_t;
 
   int gnutls_ext_register (int type,
                           const char *name,
@@ -798,9 +799,9 @@ extern "C" {
    * Enumeration of different server name types.
    */
   typedef enum
-    {
-      GNUTLS_NAME_DNS = 1
-    } gnutls_server_name_type_t;
+  {
+    GNUTLS_NAME_DNS = 1
+  } gnutls_server_name_type_t;
 
   int gnutls_server_name_set (gnutls_session_t session,
                              gnutls_server_name_type_t type,
@@ -811,7 +812,8 @@ extern "C" {
                              unsigned int *type, unsigned int indx);
 
   /* Safe renegotiation */
-  void gnutls_safe_negotiation_set_initial (gnutls_session_t session, int 
value);
+  void gnutls_safe_negotiation_set_initial (gnutls_session_t session,
+                                           int value);
 
   void gnutls_safe_renegotiation_set (gnutls_session_t session, int value);
 
@@ -822,9 +824,8 @@ extern "C" {
    */
 
   void
-  gnutls_oprfi_enable_client (gnutls_session_t session,
-                             size_t len,
-                             unsigned char *data);
+    gnutls_oprfi_enable_client (gnutls_session_t session,
+                               size_t len, unsigned char *data);
 
   typedef int (*gnutls_oprfi_callback_func) (gnutls_session_t session,
                                             void *userdata,
@@ -833,9 +834,9 @@ extern "C" {
                                             unsigned char *out_oprfi);
 
   void
-  gnutls_oprfi_enable_server (gnutls_session_t session,
-                             gnutls_oprfi_callback_func cb,
-                             void *userdata);
+    gnutls_oprfi_enable_server (gnutls_session_t session,
+                               gnutls_oprfi_callback_func cb,
+                               void *userdata);
 
   /**
    * gnutls_supplemental_data_format_type_t:
@@ -844,18 +845,19 @@ extern "C" {
    * Enumeration of different supplemental data types (RFC 4680).
    */
   typedef enum
-    {
-      GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA = 0
-    } gnutls_supplemental_data_format_type_t;
+  {
+    GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA = 0
+  } gnutls_supplemental_data_format_type_t;
 
-  const char *
-  gnutls_supplemental_get_name (gnutls_supplemental_data_format_type_t type);
+  const char
+    *gnutls_supplemental_get_name (gnutls_supplemental_data_format_type_t
+                                  type);
 
   /* SessionTicket, RFC 5077. */
-  int gnutls_session_ticket_key_generate (gnutls_datum_t *key);
+  int gnutls_session_ticket_key_generate (gnutls_datum_t * key);
   int gnutls_session_ticket_enable_client (gnutls_session_t session);
   int gnutls_session_ticket_enable_server (gnutls_session_t session,
-                                          const gnutls_datum_t *key);
+                                          const gnutls_datum_t * key);
 
   /* functions to set priority of cipher suites
    */
@@ -871,16 +873,15 @@ extern "C" {
 
 /* if you just want some defaults, use the following.
  */
-  int gnutls_priority_init (gnutls_priority_t *priority_cache,
-                           const char *priorities,
-                           const char** err_pos);
+  int gnutls_priority_init (gnutls_priority_t * priority_cache,
+                           const char *priorities, const char **err_pos);
   void gnutls_priority_deinit (gnutls_priority_t priority_cache);
 
   int gnutls_priority_set (gnutls_session_t session,
                           gnutls_priority_t priority);
   int gnutls_priority_set_direct (gnutls_session_t session,
                                  const char *priorities,
-                                 const char** err_pos);
+                                 const char **err_pos);
 
   /* for compatibility
    */
@@ -888,10 +889,12 @@ extern "C" {
   int gnutls_set_default_export_priority (gnutls_session_t session);
 
 /* Returns the name of a cipher suite */
-  const char *
-  gnutls_cipher_suite_get_name (gnutls_kx_algorithm_t kx_algorithm,
-                               gnutls_cipher_algorithm_t cipher_algorithm,
-                               gnutls_mac_algorithm_t mac_algorithm);
+  const char *gnutls_cipher_suite_get_name (gnutls_kx_algorithm_t
+                                           kx_algorithm,
+                                           gnutls_cipher_algorithm_t
+                                           cipher_algorithm,
+                                           gnutls_mac_algorithm_t
+                                           mac_algorithm);
 
 /* get the currently used protocol version */
   gnutls_protocol_t gnutls_protocol_get_version (gnutls_session_t session);
@@ -927,8 +930,8 @@ extern "C" {
                                                 const void *finished,
                                                 size_t len);
   void
-  gnutls_session_set_finished_function (gnutls_session_t session,
-                                       gnutls_finished_callback_func func);
+    gnutls_session_set_finished_function (gnutls_session_t session,
+                                         gnutls_finished_callback_func func);
 
 /* checks if this session is a resumed one 
  */
@@ -953,10 +956,11 @@ extern "C" {
   int gnutls_db_check_entry (gnutls_session_t session,
                             gnutls_datum_t session_entry);
 
-  typedef int (*gnutls_handshake_post_client_hello_func)(gnutls_session_t);
+  typedef int (*gnutls_handshake_post_client_hello_func) (gnutls_session_t);
   void
-  gnutls_handshake_set_post_client_hello_function(gnutls_session_t session,
-                                                 
gnutls_handshake_post_client_hello_func func);
+    gnutls_handshake_set_post_client_hello_function (gnutls_session_t session,
+                                                    
gnutls_handshake_post_client_hello_func
+                                                    func);
 
   void gnutls_handshake_set_max_packet_length (gnutls_session_t session,
                                               size_t max);
@@ -990,28 +994,34 @@ extern "C" {
   typedef struct gnutls_anon_client_credentials_st
     *gnutls_anon_client_credentials_t;
 
-  void gnutls_anon_free_server_credentials (gnutls_anon_server_credentials_t 
sc);
-  int gnutls_anon_allocate_server_credentials 
(gnutls_anon_server_credentials_t * sc);
+  void gnutls_anon_free_server_credentials (gnutls_anon_server_credentials_t
+                                           sc);
+  int
+    gnutls_anon_allocate_server_credentials (gnutls_anon_server_credentials_t
+                                            * sc);
 
   void gnutls_anon_set_server_dh_params (gnutls_anon_server_credentials_t res,
                                         gnutls_dh_params_t dh_params);
 
   void
-  gnutls_anon_set_server_params_function (gnutls_anon_server_credentials_t res,
-                                         gnutls_params_function * func);
+    gnutls_anon_set_server_params_function (gnutls_anon_server_credentials_t
+                                           res,
+                                           gnutls_params_function * func);
 
   void
-  gnutls_anon_free_client_credentials (gnutls_anon_client_credentials_t sc);
+    gnutls_anon_free_client_credentials (gnutls_anon_client_credentials_t sc);
   int
-  gnutls_anon_allocate_client_credentials (gnutls_anon_client_credentials_t * 
sc);
+    gnutls_anon_allocate_client_credentials (gnutls_anon_client_credentials_t
+                                            * sc);
 
 /* CERTFILE is an x509 certificate in PEM form.
  * KEYFILE is a pkcs-1 private key in PEM form (for RSA keys).
  */
   void
-  gnutls_certificate_free_credentials (gnutls_certificate_credentials_t sc);
+    gnutls_certificate_free_credentials (gnutls_certificate_credentials_t sc);
   int
-  gnutls_certificate_allocate_credentials (gnutls_certificate_credentials_t 
*res);
+    gnutls_certificate_allocate_credentials (gnutls_certificate_credentials_t
+                                            * res);
 
   void gnutls_certificate_free_keys (gnutls_certificate_credentials_t sc);
   void gnutls_certificate_free_cas (gnutls_certificate_credentials_t sc);
@@ -1021,54 +1031,50 @@ extern "C" {
   void gnutls_certificate_set_dh_params (gnutls_certificate_credentials_t res,
                                         gnutls_dh_params_t dh_params);
   void
-  gnutls_certificate_set_rsa_export_params (gnutls_certificate_credentials_t 
res,
-                                           gnutls_rsa_params_t rsa_params);
-  void
-  gnutls_certificate_set_verify_flags (gnutls_certificate_credentials_t res,
-                                      unsigned int flags);
-  void
-  gnutls_certificate_set_verify_limits (gnutls_certificate_credentials_t res,
-                                       unsigned int max_bits,
-                                       unsigned int max_depth);
+    gnutls_certificate_set_rsa_export_params (gnutls_certificate_credentials_t
+                                             res,
+                                             gnutls_rsa_params_t rsa_params);
+  void gnutls_certificate_set_verify_flags (gnutls_certificate_credentials_t
+                                           res, unsigned int flags);
+  void gnutls_certificate_set_verify_limits (gnutls_certificate_credentials_t
+                                            res, unsigned int max_bits,
+                                            unsigned int max_depth);
 
   int
-  gnutls_certificate_set_x509_trust_file (gnutls_certificate_credentials_t res,
-                                         const char *cafile,
-                                         gnutls_x509_crt_fmt_t type);
-  int
-  gnutls_certificate_set_x509_trust_mem (gnutls_certificate_credentials_t res,
-                                        const gnutls_datum_t * ca,
-                                        gnutls_x509_crt_fmt_t type);
+    gnutls_certificate_set_x509_trust_file (gnutls_certificate_credentials_t
+                                           res, const char *cafile,
+                                           gnutls_x509_crt_fmt_t type);
+  int gnutls_certificate_set_x509_trust_mem (gnutls_certificate_credentials_t
+                                            res, const gnutls_datum_t * ca,
+                                            gnutls_x509_crt_fmt_t type);
 
   int
-  gnutls_certificate_set_x509_crl_file (gnutls_certificate_credentials_t res,
-                                       const char *crlfile,
-                                       gnutls_x509_crt_fmt_t type);
-  int
-  gnutls_certificate_set_x509_crl_mem (gnutls_certificate_credentials_t res,
-                                      const gnutls_datum_t * CRL,
-                                      gnutls_x509_crt_fmt_t type);
+    gnutls_certificate_set_x509_crl_file (gnutls_certificate_credentials_t
+                                         res, const char *crlfile,
+                                         gnutls_x509_crt_fmt_t type);
+  int gnutls_certificate_set_x509_crl_mem (gnutls_certificate_credentials_t
+                                          res, const gnutls_datum_t * CRL,
+                                          gnutls_x509_crt_fmt_t type);
 
   int
-  gnutls_certificate_set_x509_key_file (gnutls_certificate_credentials_t res,
-                                       const char *certfile,
-                                       const char *keyfile,
-                                       gnutls_x509_crt_fmt_t type);
-  int
-  gnutls_certificate_set_x509_key_mem (gnutls_certificate_credentials_t res,
-                                      const gnutls_datum_t * cert,
-                                      const gnutls_datum_t * key,
-                                      gnutls_x509_crt_fmt_t type);
+    gnutls_certificate_set_x509_key_file (gnutls_certificate_credentials_t
+                                         res, const char *certfile,
+                                         const char *keyfile,
+                                         gnutls_x509_crt_fmt_t type);
+  int gnutls_certificate_set_x509_key_mem (gnutls_certificate_credentials_t
+                                          res, const gnutls_datum_t * cert,
+                                          const gnutls_datum_t * key,
+                                          gnutls_x509_crt_fmt_t type);
 
   void gnutls_certificate_send_x509_rdn_sequence (gnutls_session_t session,
                                                  int status);
 
   int gnutls_certificate_set_x509_simple_pkcs12_file
-  (gnutls_certificate_credentials_t res, const char *pkcs12file,
-   gnutls_x509_crt_fmt_t type, const char *password);
+    (gnutls_certificate_credentials_t res, const char *pkcs12file,
+     gnutls_x509_crt_fmt_t type, const char *password);
   int gnutls_certificate_set_x509_simple_pkcs12_mem
-  (gnutls_certificate_credentials_t res, const gnutls_datum_t *p12blob,
-   gnutls_x509_crt_fmt_t type, const char *password);
+    (gnutls_certificate_credentials_t res, const gnutls_datum_t * p12blob,
+     gnutls_x509_crt_fmt_t type, const char *password);
 
 /* New functions to allow setting already parsed X.509 stuff.
  */
@@ -1096,15 +1102,18 @@ extern "C" {
                                       int crl_list_size);
 
   void gnutls_certificate_get_x509_cas (gnutls_certificate_credentials_t sc,
-                                       gnutls_x509_crt_t **x509_ca_list,
-                                       unsigned int* ncas);
+                                       gnutls_x509_crt_t ** x509_ca_list,
+                                       unsigned int *ncas);
 
   void gnutls_certificate_get_x509_crls (gnutls_certificate_credentials_t sc,
-                                        gnutls_x509_crl_t **x509_crl_list,
-                                        unsigned int* ncrls);
+                                        gnutls_x509_crl_t ** x509_crl_list,
+                                        unsigned int *ncrls);
 
-  void gnutls_certificate_get_openpgp_keyring 
(gnutls_certificate_credentials_t sc,
-                                              gnutls_openpgp_keyring_t 
*keyring);
+  void
+    gnutls_certificate_get_openpgp_keyring (gnutls_certificate_credentials_t
+                                           sc,
+                                           gnutls_openpgp_keyring_t *
+                                           keyring);
 
 /* global state functions
  */
@@ -1118,11 +1127,11 @@ extern "C" {
   typedef void *(*gnutls_realloc_function) (void *, size_t);
 
   void
-  gnutls_global_set_mem_functions (gnutls_alloc_function alloc_func,
-                                  gnutls_alloc_function secure_alloc_func,
-                                  gnutls_is_secure_function is_secure_func,
-                                  gnutls_realloc_function realloc_func,
-                                  gnutls_free_function free_func);
+    gnutls_global_set_mem_functions (gnutls_alloc_function alloc_func,
+                                    gnutls_alloc_function secure_alloc_func,
+                                    gnutls_is_secure_function is_secure_func,
+                                    gnutls_realloc_function realloc_func,
+                                    gnutls_free_function free_func);
 
 /* For use in callbacks */
   extern gnutls_alloc_function gnutls_malloc;
@@ -1222,7 +1231,7 @@ extern "C" {
   void *gnutls_session_get_ptr (gnutls_session_t session);
 
   void gnutls_openpgp_send_cert (gnutls_session_t session,
-                               gnutls_openpgp_crt_status_t status);
+                                gnutls_openpgp_crt_status_t status);
 
 /* fingerprint 
  * Actually this function returns the hash of the given data.
@@ -1241,22 +1250,22 @@ extern "C" {
     *gnutls_srp_client_credentials_t;
 
   void
-  gnutls_srp_free_client_credentials (gnutls_srp_client_credentials_t sc);
-  int
-  gnutls_srp_allocate_client_credentials (gnutls_srp_client_credentials_t * 
sc);
+    gnutls_srp_free_client_credentials (gnutls_srp_client_credentials_t sc);
   int
-  gnutls_srp_set_client_credentials (gnutls_srp_client_credentials_t res,
-                                    const char *username,
-                                    const char *password);
+    gnutls_srp_allocate_client_credentials (gnutls_srp_client_credentials_t *
+                                           sc);
+  int gnutls_srp_set_client_credentials (gnutls_srp_client_credentials_t res,
+                                        const char *username,
+                                        const char *password);
 
   void
-  gnutls_srp_free_server_credentials (gnutls_srp_server_credentials_t sc);
-  int
-  gnutls_srp_allocate_server_credentials (gnutls_srp_server_credentials_t *sc);
+    gnutls_srp_free_server_credentials (gnutls_srp_server_credentials_t sc);
   int
-  gnutls_srp_set_server_credentials_file (gnutls_srp_server_credentials_t res,
-                                         const char *password_file,
-                                         const char *password_conf_file);
+    gnutls_srp_allocate_server_credentials (gnutls_srp_server_credentials_t *
+                                           sc);
+  int gnutls_srp_set_server_credentials_file (gnutls_srp_server_credentials_t
+                                             res, const char *password_file,
+                                             const char *password_conf_file);
 
   const char *gnutls_srp_server_get_username (gnutls_session_t session);
 
@@ -1326,31 +1335,32 @@ extern "C" {
    * Enumeration of different PSK key flags.
    */
   typedef enum gnutls_psk_key_flags
-    {
-      GNUTLS_PSK_KEY_RAW = 0,
-      GNUTLS_PSK_KEY_HEX
-    } gnutls_psk_key_flags;
+  {
+    GNUTLS_PSK_KEY_RAW = 0,
+    GNUTLS_PSK_KEY_HEX
+  } gnutls_psk_key_flags;
 
   void
-  gnutls_psk_free_client_credentials (gnutls_psk_client_credentials_t sc);
+    gnutls_psk_free_client_credentials (gnutls_psk_client_credentials_t sc);
   int
-  gnutls_psk_allocate_client_credentials (gnutls_psk_client_credentials_t * 
sc);
+    gnutls_psk_allocate_client_credentials (gnutls_psk_client_credentials_t *
+                                           sc);
   int gnutls_psk_set_client_credentials (gnutls_psk_client_credentials_t res,
                                         const char *username,
                                         const gnutls_datum_t * key,
                                         gnutls_psk_key_flags format);
 
   void
-  gnutls_psk_free_server_credentials (gnutls_psk_server_credentials_t sc);
+    gnutls_psk_free_server_credentials (gnutls_psk_server_credentials_t sc);
   int
-  gnutls_psk_allocate_server_credentials (gnutls_psk_server_credentials_t * 
sc);
-  int
-  gnutls_psk_set_server_credentials_file (gnutls_psk_server_credentials_t res,
-                                         const char *password_file);
+    gnutls_psk_allocate_server_credentials (gnutls_psk_server_credentials_t *
+                                           sc);
+  int gnutls_psk_set_server_credentials_file (gnutls_psk_server_credentials_t
+                                             res, const char *password_file);
 
   int
-  gnutls_psk_set_server_credentials_hint (gnutls_psk_server_credentials_t res,
-                                         const char *hint);
+    gnutls_psk_set_server_credentials_hint (gnutls_psk_server_credentials_t
+                                           res, const char *hint);
 
   const char *gnutls_psk_server_get_username (gnutls_session_t session);
   const char *gnutls_psk_client_get_hint (gnutls_session_t session);
@@ -1359,9 +1369,9 @@ extern "C" {
                                                      const char *username,
                                                      gnutls_datum_t * key);
   void
-  gnutls_psk_set_server_credentials_function
-  (gnutls_psk_server_credentials_t cred,
-   gnutls_psk_server_credentials_function * func);
+    gnutls_psk_set_server_credentials_function
+    (gnutls_psk_server_credentials_t cred,
+     gnutls_psk_server_credentials_function * func);
 
   typedef int gnutls_psk_client_credentials_function (gnutls_session_t,
                                                      char **username,
@@ -1377,17 +1387,18 @@ extern "C" {
                         size_t * result_size);
 
   void
-  gnutls_psk_set_server_dh_params (gnutls_psk_server_credentials_t res,
-                                  gnutls_dh_params_t dh_params);
+    gnutls_psk_set_server_dh_params (gnutls_psk_server_credentials_t res,
+                                    gnutls_dh_params_t dh_params);
 
   void
-  gnutls_psk_set_server_params_function (gnutls_psk_server_credentials_t res,
-                                        gnutls_params_function * func);
+    gnutls_psk_set_server_params_function (gnutls_psk_server_credentials_t
+                                          res,
+                                          gnutls_params_function * func);
 
   int gnutls_psk_netconf_derive_key (const char *password,
                                     const char *psk_identity,
                                     const char *psk_identity_hint,
-                                    gnutls_datum_t *output_key);
+                                    gnutls_datum_t * output_key);
 
   /**
    * gnutls_x509_subject_alt_name_t:
@@ -1403,18 +1414,18 @@ extern "C" {
    * Enumeration of different subject alternative names types.
    */
   typedef enum gnutls_x509_subject_alt_name_t
-    {
-      GNUTLS_SAN_DNSNAME = 1,
-      GNUTLS_SAN_RFC822NAME = 2,
-      GNUTLS_SAN_URI = 3,
-      GNUTLS_SAN_IPADDRESS = 4,
-      GNUTLS_SAN_OTHERNAME = 5,
-      GNUTLS_SAN_DN = 6,
-      /* The following are "virtual" subject alternative name types, in
-        that they are represented by an otherName value and an OID.
-        Used by gnutls_x509_crt_get_subject_alt_othername_oid().  */
-      GNUTLS_SAN_OTHERNAME_XMPP = 1000
-    } gnutls_x509_subject_alt_name_t;
+  {
+    GNUTLS_SAN_DNSNAME = 1,
+    GNUTLS_SAN_RFC822NAME = 2,
+    GNUTLS_SAN_URI = 3,
+    GNUTLS_SAN_IPADDRESS = 4,
+    GNUTLS_SAN_OTHERNAME = 5,
+    GNUTLS_SAN_DN = 6,
+    /* The following are "virtual" subject alternative name types, in
+       that they are represented by an otherName value and an OID.
+       Used by gnutls_x509_crt_get_subject_alt_othername_oid().  */
+    GNUTLS_SAN_OTHERNAME_XMPP = 1000
+  } gnutls_x509_subject_alt_name_t;
 
   struct gnutls_openpgp_crt_int;
   typedef struct gnutls_openpgp_crt_int *gnutls_openpgp_crt_t;
@@ -1455,7 +1466,7 @@ extern "C" {
   typedef int gnutls_certificate_server_retrieve_function (gnutls_session_t,
                                                           gnutls_retr_st *);
 
-  typedef int gnutls_certificate_verify_function( gnutls_session_t);
+  typedef int gnutls_certificate_verify_function (gnutls_session_t);
 
 
   /* Functions that allow auth_info_t structures handling
@@ -1496,11 +1507,9 @@ extern "C" {
                                   gnutls_datum_t * signature);
 
   void gnutls_sign_callback_set (gnutls_session_t session,
-                                gnutls_sign_func sign_func,
-                                void *userdata);
-  gnutls_sign_func
-  gnutls_sign_callback_get (gnutls_session_t session,
-                           void **userdata);
+                                gnutls_sign_func sign_func, void *userdata);
+    gnutls_sign_func
+    gnutls_sign_callback_get (gnutls_session_t session, void **userdata);
 
   /* These are set on the credentials structure.
    */
@@ -1511,20 +1520,24 @@ extern "C" {
     (gnutls_certificate_credentials_t cred,
      gnutls_certificate_server_retrieve_function * func);
 
-  void gnutls_certificate_set_verify_function(
-    gnutls_certificate_credentials_t cred, gnutls_certificate_verify_function 
* func);
+  void
+    gnutls_certificate_set_verify_function (gnutls_certificate_credentials_t
+                                           cred,
+                                           gnutls_certificate_verify_function
+                                           * func);
 
   void
-  gnutls_certificate_server_set_request (gnutls_session_t session,
-                                        gnutls_certificate_request_t req);
+    gnutls_certificate_server_set_request (gnutls_session_t session,
+                                          gnutls_certificate_request_t req);
 
   /* get data from the session
    */
-  const gnutls_datum_t *
-  gnutls_certificate_get_peers (gnutls_session_t session,
-                               unsigned int *list_size);
-  const gnutls_datum_t *
-  gnutls_certificate_get_ours (gnutls_session_t session);
+  const gnutls_datum_t *gnutls_certificate_get_peers (gnutls_session_t
+                                                     session,
+                                                     unsigned int
+                                                     *list_size);
+  const gnutls_datum_t *gnutls_certificate_get_ours (gnutls_session_t
+                                                    session);
 
   time_t gnutls_certificate_activation_time_peers (gnutls_session_t session);
   time_t gnutls_certificate_expiration_time_peers (gnutls_session_t session);
@@ -1565,15 +1578,16 @@ extern "C" {
 #define GNUTLS_KEY_DECIPHER_ONLY       32768
 
   void
-  gnutls_certificate_set_params_function (gnutls_certificate_credentials_t res,
-                                         gnutls_params_function * func);
+    gnutls_certificate_set_params_function (gnutls_certificate_credentials_t
+                                           res,
+                                           gnutls_params_function * func);
   void gnutls_anon_set_params_function (gnutls_anon_server_credentials_t res,
                                        gnutls_params_function * func);
   void gnutls_psk_set_params_function (gnutls_psk_server_credentials_t res,
                                       gnutls_params_function * func);
 
-  int gnutls_hex2bin (const char * hex_data, size_t hex_size,
-                     char * bin_data, size_t * bin_size);
+  int gnutls_hex2bin (const char *hex_data, size_t hex_size,
+                     char *bin_data, size_t * bin_size);
 
   /* Gnutls error codes. The mapping to a TLS alert is also shown in
    * comments.
diff --git a/lib/includes/gnutls/openpgp.h b/lib/includes/gnutls/openpgp.h
index f6c18f2..ba8f154 100644
--- a/lib/includes/gnutls/openpgp.h
+++ b/lib/includes/gnutls/openpgp.h
@@ -48,10 +48,10 @@ extern "C"
  * Enumeration of different OpenPGP key formats.
  */
   typedef enum gnutls_openpgp_crt_fmt
-    {
-      GNUTLS_OPENPGP_FMT_RAW,
-      GNUTLS_OPENPGP_FMT_BASE64
-    } gnutls_openpgp_crt_fmt_t;
+  {
+    GNUTLS_OPENPGP_FMT_RAW,
+    GNUTLS_OPENPGP_FMT_BASE64
+  } gnutls_openpgp_crt_fmt_t;
 
   typedef unsigned char gnutls_openpgp_keyid_t[8];
 
@@ -89,9 +89,9 @@ extern "C"
   int gnutls_openpgp_crt_get_name (gnutls_openpgp_crt_t key,
                                   int idx, char *buf, size_t * sizeof_buf);
 
-  gnutls_pk_algorithm_t
-  gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key,
-                                      unsigned int *bits);
+    gnutls_pk_algorithm_t
+    gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key,
+                                        unsigned int *bits);
 
   int gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key);
 
@@ -111,15 +111,15 @@ extern "C"
                                         const gnutls_openpgp_keyid_t keyid);
   int gnutls_openpgp_crt_get_subkey_revoked_status (gnutls_openpgp_crt_t key,
                                                    unsigned int idx);
-  gnutls_pk_algorithm_t
-  gnutls_openpgp_crt_get_subkey_pk_algorithm (gnutls_openpgp_crt_t key,
-                                             unsigned int idx,
-                                             unsigned int *bits);
-  time_t gnutls_openpgp_crt_get_subkey_creation_time (gnutls_openpgp_crt_t key,
-                                                     unsigned int idx);
-  time_t
-  gnutls_openpgp_crt_get_subkey_expiration_time (gnutls_openpgp_crt_t key,
-                                                unsigned int idx);
+    gnutls_pk_algorithm_t
+    gnutls_openpgp_crt_get_subkey_pk_algorithm (gnutls_openpgp_crt_t key,
+                                               unsigned int idx,
+                                               unsigned int *bits);
+  time_t gnutls_openpgp_crt_get_subkey_creation_time (gnutls_openpgp_crt_t
+                                                     key, unsigned int idx);
+  time_t gnutls_openpgp_crt_get_subkey_expiration_time (gnutls_openpgp_crt_t
+                                                       key,
+                                                       unsigned int idx);
   int gnutls_openpgp_crt_get_subkey_id (gnutls_openpgp_crt_t key,
                                        unsigned int idx,
                                        gnutls_openpgp_keyid_t keyid);
@@ -149,16 +149,17 @@ extern "C"
   int gnutls_openpgp_crt_get_preferred_key_id (gnutls_openpgp_crt_t key,
                                               gnutls_openpgp_keyid_t keyid);
   int
-  gnutls_openpgp_crt_set_preferred_key_id (gnutls_openpgp_crt_t key,
-                                          const gnutls_openpgp_keyid_t keyid);
+    gnutls_openpgp_crt_set_preferred_key_id (gnutls_openpgp_crt_t key,
+                                            const gnutls_openpgp_keyid_t
+                                            keyid);
 
 /* privkey stuff.
  */
   int gnutls_openpgp_privkey_init (gnutls_openpgp_privkey_t * key);
   void gnutls_openpgp_privkey_deinit (gnutls_openpgp_privkey_t key);
-  gnutls_pk_algorithm_t
-  gnutls_openpgp_privkey_get_pk_algorithm (gnutls_openpgp_privkey_t key,
-                                          unsigned int *bits);
+    gnutls_pk_algorithm_t
+    gnutls_openpgp_privkey_get_pk_algorithm (gnutls_openpgp_privkey_t key,
+                                            unsigned int *bits);
   int gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key,
                                     const gnutls_datum_t * data,
                                     gnutls_openpgp_crt_fmt_t format,
@@ -170,56 +171,57 @@ extern "C"
   int gnutls_openpgp_privkey_get_fingerprint (gnutls_openpgp_privkey_t key,
                                              void *fpr, size_t * fprlen);
   int
-  gnutls_openpgp_privkey_get_subkey_fingerprint (gnutls_openpgp_privkey_t key,
-                                                unsigned int idx,
-                                                void *fpr,
-                                                size_t * fprlen);
+    gnutls_openpgp_privkey_get_subkey_fingerprint (gnutls_openpgp_privkey_t
+                                                  key, unsigned int idx,
+                                                  void *fpr,
+                                                  size_t * fprlen);
   int gnutls_openpgp_privkey_get_key_id (gnutls_openpgp_privkey_t key,
                                         gnutls_openpgp_keyid_t keyid);
   int gnutls_openpgp_privkey_get_subkey_count (gnutls_openpgp_privkey_t key);
   int gnutls_openpgp_privkey_get_subkey_idx (gnutls_openpgp_privkey_t key,
-                                            const gnutls_openpgp_keyid_t 
keyid);
+                                            const gnutls_openpgp_keyid_t
+                                            keyid);
 
   int
-  gnutls_openpgp_privkey_get_subkey_revoked_status (gnutls_openpgp_privkey_t 
key,
-                                                   unsigned int idx);
+    gnutls_openpgp_privkey_get_subkey_revoked_status (gnutls_openpgp_privkey_t
+                                                     key, unsigned int idx);
 
-  int gnutls_openpgp_privkey_get_revoked_status (gnutls_openpgp_privkey_t key);
+  int gnutls_openpgp_privkey_get_revoked_status (gnutls_openpgp_privkey_t
+                                                key);
 
-  gnutls_pk_algorithm_t
-  gnutls_openpgp_privkey_get_subkey_pk_algorithm (gnutls_openpgp_privkey_t key,
-                                                 unsigned int idx,
-                                                 unsigned int *bits);
+    gnutls_pk_algorithm_t
+    gnutls_openpgp_privkey_get_subkey_pk_algorithm (gnutls_openpgp_privkey_t
+                                                   key, unsigned int idx,
+                                                   unsigned int *bits);
 
-  time_t
-  gnutls_openpgp_privkey_get_subkey_expiration_time (gnutls_openpgp_privkey_t 
key,
-                                                    unsigned int idx);
+    time_t
+    gnutls_openpgp_privkey_get_subkey_expiration_time
+    (gnutls_openpgp_privkey_t key, unsigned int idx);
 
   int gnutls_openpgp_privkey_get_subkey_id (gnutls_openpgp_privkey_t key,
                                            unsigned int idx,
                                            gnutls_openpgp_keyid_t keyid);
 
-  time_t
-  gnutls_openpgp_privkey_get_subkey_creation_time (gnutls_openpgp_privkey_t 
key,
-                                                  unsigned int idx);
+    time_t
+    gnutls_openpgp_privkey_get_subkey_creation_time (gnutls_openpgp_privkey_t
+                                                    key, unsigned int idx);
 
   int
-  gnutls_openpgp_privkey_export_subkey_dsa_raw (gnutls_openpgp_privkey_t pkey,
-                                               unsigned int idx,
-                                               gnutls_datum_t * p,
-                                               gnutls_datum_t * q,
-                                               gnutls_datum_t * g,
-                                               gnutls_datum_t * y,
-                                               gnutls_datum_t * x);
-  int
-  gnutls_openpgp_privkey_export_subkey_rsa_raw (gnutls_openpgp_privkey_t pkey,
-                                               unsigned int idx,
-                                               gnutls_datum_t * m,
-                                               gnutls_datum_t * e,
-                                               gnutls_datum_t * d,
-                                               gnutls_datum_t * p,
-                                               gnutls_datum_t * q,
-                                               gnutls_datum_t * u);
+    gnutls_openpgp_privkey_export_subkey_dsa_raw (gnutls_openpgp_privkey_t
+                                                 pkey, unsigned int idx,
+                                                 gnutls_datum_t * p,
+                                                 gnutls_datum_t * q,
+                                                 gnutls_datum_t * g,
+                                                 gnutls_datum_t * y,
+                                                 gnutls_datum_t * x);
+  int gnutls_openpgp_privkey_export_subkey_rsa_raw (gnutls_openpgp_privkey_t
+                                                   pkey, unsigned int idx,
+                                                   gnutls_datum_t * m,
+                                                   gnutls_datum_t * e,
+                                                   gnutls_datum_t * d,
+                                                   gnutls_datum_t * p,
+                                                   gnutls_datum_t * q,
+                                                   gnutls_datum_t * u);
 
   int gnutls_openpgp_privkey_export_dsa_raw (gnutls_openpgp_privkey_t pkey,
                                             gnutls_datum_t * p,
@@ -243,11 +245,13 @@ extern "C"
                                     size_t * output_data_size);
 
   int
-  gnutls_openpgp_privkey_set_preferred_key_id (gnutls_openpgp_privkey_t key,
-                                              const gnutls_openpgp_keyid_t 
keyid);
-  int
-  gnutls_openpgp_privkey_get_preferred_key_id (gnutls_openpgp_privkey_t key,
-                                              gnutls_openpgp_keyid_t keyid);
+    gnutls_openpgp_privkey_set_preferred_key_id (gnutls_openpgp_privkey_t key,
+                                                const gnutls_openpgp_keyid_t
+                                                keyid);
+  int gnutls_openpgp_privkey_get_preferred_key_id (gnutls_openpgp_privkey_t
+                                                  key,
+                                                  gnutls_openpgp_keyid_t
+                                                  keyid);
 
   int gnutls_openpgp_crt_get_auth_subkey (gnutls_openpgp_crt_t crt,
                                          gnutls_openpgp_keyid_t keyid,
@@ -306,51 +310,52 @@ extern "C"
                                               gnutls_datum_t * key);
 
   void
-  gnutls_openpgp_set_recv_key_function (gnutls_session_t session,
-                                       gnutls_openpgp_recv_key_func func);
+    gnutls_openpgp_set_recv_key_function (gnutls_session_t session,
+                                         gnutls_openpgp_recv_key_func func);
 
 
 
 /* certificate authentication stuff.
  */
-  int gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t res,
-                                         gnutls_openpgp_crt_t key,
+  int gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t
+                                         res, gnutls_openpgp_crt_t key,
                                          gnutls_openpgp_privkey_t pkey);
 
   int
-  gnutls_certificate_set_openpgp_key_file (gnutls_certificate_credentials_t 
res,
-                                          const char *certfile,
-                                          const char *keyfile,
-                                          gnutls_openpgp_crt_fmt_t format);
-  int
-  gnutls_certificate_set_openpgp_key_mem (gnutls_certificate_credentials_t res,
-                                         const gnutls_datum_t * cert,
-                                         const gnutls_datum_t * key,
-                                         gnutls_openpgp_crt_fmt_t format);
+    gnutls_certificate_set_openpgp_key_file (gnutls_certificate_credentials_t
+                                            res, const char *certfile,
+                                            const char *keyfile,
+                                            gnutls_openpgp_crt_fmt_t format);
+  int gnutls_certificate_set_openpgp_key_mem (gnutls_certificate_credentials_t
+                                             res,
+                                             const gnutls_datum_t * cert,
+                                             const gnutls_datum_t * key,
+                                             gnutls_openpgp_crt_fmt_t
+                                             format);
 
   int
-  gnutls_certificate_set_openpgp_key_file2 (gnutls_certificate_credentials_t 
res,
-                                           const char *certfile,
-                                           const char *keyfile,
-                                           const char *subkey_id,
-                                           gnutls_openpgp_crt_fmt_t format);
+    gnutls_certificate_set_openpgp_key_file2 (gnutls_certificate_credentials_t
+                                             res, const char *certfile,
+                                             const char *keyfile,
+                                             const char *subkey_id,
+                                             gnutls_openpgp_crt_fmt_t
+                                             format);
   int
-  gnutls_certificate_set_openpgp_key_mem2 (gnutls_certificate_credentials_t 
res,
-                                          const gnutls_datum_t * cert,
-                                          const gnutls_datum_t * key,
-                                          const char *subkey_id,
-                                          gnutls_openpgp_crt_fmt_t format);
+    gnutls_certificate_set_openpgp_key_mem2 (gnutls_certificate_credentials_t
+                                            res, const gnutls_datum_t * cert,
+                                            const gnutls_datum_t * key,
+                                            const char *subkey_id,
+                                            gnutls_openpgp_crt_fmt_t format);
 
   int
-  gnutls_certificate_set_openpgp_keyring_mem (gnutls_certificate_credentials_t 
c,
-                                             const unsigned char *data,
-                                             size_t dlen,
-                                             gnutls_openpgp_crt_fmt_t format);
+    gnutls_certificate_set_openpgp_keyring_mem
+    (gnutls_certificate_credentials_t c, const unsigned char *data,
+     size_t dlen, gnutls_openpgp_crt_fmt_t format);
 
   int
-  gnutls_certificate_set_openpgp_keyring_file 
(gnutls_certificate_credentials_t c,
-                                              const char *file,
-                                              gnutls_openpgp_crt_fmt_t format);
+    gnutls_certificate_set_openpgp_keyring_file
+    (gnutls_certificate_credentials_t c, const char *file,
+     gnutls_openpgp_crt_fmt_t format);
 
 # ifdef __cplusplus
 }
diff --git a/lib/includes/gnutls/pkcs12.h b/lib/includes/gnutls/pkcs12.h
index 8867224..9652ac1 100644
--- a/lib/includes/gnutls/pkcs12.h
+++ b/lib/includes/gnutls/pkcs12.h
@@ -81,18 +81,17 @@ extern "C"
     GNUTLS_BAG_PKCS8_KEY = 2,
     GNUTLS_BAG_CERTIFICATE = 3,
     GNUTLS_BAG_CRL = 4,
-    GNUTLS_BAG_SECRET = 5, /* Secret data. Underspecified in pkcs-12,
-                           * gnutls extension. We use the PKCS-9
-                           * random nonce ID 1.2.840.113549.1.9.25.3
-                           * to store randomly generated keys.
-                           */
+    GNUTLS_BAG_SECRET = 5,     /* Secret data. Underspecified in pkcs-12,
+                                * gnutls extension. We use the PKCS-9
+                                * random nonce ID 1.2.840.113549.1.9.25.3
+                                * to store randomly generated keys.
+                                */
     GNUTLS_BAG_ENCRYPTED = 10,
     GNUTLS_BAG_UNKNOWN = 20
   } gnutls_pkcs12_bag_type_t;
 
-  gnutls_pkcs12_bag_type_t
-  gnutls_pkcs12_bag_get_type (gnutls_pkcs12_bag_t bag,
-                             int indx);
+    gnutls_pkcs12_bag_type_t
+    gnutls_pkcs12_bag_get_type (gnutls_pkcs12_bag_t bag, int indx);
   int gnutls_pkcs12_bag_get_data (gnutls_pkcs12_bag_t bag, int indx,
                                  gnutls_datum_t * data);
   int gnutls_pkcs12_bag_set_data (gnutls_pkcs12_bag_t bag,
diff --git a/lib/includes/gnutls/x509.h b/lib/includes/gnutls/x509.h
index 6c536e0..5733813 100644
--- a/lib/includes/gnutls/x509.h
+++ b/lib/includes/gnutls/x509.h
@@ -95,9 +95,9 @@ extern "C"
  * Enumeration of different certificate import flags.
  */
   typedef enum gnutls_certificate_import_flags
-    {
-      GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED = 1
-    } gnutls_certificate_import_flags;
+  {
+    GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED = 1
+  } gnutls_certificate_import_flags;
 
   int gnutls_x509_crt_init (gnutls_x509_crt_t * cert);
   void gnutls_x509_crt_deinit (gnutls_x509_crt_t cert);
@@ -166,13 +166,13 @@ extern "C"
                                           unsigned int *reason_flags,
                                           unsigned int *critical);
   int gnutls_x509_crt_set_crl_dist_points2 (gnutls_x509_crt_t crt,
-                                           gnutls_x509_subject_alt_name_t type,
-                                           const void *data,
+                                           gnutls_x509_subject_alt_name_t
+                                           type, const void *data,
                                            unsigned int data_size,
                                            unsigned int reason_flags);
   int gnutls_x509_crt_set_crl_dist_points (gnutls_x509_crt_t crt,
-                                          gnutls_x509_subject_alt_name_t type,
-                                          const void *data_string,
+                                          gnutls_x509_subject_alt_name_t
+                                          type, const void *data_string,
                                           unsigned int reason_flags);
   int gnutls_x509_crt_cpy_crl_dist_points (gnutls_x509_crt_t dst,
                                           gnutls_x509_crt_t src);
@@ -207,19 +207,19 @@ extern "C"
                                                     size_t * ret_size);
 
   int gnutls_x509_crt_get_issuer_alt_name (gnutls_x509_crt_t cert,
+                                          unsigned int seq, void *ret,
+                                          size_t * ret_size,
+                                          unsigned int *critical);
+  int gnutls_x509_crt_get_issuer_alt_name2 (gnutls_x509_crt_t cert,
                                            unsigned int seq, void *ret,
                                            size_t * ret_size,
+                                           unsigned int *ret_type,
                                            unsigned int *critical);
-  int gnutls_x509_crt_get_issuer_alt_name2 (gnutls_x509_crt_t cert,
-                                            unsigned int seq, void *ret,
-                                            size_t * ret_size,
-                                            unsigned int *ret_type,
-                                            unsigned int *critical);
 
   int gnutls_x509_crt_get_issuer_alt_othername_oid (gnutls_x509_crt_t cert,
-                                                    unsigned int seq,
-                                                    void *ret,
-                                                    size_t * ret_size);
+                                                   unsigned int seq,
+                                                   void *ret,
+                                                   size_t * ret_size);
 
   int gnutls_x509_crt_get_ca_status (gnutls_x509_crt_t cert,
                                     unsigned int *critical);
@@ -287,18 +287,17 @@ extern "C"
                                             unsigned int ca,
                                             int pathLenConstraint);
   int gnutls_x509_crt_set_subject_alternative_name (gnutls_x509_crt_t crt,
-                                                   
gnutls_x509_subject_alt_name_t type,
+                                                   
gnutls_x509_subject_alt_name_t
+                                                   type,
                                                    const char *data_string);
   int gnutls_x509_crt_set_subject_alt_name (gnutls_x509_crt_t crt,
-                                           gnutls_x509_subject_alt_name_t type,
-                                           const void *data,
+                                           gnutls_x509_subject_alt_name_t
+                                           type, const void *data,
                                            unsigned int data_size,
                                            unsigned int flags);
-  int gnutls_x509_crt_sign (gnutls_x509_crt_t crt,
-                           gnutls_x509_crt_t issuer,
+  int gnutls_x509_crt_sign (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer,
                            gnutls_x509_privkey_t issuer_key);
-  int gnutls_x509_crt_sign2 (gnutls_x509_crt_t crt,
-                            gnutls_x509_crt_t issuer,
+  int gnutls_x509_crt_sign2 (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer,
                             gnutls_x509_privkey_t issuer_key,
                             gnutls_digest_algorithm_t dig,
                             unsigned int flags);
@@ -528,16 +527,16 @@ extern "C"
  * Enumeration of different certificate verify flags.
  */
   typedef enum gnutls_certificate_verify_flags
-    {
-      GNUTLS_VERIFY_DISABLE_CA_SIGN = 1,
-      GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT = 2,
-      GNUTLS_VERIFY_DO_NOT_ALLOW_SAME = 4,
-      GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT = 8,
-      GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2 = 16,
-      GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5 = 32,
-      GNUTLS_VERIFY_DISABLE_TIME_CHECKS = 64,
-      GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS = 128,
-    } gnutls_certificate_verify_flags;
+  {
+    GNUTLS_VERIFY_DISABLE_CA_SIGN = 1,
+    GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT = 2,
+    GNUTLS_VERIFY_DO_NOT_ALLOW_SAME = 4,
+    GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT = 8,
+    GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2 = 16,
+    GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5 = 32,
+    GNUTLS_VERIFY_DISABLE_TIME_CHECKS = 64,
+    GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS = 128,
+  } gnutls_certificate_verify_flags;
 
   int gnutls_x509_crt_check_issuer (gnutls_x509_crt_t cert,
                                    gnutls_x509_crt_t issuer);
@@ -599,20 +598,20 @@ extern "C"
  * Enumeration of different PKCS encryption flags.
  */
   typedef enum gnutls_pkcs_encrypt_flags_t
-    {
-      GNUTLS_PKCS_PLAIN = 1,
-      GNUTLS_PKCS8_PLAIN = GNUTLS_PKCS_PLAIN,
-      GNUTLS_PKCS_USE_PKCS12_3DES = 2,
-      GNUTLS_PKCS8_USE_PKCS12_3DES = GNUTLS_PKCS_USE_PKCS12_3DES,
-      GNUTLS_PKCS_USE_PKCS12_ARCFOUR = 4,
-      GNUTLS_PKCS8_USE_PKCS12_ARCFOUR = GNUTLS_PKCS_USE_PKCS12_ARCFOUR,
-      GNUTLS_PKCS_USE_PKCS12_RC2_40 = 8,
-      GNUTLS_PKCS8_USE_PKCS12_RC2_40 = GNUTLS_PKCS_USE_PKCS12_RC2_40,
-      GNUTLS_PKCS_USE_PBES2_3DES = 16,
-      GNUTLS_PKCS_USE_PBES2_AES_128 = 32,
-      GNUTLS_PKCS_USE_PBES2_AES_192 = 64,
-      GNUTLS_PKCS_USE_PBES2_AES_256 = 128,
-    } gnutls_pkcs_encrypt_flags_t;
+  {
+    GNUTLS_PKCS_PLAIN = 1,
+    GNUTLS_PKCS8_PLAIN = GNUTLS_PKCS_PLAIN,
+    GNUTLS_PKCS_USE_PKCS12_3DES = 2,
+    GNUTLS_PKCS8_USE_PKCS12_3DES = GNUTLS_PKCS_USE_PKCS12_3DES,
+    GNUTLS_PKCS_USE_PKCS12_ARCFOUR = 4,
+    GNUTLS_PKCS8_USE_PKCS12_ARCFOUR = GNUTLS_PKCS_USE_PKCS12_ARCFOUR,
+    GNUTLS_PKCS_USE_PKCS12_RC2_40 = 8,
+    GNUTLS_PKCS8_USE_PKCS12_RC2_40 = GNUTLS_PKCS_USE_PKCS12_RC2_40,
+    GNUTLS_PKCS_USE_PBES2_3DES = 16,
+    GNUTLS_PKCS_USE_PBES2_AES_128 = 32,
+    GNUTLS_PKCS_USE_PBES2_AES_192 = 64,
+    GNUTLS_PKCS_USE_PBES2_AES_256 = 128,
+  } gnutls_pkcs_encrypt_flags_t;
 
   int gnutls_x509_privkey_init (gnutls_x509_privkey_t * key);
   void gnutls_x509_privkey_deinit (gnutls_x509_privkey_t key);
@@ -697,8 +696,9 @@ extern "C"
                                   const gnutls_datum_t * hash,
                                   const gnutls_datum_t * signature);
 
-  int gnutls_x509_crt_get_verify_algorithm(gnutls_x509_crt_t crt, 
-      const gnutls_datum_t * signature, gnutls_digest_algorithm_t *hash);
+  int gnutls_x509_crt_get_verify_algorithm (gnutls_x509_crt_t crt,
+                                           const gnutls_datum_t * signature,
+                                           gnutls_digest_algorithm_t * hash);
 
   int gnutls_x509_privkey_sign_hash (gnutls_x509_privkey_t key,
                                     const gnutls_datum_t * hash,
diff --git a/lib/opencdk/context.h b/lib/opencdk/context.h
index 101b060..0b4aee2 100644
--- a/lib/opencdk/context.h
+++ b/lib/opencdk/context.h
@@ -27,20 +27,23 @@
 
 #include "types.h"
 
-struct cdk_listkey_s {
+struct cdk_listkey_s
+{
   unsigned init:1;
   cdk_stream_t inp;
   cdk_keydb_hd_t db;
   int type;
-  union {
+  union
+  {
     char *patt;
-    cdk_strlist_t fpatt;  
+    cdk_strlist_t fpatt;
   } u;
-  cdk_strlist_t t;   
+  cdk_strlist_t t;
 };
 
 
-struct cdk_s2k_s {
+struct cdk_s2k_s
+{
   int mode;
   byte hash_algo;
   byte salt[8];
@@ -48,18 +51,22 @@ struct cdk_s2k_s {
 };
 
 
-struct cdk_ctx_s {
+struct cdk_ctx_s
+{
   int cipher_algo;
   int digest_algo;
-  struct {
+  struct
+  {
     int algo;
     int level;
   } compress;
-  struct {
+  struct
+  {
     int mode;
     int digest_algo;
   } _s2k;
-  struct {
+  struct
+  {
     unsigned blockmode:1;
     unsigned armor:1;
     unsigned textmode:1;
@@ -68,61 +75,71 @@ struct cdk_ctx_s {
     unsigned overwrite;
     unsigned force_digest:1;
   } opt;
-  struct {
+  struct
+  {
     cdk_verify_result_t verify;
   } result;
-  struct {
+  struct
+  {
     cdk_pkt_seckey_t sk;
     unsigned on:1;
   } cache;
-  struct {
+  struct
+  {
     cdk_keydb_hd_t sec;
     cdk_keydb_hd_t pub;
     unsigned int close_db:1;
   } db;
   char *(*passphrase_cb) (void *opaque, const char *prompt);
-  void * passphrase_cb_value;
+  void *passphrase_cb_value;
 };
 
-struct cdk_prefitem_s {
+struct cdk_prefitem_s
+{
   byte type;
   byte value;
 };
 
-struct cdk_desig_revoker_s {
-  struct cdk_desig_revoker_s * next;
+struct cdk_desig_revoker_s
+{
+  struct cdk_desig_revoker_s *next;
   byte r_class;
   byte algid;
   byte fpr[KEY_FPR_LEN];
 };
 
-struct cdk_subpkt_s {
-  struct cdk_subpkt_s * next;
+struct cdk_subpkt_s
+{
+  struct cdk_subpkt_s *next;
   u32 size;
   byte type;
-  byte *d;  
+  byte *d;
 };
 
-struct cdk_keylist_s {
-  struct cdk_keylist_s * next;
-  union {
+struct cdk_keylist_s
+{
+  struct cdk_keylist_s *next;
+  union
+  {
     cdk_pkt_pubkey_t pk;
     cdk_pkt_seckey_t sk;
   } key;
   int version;
-  int type;  
+  int type;
 };
 
-struct cdk_dek_s {
+struct cdk_dek_s
+{
   int algo;
   int keylen;
   int use_mdc;
-  byte key[32]; /* 256-bit */
+  byte key[32];                        /* 256-bit */
 };
 
-struct cdk_strlist_s {
-  struct cdk_strlist_s * next;
-  char *d; 
+struct cdk_strlist_s
+{
+  struct cdk_strlist_s *next;
+  char *d;
 };
 
 #endif /* CDK_CONTEXT_H */
diff --git a/lib/opencdk/filters.h b/lib/opencdk/filters.h
index d09a067..d948d14 100644
--- a/lib/opencdk/filters.h
+++ b/lib/opencdk/filters.h
@@ -24,18 +24,21 @@
 #ifndef CDK_FILTERS_H
 #define CDK_FILTERS_H
 
-enum {
-    STREAMCTL_READ  = 0,
-    STREAMCTL_WRITE = 1,
-    STREAMCTL_FREE  = 2
+enum
+{
+  STREAMCTL_READ = 0,
+  STREAMCTL_WRITE = 1,
+  STREAMCTL_FREE = 2
 };
 
-typedef struct {
+typedef struct
+{
   cipher_hd_st hd;
   digest_hd_st mdc;
   int mdc_method;
   u32 datalen;
-  struct {
+  struct
+  {
     size_t on;
     off_t size;
     off_t nleft;
@@ -43,62 +46,65 @@ typedef struct {
   cdk_stream_t s;
 } cipher_filter_t;
 
-typedef struct {
+typedef struct
+{
   int digest_algo;
   digest_hd_st md;
   int md_initialized;
 } md_filter_t;
 
-typedef struct {
-  const char *le; /* line endings */
+typedef struct
+{
+  const char *le;              /* line endings */
   const char *hdrlines;
   u32 crc;
   int crc_okay;
   int idx, idx2;
 } armor_filter_t;
 
-typedef struct {
+typedef struct
+{
   cdk_lit_format_t mode;
-  char *orig_filename; /* This original name of the input file. */
+  char *orig_filename;         /* This original name of the input file. */
   char *filename;
   digest_hd_st md;
   int md_initialized;
-  struct {
+  struct
+  {
     size_t on;
     off_t size;
   } blkmode;
 } literal_filter_t;
 
-typedef struct {
+typedef struct
+{
   size_t inbufsize;
   byte inbuf[8192];
   size_t outbufsize;
   byte outbuf[8192];
-  int algo; /* compress algo */
+  int algo;                    /* compress algo */
   int level;
 } compress_filter_t;
 
-typedef struct {
-    const char * lf;
+typedef struct
+{
+  const char *lf;
 } text_filter_t;
 
 
 /*-- armor.c -*/
-int _cdk_filter_armor( void * opaque, int ctl, FILE * in, FILE * out );
+int _cdk_filter_armor (void *opaque, int ctl, FILE * in, FILE * out);
 
 /*-- cipher.c --*/
-cdk_error_t _cdk_filter_hash( void * opaque, int ctl, FILE * in, FILE * out );
-cdk_error_t _cdk_filter_cipher( void * opaque, int ctl,
-                                FILE * in, FILE * out );
+cdk_error_t _cdk_filter_hash (void *opaque, int ctl, FILE * in, FILE * out);
+cdk_error_t _cdk_filter_cipher (void *opaque, int ctl, FILE * in, FILE * out);
 
 /*-- literal.c --*/
-int _cdk_filter_literal( void * opaque, int ctl, FILE * in, FILE * out );
-int _cdk_filter_text( void * opaque, int ctl, FILE * in, FILE * out );
+int _cdk_filter_literal (void *opaque, int ctl, FILE * in, FILE * out);
+int _cdk_filter_text (void *opaque, int ctl, FILE * in, FILE * out);
 
 /*-- compress.c --*/
-cdk_error_t _cdk_filter_compress( void * opaque, int ctl,
-                                  FILE * in, FILE * out );
+cdk_error_t _cdk_filter_compress (void *opaque, int ctl,
+                                 FILE * in, FILE * out);
 
 #endif /* CDK_FILTERS_H */
-
-        
diff --git a/lib/opencdk/keydb.h b/lib/opencdk/keydb.h
index da04388..fb2bf49 100644
--- a/lib/opencdk/keydb.h
+++ b/lib/opencdk/keydb.h
@@ -1,5 +1,5 @@
 /* Internal key index structure. */
-struct key_idx_s 
+struct key_idx_s
 {
   off_t offset;
   u32 keyid[2];
@@ -8,7 +8,7 @@ struct key_idx_s
 typedef struct key_idx_s *key_idx_t;
 
 /* Internal key cache to associate a key with an file offset. */
-struct key_table_s 
+struct key_table_s
 {
   struct key_table_s *next;
   off_t offset;
@@ -17,35 +17,36 @@ typedef struct key_table_s *key_table_t;
 
 typedef struct cdk_keydb_search_s
 {
-  off_t off; /* last file offset */
-  union 
-    {    
-      char *pattern; /* A search is performed by pattern. */
-      u32 keyid[2];  /* A search by keyid. */
-      byte fpr[KEY_FPR_LEN]; /* A search by fingerprint. */
-    } u;
+  off_t off;                   /* last file offset */
+  union
+  {
+    char *pattern;             /* A search is performed by pattern. */
+    u32 keyid[2];              /* A search by keyid. */
+    byte fpr[KEY_FPR_LEN];     /* A search by fingerprint. */
+  } u;
   int type;
   struct key_table_s *cache;
   size_t ncache;
-  unsigned int no_cache:1; /* disable the index cache. */
+  unsigned int no_cache:1;     /* disable the index cache. */
 
   cdk_stream_t idx;
-  char *idx_name;        /* name of the index file or NULL. */
+  char *idx_name;              /* name of the index file or NULL. */
 
 } cdk_keydb_search_s;
 
 /* Internal key database handle. */
-struct cdk_keydb_hd_s 
+struct cdk_keydb_hd_s
 {
-  int type;   /* type of the key db handle. */
-  int fp_ref; /* 1=means it is a reference and shall not be closed. */
+  int type;                    /* type of the key db handle. */
+  int fp_ref;                  /* 1=means it is a reference and shall not be 
closed. */
   cdk_stream_t fp;
-  char *name;            /* name of the underlying file or NULL. */
-  unsigned int secret:1;   /* contain secret keys. */
-  unsigned int isopen:1;   /* the underlying stream is opened. */
-  
+  char *name;                  /* name of the underlying file or NULL. */
+  unsigned int secret:1;       /* contain secret keys. */
+  unsigned int isopen:1;       /* the underlying stream is opened. */
+
   /* structure to store some stats about the keydb. */
-  struct {
-    size_t new_keys; /* amount of new keys that were imported. */
+  struct
+  {
+    size_t new_keys;           /* amount of new keys that were imported. */
   } stats;
 };
diff --git a/lib/opencdk/main.h b/lib/opencdk/main.h
index 0a76dc6..fe324fe 100644
--- a/lib/opencdk/main.h
+++ b/lib/opencdk/main.h
@@ -40,14 +40,14 @@
 
 #define map_gnutls_error _cdk_map_gnutls_error
 
-cdk_error_t map_gnutls_error(int err);
+cdk_error_t map_gnutls_error (int err);
 
 /* The general size of a buffer for the variou modules. */
 #define BUFSIZE 8192
 
 /* This is the default block size for the partial length packet mode. */
 #define DEF_BLOCKSIZE 8192
-#define DEF_BLOCKBITS   13 /* 2^13 = 8192 */
+#define DEF_BLOCKBITS   13     /* 2^13 = 8192 */
 
 /* For now SHA-1 is used to create fingerprint for keys.
    But if this will ever change, it is a good idea to
@@ -89,16 +89,16 @@ cdk_error_t map_gnutls_error(int err);
     } } while (0)
 
 /*-- armor.c --*/
-const char * _cdk_armor_get_lineend (void);
-     
+const char *_cdk_armor_get_lineend (void);
+
 /*-- main.c --*/
-char * _cdk_passphrase_get (cdk_ctx_t hd, const char *prompt);
+char *_cdk_passphrase_get (cdk_ctx_t hd, const char *prompt);
 
 /*-- misc.c --*/
-int _cdk_check_args( int overwrite, const char * in, const char * out );
+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);
+const char *_cdk_memistr (const char *buf, size_t buflen, const char *sub);
 FILE *_cdk_tmpfile (void);
 
 /* Helper to provide case insentensive strstr version. */
@@ -109,74 +109,75 @@ FILE *_cdk_tmpfile (void);
 cdk_error_t _cdk_proc_packets (cdk_ctx_t hd, cdk_stream_t inp,
                               cdk_stream_t data,
                               const char *output, cdk_stream_t outstream,
-                              digest_hd_st*md);
+                              digest_hd_st * md);
 cdk_error_t _cdk_pkt_write2 (cdk_stream_t out, int pkttype, void *pktctx);
 
 /*-- pubkey.c --*/
 u32 _cdk_pkt_get_keyid (cdk_packet_t pkt, u32 * keyid);
-cdk_error_t _cdk_pkt_get_fingerprint (cdk_packet_t pkt, byte *fpr);
+cdk_error_t _cdk_pkt_get_fingerprint (cdk_packet_t pkt, byte * fpr);
 int _cdk_pk_algo_usage (int algo);
 int _cdk_pk_test_algo (int algo, unsigned int usage);
 int _cdk_sk_get_csum (cdk_pkt_seckey_t sk);
 
 /*-- new-packet.c --*/
-byte * _cdk_subpkt_get_array (cdk_subpkt_t s, int count, size_t * r_nbytes);
+byte *_cdk_subpkt_get_array (cdk_subpkt_t s, int count, size_t * r_nbytes);
 cdk_error_t _cdk_subpkt_copy (cdk_subpkt_t * r_dst, cdk_subpkt_t src);
 void _cdk_pkt_detach_free (cdk_packet_t pkt, int *r_pkttype, void **ctx);
 
 /*-- sig-check.c --*/
 cdk_error_t _cdk_sig_check (cdk_pkt_pubkey_t pk, cdk_pkt_signature_t sig,
-                           digest_hd_st*digest, int * r_expired);
-cdk_error_t _cdk_hash_sig_data (cdk_pkt_signature_t sig, digest_hd_st*hd);
-cdk_error_t _cdk_hash_userid (cdk_pkt_userid_t uid, int sig_version, 
digest_hd_st*md);
-cdk_error_t _cdk_hash_pubkey (cdk_pkt_pubkey_t pk, digest_hd_st *md, 
+                           digest_hd_st * digest, int *r_expired);
+cdk_error_t _cdk_hash_sig_data (cdk_pkt_signature_t sig, digest_hd_st * hd);
+cdk_error_t _cdk_hash_userid (cdk_pkt_userid_t uid, int sig_version,
+                             digest_hd_st * md);
+cdk_error_t _cdk_hash_pubkey (cdk_pkt_pubkey_t pk, digest_hd_st * md,
                              int use_fpr);
-cdk_error_t _cdk_pk_check_sig (cdk_keydb_hd_t hd,
-                              cdk_kbnode_t knode, 
-                              cdk_kbnode_t snode, int *is_selfsig, char** 
ret_uid);
+cdk_error_t _cdk_pk_check_sig (cdk_keydb_hd_t hd, cdk_kbnode_t knode,
+                              cdk_kbnode_t snode, int *is_selfsig,
+                              char **ret_uid);
 
 /*-- kbnode.c --*/
 void _cdk_kbnode_add (cdk_kbnode_t root, cdk_kbnode_t node);
 void _cdk_kbnode_clone (cdk_kbnode_t node);
 
 /*-- sesskey.c --*/
-cdk_error_t _cdk_digest_encode_pkcs1 (byte **r_md, size_t *r_mdlen, 
+cdk_error_t _cdk_digest_encode_pkcs1 (byte ** r_md, size_t * r_mdlen,
                                      int pk_algo,
                                      const byte * md,
                                      int digest_algo, unsigned nbits);
 cdk_error_t _cdk_sk_unprotect_auto (cdk_ctx_t hd, cdk_pkt_seckey_t sk);
 
 /*-- keydb.c --*/
-int _cdk_keydb_is_secret (cdk_keydb_hd_t db);   
-cdk_error_t _cdk_keydb_get_pk_byusage (cdk_keydb_hd_t hd, const char * name,
-                               cdk_pkt_pubkey_t * ret_pk, int usage);
-cdk_error_t _cdk_keydb_get_sk_byusage (cdk_keydb_hd_t hd, const char * name,
-                               cdk_pkt_seckey_t * ret_sk, int usage);
-cdk_error_t _cdk_keydb_check_userid (cdk_keydb_hd_t hd, u32 * keyid, 
-                                    const char * id);
+int _cdk_keydb_is_secret (cdk_keydb_hd_t db);
+cdk_error_t _cdk_keydb_get_pk_byusage (cdk_keydb_hd_t hd, const char *name,
+                                      cdk_pkt_pubkey_t * ret_pk, int usage);
+cdk_error_t _cdk_keydb_get_sk_byusage (cdk_keydb_hd_t hd, const char *name,
+                                      cdk_pkt_seckey_t * ret_sk, int usage);
+cdk_error_t _cdk_keydb_check_userid (cdk_keydb_hd_t hd, u32 * keyid,
+                                    const char *id);
 
 /*-- sign.c --*/
 int _cdk_sig_hash_for (cdk_pkt_pubkey_t pk);
-void _cdk_trim_string (char * s, int canon);
+void _cdk_trim_string (char *s, int canon);
 cdk_error_t _cdk_sig_create (cdk_pkt_pubkey_t pk, cdk_pkt_signature_t sig);
 cdk_error_t _cdk_sig_complete (cdk_pkt_signature_t sig, cdk_pkt_seckey_t sk,
-                              digest_hd_st *hd);
+                              digest_hd_st * hd);
 
 /*-- stream.c --*/
-void _cdk_stream_set_compress_algo (cdk_stream_t s, int algo);   
-cdk_error_t _cdk_stream_open_mode (const char *file, const char *mode, 
-                                  cdk_stream_t *ret_s);   
-void * _cdk_stream_get_opaque( cdk_stream_t s, int fid );
-const char * _cdk_stream_get_fname( cdk_stream_t s );
-FILE * _cdk_stream_get_fp( cdk_stream_t s );
-int _cdk_stream_gets( cdk_stream_t s, char * buf, size_t count );
-cdk_error_t _cdk_stream_append( const char * file, cdk_stream_t * ret_s );
-int _cdk_stream_get_errno( cdk_stream_t s );
-cdk_error_t _cdk_stream_set_blockmode( cdk_stream_t s, size_t nbytes );
-int _cdk_stream_get_blockmode( cdk_stream_t s );
-int _cdk_stream_puts( cdk_stream_t s, const char * buf );
-cdk_error_t _cdk_stream_fpopen (FILE * fp, unsigned write_mode, 
-                               cdk_stream_t *ret_out);
+void _cdk_stream_set_compress_algo (cdk_stream_t s, int algo);
+cdk_error_t _cdk_stream_open_mode (const char *file, const char *mode,
+                                  cdk_stream_t * ret_s);
+void *_cdk_stream_get_opaque (cdk_stream_t s, int fid);
+const char *_cdk_stream_get_fname (cdk_stream_t s);
+FILE *_cdk_stream_get_fp (cdk_stream_t s);
+int _cdk_stream_gets (cdk_stream_t s, char *buf, size_t count);
+cdk_error_t _cdk_stream_append (const char *file, cdk_stream_t * ret_s);
+int _cdk_stream_get_errno (cdk_stream_t s);
+cdk_error_t _cdk_stream_set_blockmode (cdk_stream_t s, size_t nbytes);
+int _cdk_stream_get_blockmode (cdk_stream_t s);
+int _cdk_stream_puts (cdk_stream_t s, const char *buf);
+cdk_error_t _cdk_stream_fpopen (FILE * fp, unsigned write_mode,
+                               cdk_stream_t * ret_out);
 
 /*-- verify.c --*/
 void _cdk_result_verify_free (cdk_verify_result_t res);
@@ -184,19 +185,19 @@ cdk_verify_result_t _cdk_result_verify_new (void);
 
 
 /*-- read-packet.c --*/
-size_t _cdk_pkt_read_len (FILE * inp, size_t *ret_partial);
+size_t _cdk_pkt_read_len (FILE * inp, size_t * ret_partial);
 
 /*-- write-packet.c --*/
-cdk_error_t _cdk_pkt_write_fp( FILE * out, cdk_packet_t pkt );
+cdk_error_t _cdk_pkt_write_fp (FILE * out, cdk_packet_t pkt);
 
 /*-- seskey.c --*/
-cdk_error_t _cdk_s2k_copy (cdk_s2k_t *r_dst, cdk_s2k_t src);
+cdk_error_t _cdk_s2k_copy (cdk_s2k_t * r_dst, cdk_s2k_t src);
 
 #define _cdk_pub_algo_to_pgp(algo) (algo)
 #define _pgp_pub_algo_to_cdk(algo) (algo)
-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);
+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 23b1471..d7bd415 100644
--- a/lib/opencdk/opencdk.h
+++ b/lib/opencdk/opencdk.h
@@ -43,335 +43,336 @@
 #define OPENCDK_VERSION_PATCH 6
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
 /* General contexts */
 
 /* 'Session' handle to support the various options and run-time
    information. */
-struct cdk_ctx_s;
-typedef struct cdk_ctx_s *cdk_ctx_t;
+  struct cdk_ctx_s;
+  typedef struct cdk_ctx_s *cdk_ctx_t;
 
 /* A generic context to store list of strings. */
-struct cdk_strlist_s;
-typedef struct cdk_strlist_s *cdk_strlist_t;
+  struct cdk_strlist_s;
+  typedef struct cdk_strlist_s *cdk_strlist_t;
 
 /* Context used to list keys of a keyring. */
-struct cdk_listkey_s;
-typedef struct cdk_listkey_s *cdk_listkey_t;
+  struct cdk_listkey_s;
+  typedef struct cdk_listkey_s *cdk_listkey_t;
 
 /* Opaque String to Key (S2K) handle. */
-struct cdk_s2k_s;
-typedef struct cdk_s2k_s *cdk_s2k_t;
+  struct cdk_s2k_s;
+  typedef struct cdk_s2k_s *cdk_s2k_t;
 
 /* Abstract I/O object, a stream, which is used for most operations. */
-struct cdk_stream_s;
-typedef struct cdk_stream_s *cdk_stream_t;
+  struct cdk_stream_s;
+  typedef struct cdk_stream_s *cdk_stream_t;
 
 /* Opaque handle for the user ID preferences. */
-struct cdk_prefitem_s;
-typedef struct cdk_prefitem_s *cdk_prefitem_t;
+  struct cdk_prefitem_s;
+  typedef struct cdk_prefitem_s *cdk_prefitem_t;
 
 /* Node to store a single key node packet. */
-struct cdk_kbnode_s;
-typedef struct cdk_kbnode_s *cdk_kbnode_t;
+  struct cdk_kbnode_s;
+  typedef struct cdk_kbnode_s *cdk_kbnode_t;
 
 /* Key database handle. */
-struct cdk_keydb_hd_s;
-typedef struct cdk_keydb_hd_s *cdk_keydb_hd_t;
+  struct cdk_keydb_hd_s;
+  typedef struct cdk_keydb_hd_s *cdk_keydb_hd_t;
 
-struct cdk_keydb_search_s;
-typedef struct cdk_keydb_search_s *cdk_keydb_search_t;
+  struct cdk_keydb_search_s;
+  typedef struct cdk_keydb_search_s *cdk_keydb_search_t;
 
 /* Context to store a list of recipient keys. */
-struct cdk_keylist_s;
-typedef struct cdk_keylist_s *cdk_keylist_t;
+  struct cdk_keylist_s;
+  typedef struct cdk_keylist_s *cdk_keylist_t;
 
 /* Context to encapsulate a single sub packet of a signature. */
-struct cdk_subpkt_s;
-typedef struct cdk_subpkt_s *cdk_subpkt_t;
+  struct cdk_subpkt_s;
+  typedef struct cdk_subpkt_s *cdk_subpkt_t;
 
 /* Context used to generate key pairs. */
-struct cdk_keygen_ctx_s;
-typedef struct cdk_keygen_ctx_s *cdk_keygen_ctx_t;
+  struct cdk_keygen_ctx_s;
+  typedef struct cdk_keygen_ctx_s *cdk_keygen_ctx_t;
 
 /* Handle for a single designated revoker. */
-struct cdk_desig_revoker_s;
-typedef struct cdk_desig_revoker_s *cdk_desig_revoker_t;
+  struct cdk_desig_revoker_s;
+  typedef struct cdk_desig_revoker_s *cdk_desig_revoker_t;
 
 /* Alias for backward compatibility. */
-typedef bigint_t cdk_mpi_t;
+  typedef bigint_t cdk_mpi_t;
 
 
 /* All valid error constants. */
-typedef enum
-{
-  CDK_EOF = -1,
-  CDK_Success = 0,
-  CDK_General_Error = 1,
-  CDK_File_Error = 2,
-  CDK_Bad_Sig = 3,
-  CDK_Inv_Packet = 4,
-  CDK_Inv_Algo = 5,
-  CDK_Not_Implemented = 6,
-  CDK_Armor_Error = 8,
-  CDK_Armor_CRC_Error = 9,
-  CDK_MPI_Error = 10,
-  CDK_Inv_Value = 11,
-  CDK_Error_No_Key = 12,
-  CDK_Chksum_Error = 13,
-  CDK_Time_Conflict = 14,
-  CDK_Zlib_Error = 15,
-  CDK_Weak_Key = 16,
-  CDK_Out_Of_Core = 17,
-  CDK_Wrong_Seckey = 18,
-  CDK_Bad_MDC = 19,
-  CDK_Inv_Mode = 20,
-  CDK_Error_No_Keyring = 21,
-  CDK_Wrong_Format = 22,
-  CDK_Inv_Packet_Ver = 23,
-  CDK_Too_Short = 24,
-  CDK_Unusable_Key = 25,
-  CDK_No_Data = 26,
-  CDK_No_Passphrase = 27,
-  CDK_Network_Error = 28
-} cdk_error_t;
-
-
-enum cdk_control_flags
-{
-  CDK_CTLF_SET = 0,            /* Value to set an option */
-  CDK_CTLF_GET = 1,            /* Value to get an option */
-  CDK_CTL_DIGEST = 10,         /* Option to set the digest algorithm. */
-  CDK_CTL_ARMOR = 12,          /* Option to enable armor output. */
-  CDK_CTL_COMPRESS = 13,       /* Option to enable compression. */
-  CDK_CTL_COMPAT = 14,         /* Option to switch in compat mode. */
-  CDK_CTL_OVERWRITE = 15,      /* Option to enable file overwritting. */
-  CDK_CTL_S2K = 16,            /* Option to set S2K values. */
-  CDK_CTL_FORCE_DIGEST = 19,   /* Force the use of a digest algorithm. */
-  CDK_CTL_BLOCKMODE_ON = 20    /* Enable partial body lengths */
-};
+  typedef enum
+  {
+    CDK_EOF = -1,
+    CDK_Success = 0,
+    CDK_General_Error = 1,
+    CDK_File_Error = 2,
+    CDK_Bad_Sig = 3,
+    CDK_Inv_Packet = 4,
+    CDK_Inv_Algo = 5,
+    CDK_Not_Implemented = 6,
+    CDK_Armor_Error = 8,
+    CDK_Armor_CRC_Error = 9,
+    CDK_MPI_Error = 10,
+    CDK_Inv_Value = 11,
+    CDK_Error_No_Key = 12,
+    CDK_Chksum_Error = 13,
+    CDK_Time_Conflict = 14,
+    CDK_Zlib_Error = 15,
+    CDK_Weak_Key = 16,
+    CDK_Out_Of_Core = 17,
+    CDK_Wrong_Seckey = 18,
+    CDK_Bad_MDC = 19,
+    CDK_Inv_Mode = 20,
+    CDK_Error_No_Keyring = 21,
+    CDK_Wrong_Format = 22,
+    CDK_Inv_Packet_Ver = 23,
+    CDK_Too_Short = 24,
+    CDK_Unusable_Key = 25,
+    CDK_No_Data = 26,
+    CDK_No_Passphrase = 27,
+    CDK_Network_Error = 28
+  } cdk_error_t;
+
+
+  enum cdk_control_flags
+  {
+    CDK_CTLF_SET = 0,          /* Value to set an option */
+    CDK_CTLF_GET = 1,          /* Value to get an option */
+    CDK_CTL_DIGEST = 10,       /* Option to set the digest algorithm. */
+    CDK_CTL_ARMOR = 12,                /* Option to enable armor output. */
+    CDK_CTL_COMPRESS = 13,     /* Option to enable compression. */
+    CDK_CTL_COMPAT = 14,       /* Option to switch in compat mode. */
+    CDK_CTL_OVERWRITE = 15,    /* Option to enable file overwritting. */
+    CDK_CTL_S2K = 16,          /* Option to set S2K values. */
+    CDK_CTL_FORCE_DIGEST = 19, /* Force the use of a digest algorithm. */
+    CDK_CTL_BLOCKMODE_ON = 20  /* Enable partial body lengths */
+  };
 
 
 /* Specifies all valid log levels. */
-enum cdk_log_level_t
-{
-  CDK_LOG_NONE = 0,            /* No log message will be shown. */
-  CDK_LOG_INFO = 1,
-  CDK_LOG_DEBUG = 2,
-  CDK_LOG_DEBUG_PKT = 3
-};
+  enum cdk_log_level_t
+  {
+    CDK_LOG_NONE = 0,          /* No log message will be shown. */
+    CDK_LOG_INFO = 1,
+    CDK_LOG_DEBUG = 2,
+    CDK_LOG_DEBUG_PKT = 3
+  };
 
 
 /* All valid compression algorithms in OpenPGP */
-enum cdk_compress_algo_t
-{
-  CDK_COMPRESS_NONE = 0,
-  CDK_COMPRESS_ZIP = 1,
-  CDK_COMPRESS_ZLIB = 2,
-  CDK_COMPRESS_BZIP2 = 3       /* Not supported in this version */
-};
+  enum cdk_compress_algo_t
+  {
+    CDK_COMPRESS_NONE = 0,
+    CDK_COMPRESS_ZIP = 1,
+    CDK_COMPRESS_ZLIB = 2,
+    CDK_COMPRESS_BZIP2 = 3     /* Not supported in this version */
+  };
 
 /* All valid public key algorithms valid in OpenPGP */
-enum cdk_pubkey_algo_t
-{
-  CDK_PK_UNKNOWN = 0,
-  CDK_PK_RSA = 1,
-  CDK_PK_RSA_E = 2,            /* RSA-E and RSA-S are deprecated use RSA 
instead */
-  CDK_PK_RSA_S = 3,            /* and use the key flags in the self 
signatures. */
-  CDK_PK_ELG_E = 16,
-  CDK_PK_DSA = 17
-};
+  enum cdk_pubkey_algo_t
+  {
+    CDK_PK_UNKNOWN = 0,
+    CDK_PK_RSA = 1,
+    CDK_PK_RSA_E = 2,          /* RSA-E and RSA-S are deprecated use RSA 
instead */
+    CDK_PK_RSA_S = 3,          /* and use the key flags in the self 
signatures. */
+    CDK_PK_ELG_E = 16,
+    CDK_PK_DSA = 17
+  };
 
 /* The valid 'String-To-Key' modes */
-enum cdk_s2k_type_t
-{
-  CDK_S2K_SIMPLE = 0,
-  CDK_S2K_SALTED = 1,
-  CDK_S2K_ITERSALTED = 3,
-  CDK_S2K_GNU_EXT = 101
-    /* GNU  extensions: refer to DETAILS from GnuPG: 
-       http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/doc/DETAILS?root=GnuPG
-     */
-};
+  enum cdk_s2k_type_t
+  {
+    CDK_S2K_SIMPLE = 0,
+    CDK_S2K_SALTED = 1,
+    CDK_S2K_ITERSALTED = 3,
+    CDK_S2K_GNU_EXT = 101
+      /* GNU  extensions: refer to DETAILS from GnuPG: 
+         http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/doc/DETAILS?root=GnuPG
+       */
+  };
 
 /* The different kind of user ID preferences. */
-enum cdk_pref_type_t
-{
-  CDK_PREFTYPE_NONE = 0,
-  CDK_PREFTYPE_SYM = 1,                /* Symmetric ciphers */
-  CDK_PREFTYPE_HASH = 2,       /* Message digests */
-  CDK_PREFTYPE_ZIP = 3         /* Compression algorithms */
-};
+  enum cdk_pref_type_t
+  {
+    CDK_PREFTYPE_NONE = 0,
+    CDK_PREFTYPE_SYM = 1,      /* Symmetric ciphers */
+    CDK_PREFTYPE_HASH = 2,     /* Message digests */
+    CDK_PREFTYPE_ZIP = 3       /* Compression algorithms */
+  };
 
 
 /* All valid sub packet types. */
-enum cdk_sig_subpacket_t
-{
-  CDK_SIGSUBPKT_NONE = 0,
-  CDK_SIGSUBPKT_SIG_CREATED = 2,
-  CDK_SIGSUBPKT_SIG_EXPIRE = 3,
-  CDK_SIGSUBPKT_EXPORTABLE = 4,
-  CDK_SIGSUBPKT_TRUST = 5,
-  CDK_SIGSUBPKT_REGEXP = 6,
-  CDK_SIGSUBPKT_REVOCABLE = 7,
-  CDK_SIGSUBPKT_KEY_EXPIRE = 9,
-  CDK_SIGSUBPKT_PREFS_SYM = 11,
-  CDK_SIGSUBPKT_REV_KEY = 12,
-  CDK_SIGSUBPKT_ISSUER = 16,
-  CDK_SIGSUBPKT_NOTATION = 20,
-  CDK_SIGSUBPKT_PREFS_HASH = 21,
-  CDK_SIGSUBPKT_PREFS_ZIP = 22,
-  CDK_SIGSUBPKT_KS_FLAGS = 23,
-  CDK_SIGSUBPKT_PREF_KS = 24,
-  CDK_SIGSUBPKT_PRIMARY_UID = 25,
-  CDK_SIGSUBPKT_POLICY = 26,
-  CDK_SIGSUBPKT_KEY_FLAGS = 27,
-  CDK_SIGSUBPKT_SIGNERS_UID = 28,
-  CDK_SIGSUBPKT_REVOC_REASON = 29,
-  CDK_SIGSUBPKT_FEATURES = 30
-};
+  enum cdk_sig_subpacket_t
+  {
+    CDK_SIGSUBPKT_NONE = 0,
+    CDK_SIGSUBPKT_SIG_CREATED = 2,
+    CDK_SIGSUBPKT_SIG_EXPIRE = 3,
+    CDK_SIGSUBPKT_EXPORTABLE = 4,
+    CDK_SIGSUBPKT_TRUST = 5,
+    CDK_SIGSUBPKT_REGEXP = 6,
+    CDK_SIGSUBPKT_REVOCABLE = 7,
+    CDK_SIGSUBPKT_KEY_EXPIRE = 9,
+    CDK_SIGSUBPKT_PREFS_SYM = 11,
+    CDK_SIGSUBPKT_REV_KEY = 12,
+    CDK_SIGSUBPKT_ISSUER = 16,
+    CDK_SIGSUBPKT_NOTATION = 20,
+    CDK_SIGSUBPKT_PREFS_HASH = 21,
+    CDK_SIGSUBPKT_PREFS_ZIP = 22,
+    CDK_SIGSUBPKT_KS_FLAGS = 23,
+    CDK_SIGSUBPKT_PREF_KS = 24,
+    CDK_SIGSUBPKT_PRIMARY_UID = 25,
+    CDK_SIGSUBPKT_POLICY = 26,
+    CDK_SIGSUBPKT_KEY_FLAGS = 27,
+    CDK_SIGSUBPKT_SIGNERS_UID = 28,
+    CDK_SIGSUBPKT_REVOC_REASON = 29,
+    CDK_SIGSUBPKT_FEATURES = 30
+  };
 
 
 /* All valid armor types. */
-enum cdk_armor_type_t
-{
-  CDK_ARMOR_MESSAGE = 0,
-  CDK_ARMOR_PUBKEY = 1,
-  CDK_ARMOR_SECKEY = 2,
-  CDK_ARMOR_SIGNATURE = 3,
-  CDK_ARMOR_CLEARSIG = 4
-};
-
-enum cdk_keydb_flag_t
-{
-  /* Valid database search modes */
-  CDK_DBSEARCH_EXACT = 1,      /* Exact string search */
-  CDK_DBSEARCH_SUBSTR = 2,     /* Sub string search */
-  CDK_DBSEARCH_SHORT_KEYID = 3,        /* 32-bit keyid search */
-  CDK_DBSEARCH_KEYID = 4,      /* 64-bit keyid search */
-  CDK_DBSEARCH_FPR = 5,                /* 160-bit fingerprint search */
-  CDK_DBSEARCH_NEXT = 6,       /* Enumerate all keys */
-  CDK_DBSEARCH_AUTO = 7,       /* Try to classify the string */
-  /* Valid database types */
-  CDK_DBTYPE_PK_KEYRING = 100, /* A file with one or more public keys */
-  CDK_DBTYPE_SK_KEYRING = 101, /* A file with one or more secret keys */
-  CDK_DBTYPE_DATA = 102,       /* A buffer with at least one public key */
-  CDK_DBTYPE_STREAM = 103      /* A stream is used to read keys from */
-};
+  enum cdk_armor_type_t
+  {
+    CDK_ARMOR_MESSAGE = 0,
+    CDK_ARMOR_PUBKEY = 1,
+    CDK_ARMOR_SECKEY = 2,
+    CDK_ARMOR_SIGNATURE = 3,
+    CDK_ARMOR_CLEARSIG = 4
+  };
+
+  enum cdk_keydb_flag_t
+  {
+    /* Valid database search modes */
+    CDK_DBSEARCH_EXACT = 1,    /* Exact string search */
+    CDK_DBSEARCH_SUBSTR = 2,   /* Sub string search */
+    CDK_DBSEARCH_SHORT_KEYID = 3,      /* 32-bit keyid search */
+    CDK_DBSEARCH_KEYID = 4,    /* 64-bit keyid search */
+    CDK_DBSEARCH_FPR = 5,      /* 160-bit fingerprint search */
+    CDK_DBSEARCH_NEXT = 6,     /* Enumerate all keys */
+    CDK_DBSEARCH_AUTO = 7,     /* Try to classify the string */
+    /* Valid database types */
+    CDK_DBTYPE_PK_KEYRING = 100,       /* A file with one or more public keys 
*/
+    CDK_DBTYPE_SK_KEYRING = 101,       /* A file with one or more secret keys 
*/
+    CDK_DBTYPE_DATA = 102,     /* A buffer with at least one public key */
+    CDK_DBTYPE_STREAM = 103    /* A stream is used to read keys from */
+  };
 
 
 /* All valid modes for cdk_data_transform() */
-enum cdk_crypto_mode_t
-{
-  CDK_CRYPTYPE_NONE = 0,
-  CDK_CRYPTYPE_ENCRYPT = 1,
-  CDK_CRYPTYPE_DECRYPT = 2,
-  CDK_CRYPTYPE_SIGN = 3,
-  CDK_CRYPTYPE_VERIFY = 4,
-  CDK_CRYPTYPE_EXPORT = 5,
-  CDK_CRYPTYPE_IMPORT = 6
-};
+  enum cdk_crypto_mode_t
+  {
+    CDK_CRYPTYPE_NONE = 0,
+    CDK_CRYPTYPE_ENCRYPT = 1,
+    CDK_CRYPTYPE_DECRYPT = 2,
+    CDK_CRYPTYPE_SIGN = 3,
+    CDK_CRYPTYPE_VERIFY = 4,
+    CDK_CRYPTYPE_EXPORT = 5,
+    CDK_CRYPTYPE_IMPORT = 6
+  };
 
 #define CDK_KEY_USG_ENCR (CDK_KEY_USG_COMM_ENCR | CDK_KEY_USG_STORAGE_ENCR)
 #define CDK_KEY_USG_SIGN (CDK_KEY_USG_DATA_SIGN | CDK_KEY_USG_CERT_SIGN)
 /* A list of valid public key usages. */
-enum cdk_key_usage_t
-{
-  CDK_KEY_USG_CERT_SIGN = 1,
-  CDK_KEY_USG_DATA_SIGN = 2,
-  CDK_KEY_USG_COMM_ENCR = 4,
-  CDK_KEY_USG_STORAGE_ENCR = 8,
-  CDK_KEY_USG_SPLIT_KEY = 16,
-  CDK_KEY_USG_AUTH = 32,
-  CDK_KEY_USG_SHARED_KEY = 128
-};
+  enum cdk_key_usage_t
+  {
+    CDK_KEY_USG_CERT_SIGN = 1,
+    CDK_KEY_USG_DATA_SIGN = 2,
+    CDK_KEY_USG_COMM_ENCR = 4,
+    CDK_KEY_USG_STORAGE_ENCR = 8,
+    CDK_KEY_USG_SPLIT_KEY = 16,
+    CDK_KEY_USG_AUTH = 32,
+    CDK_KEY_USG_SHARED_KEY = 128
+  };
 
 
 /* Valid flags for keys. */
-enum cdk_key_flag_t
-{
-  CDK_KEY_VALID = 0,
-  CDK_KEY_INVALID = 1,         /* Missing or wrong self signature */
-  CDK_KEY_EXPIRED = 2,         /* Key is expired. */
-  CDK_KEY_REVOKED = 4,         /* Key has been revoked. */
-  CDK_KEY_NOSIGNER = 8
-};
+  enum cdk_key_flag_t
+  {
+    CDK_KEY_VALID = 0,
+    CDK_KEY_INVALID = 1,       /* Missing or wrong self signature */
+    CDK_KEY_EXPIRED = 2,       /* Key is expired. */
+    CDK_KEY_REVOKED = 4,       /* Key has been revoked. */
+    CDK_KEY_NOSIGNER = 8
+  };
 
 
 /* Trust values and flags for keys and user IDs */
-enum cdk_trust_flag_t
-{
-  CDK_TRUST_UNKNOWN = 0,
-  CDK_TRUST_EXPIRED = 1,
-  CDK_TRUST_UNDEFINED = 2,
-  CDK_TRUST_NEVER = 3,
-  CDK_TRUST_MARGINAL = 4,
-  CDK_TRUST_FULLY = 5,
-  CDK_TRUST_ULTIMATE = 6,
-  /* trust flags */
-  CDK_TFLAG_REVOKED = 32,
-  CDK_TFLAG_SUB_REVOKED = 64,
-  CDK_TFLAG_DISABLED = 128
-};
+  enum cdk_trust_flag_t
+  {
+    CDK_TRUST_UNKNOWN = 0,
+    CDK_TRUST_EXPIRED = 1,
+    CDK_TRUST_UNDEFINED = 2,
+    CDK_TRUST_NEVER = 3,
+    CDK_TRUST_MARGINAL = 4,
+    CDK_TRUST_FULLY = 5,
+    CDK_TRUST_ULTIMATE = 6,
+    /* trust flags */
+    CDK_TFLAG_REVOKED = 32,
+    CDK_TFLAG_SUB_REVOKED = 64,
+    CDK_TFLAG_DISABLED = 128
+  };
 
 
 /* Signature states and the signature modes. */
-enum cdk_signature_stat_t
-{
-  /* Signature status */
-  CDK_SIGSTAT_NONE = 0,
-  CDK_SIGSTAT_GOOD = 1,
-  CDK_SIGSTAT_BAD = 2,
-  CDK_SIGSTAT_NOKEY = 3,
-  CDK_SIGSTAT_VALID = 4,       /* True if made with a valid key. */
-  /* FIXME: We need indicators for revoked/expires signatures. */
+  enum cdk_signature_stat_t
+  {
+    /* Signature status */
+    CDK_SIGSTAT_NONE = 0,
+    CDK_SIGSTAT_GOOD = 1,
+    CDK_SIGSTAT_BAD = 2,
+    CDK_SIGSTAT_NOKEY = 3,
+    CDK_SIGSTAT_VALID = 4,     /* True if made with a valid key. */
+    /* FIXME: We need indicators for revoked/expires signatures. */
 
-  /* Signature modes */
-  CDK_SIGMODE_NORMAL = 100,
-  CDK_SIGMODE_DETACHED = 101,
-  CDK_SIGMODE_CLEAR = 102
-};
+    /* Signature modes */
+    CDK_SIGMODE_NORMAL = 100,
+    CDK_SIGMODE_DETACHED = 101,
+    CDK_SIGMODE_CLEAR = 102
+  };
 
 
 /* Key flags. */
-typedef enum
-{
-  CDK_FLAG_KEY_REVOKED = 256,
-  CDK_FLAG_KEY_EXPIRED = 512,
-  CDK_FLAG_SIG_EXPIRED = 1024
-} cdk_key_flags_t;
+  typedef enum
+  {
+    CDK_FLAG_KEY_REVOKED = 256,
+    CDK_FLAG_KEY_EXPIRED = 512,
+    CDK_FLAG_SIG_EXPIRED = 1024
+  } cdk_key_flags_t;
 
 
 /* Possible format for the literal data. */
-typedef enum
-{
-  CDK_LITFMT_BINARY = 0,
-  CDK_LITFMT_TEXT = 1,
-  CDK_LITFMT_UNICODE = 2
-} cdk_lit_format_t;
+  typedef enum
+  {
+    CDK_LITFMT_BINARY = 0,
+    CDK_LITFMT_TEXT = 1,
+    CDK_LITFMT_UNICODE = 2
+  } cdk_lit_format_t;
 
 /* Valid OpenPGP packet types and their IDs */
-typedef enum
-{
-  CDK_PKT_RESERVED = 0,
-  CDK_PKT_PUBKEY_ENC = 1,
-  CDK_PKT_SIGNATURE = 2,
-  CDK_PKT_ONEPASS_SIG = 4,
-  CDK_PKT_SECRET_KEY = 5,
-  CDK_PKT_PUBLIC_KEY = 6,
-  CDK_PKT_SECRET_SUBKEY = 7,
-  CDK_PKT_COMPRESSED = 8,
-  CDK_PKT_MARKER = 10,
-  CDK_PKT_LITERAL = 11,
-  CDK_PKT_RING_TRUST = 12,
-  CDK_PKT_USER_ID = 13,
-  CDK_PKT_PUBLIC_SUBKEY = 14,
-  CDK_PKT_OLD_COMMENT = 16,
-  CDK_PKT_ATTRIBUTE = 17,
-  CDK_PKT_MDC = 19
-} cdk_packet_type_t;
+  typedef enum
+  {
+    CDK_PKT_RESERVED = 0,
+    CDK_PKT_PUBKEY_ENC = 1,
+    CDK_PKT_SIGNATURE = 2,
+    CDK_PKT_ONEPASS_SIG = 4,
+    CDK_PKT_SECRET_KEY = 5,
+    CDK_PKT_PUBLIC_KEY = 6,
+    CDK_PKT_SECRET_SUBKEY = 7,
+    CDK_PKT_COMPRESSED = 8,
+    CDK_PKT_MARKER = 10,
+    CDK_PKT_LITERAL = 11,
+    CDK_PKT_RING_TRUST = 12,
+    CDK_PKT_USER_ID = 13,
+    CDK_PKT_PUBLIC_SUBKEY = 14,
+    CDK_PKT_OLD_COMMENT = 16,
+    CDK_PKT_ATTRIBUTE = 17,
+    CDK_PKT_MDC = 19
+  } cdk_packet_type_t;
 
 /* Define the maximal number of multiprecion integers for
    a public key. */
@@ -388,218 +389,218 @@ typedef enum
   || ((pkttype)==CDK_PKT_ENCRYPTED))
 
 
-struct cdk_pkt_signature_s
-{
-  unsigned char version;
-  unsigned char sig_class;
-  unsigned int timestamp;
-  unsigned int expiredate;
-  unsigned int keyid[2];
-  unsigned char pubkey_algo;
-  unsigned char digest_algo;
-  unsigned char digest_start[2];
-  unsigned short hashed_size;
-  cdk_subpkt_t hashed;
-  unsigned short unhashed_size;
-  cdk_subpkt_t unhashed;
-  bigint_t mpi[MAX_CDK_DATA_PARTS];
-  cdk_desig_revoker_t revkeys;
-  struct
+  struct cdk_pkt_signature_s
   {
-    unsigned exportable:1;
-    unsigned revocable:1;
-    unsigned policy_url:1;
-    unsigned notation:1;
-    unsigned expired:1;
-    unsigned checked:1;
-    unsigned valid:1;
-    unsigned missing_key:1;
-  } flags;
-  unsigned int key[2];         /* only valid for key signatures */
-};
-typedef struct cdk_pkt_signature_s *cdk_pkt_signature_t;
-
-
-struct cdk_pkt_userid_s
-{
-  unsigned int len;
-  unsigned is_primary:1;
-  unsigned is_revoked:1;
-  unsigned mdc_feature:1;
-  cdk_prefitem_t prefs;
-  size_t prefs_size;
-  unsigned char *attrib_img;   /* Tag 17 if not null */
-  size_t attrib_len;
-  cdk_pkt_signature_t selfsig;
-  char *name;
-};
-typedef struct cdk_pkt_userid_s *cdk_pkt_userid_t;
-
-
-struct cdk_pkt_pubkey_s
-{
-  unsigned char version;
-  unsigned char pubkey_algo;
-  unsigned char fpr[20];
-  unsigned int keyid[2];
-  unsigned int main_keyid[2];
-  unsigned int timestamp;
-  unsigned int expiredate;
-  bigint_t mpi[MAX_CDK_PK_PARTS];
-  unsigned is_revoked:1;
-  unsigned is_invalid:1;
-  unsigned has_expired:1;
-  int pubkey_usage;
-  cdk_pkt_userid_t uid;
-  cdk_prefitem_t prefs;
-  size_t prefs_size;
-  cdk_desig_revoker_t revkeys;
-};
-typedef struct cdk_pkt_pubkey_s *cdk_pkt_pubkey_t;
+    unsigned char version;
+    unsigned char sig_class;
+    unsigned int timestamp;
+    unsigned int expiredate;
+    unsigned int keyid[2];
+    unsigned char pubkey_algo;
+    unsigned char digest_algo;
+    unsigned char digest_start[2];
+    unsigned short hashed_size;
+    cdk_subpkt_t hashed;
+    unsigned short unhashed_size;
+    cdk_subpkt_t unhashed;
+    bigint_t mpi[MAX_CDK_DATA_PARTS];
+    cdk_desig_revoker_t revkeys;
+    struct
+    {
+      unsigned exportable:1;
+      unsigned revocable:1;
+      unsigned policy_url:1;
+      unsigned notation:1;
+      unsigned expired:1;
+      unsigned checked:1;
+      unsigned valid:1;
+      unsigned missing_key:1;
+    } flags;
+    unsigned int key[2];       /* only valid for key signatures */
+  };
+  typedef struct cdk_pkt_signature_s *cdk_pkt_signature_t;
+
+
+  struct cdk_pkt_userid_s
+  {
+    unsigned int len;
+    unsigned is_primary:1;
+    unsigned is_revoked:1;
+    unsigned mdc_feature:1;
+    cdk_prefitem_t prefs;
+    size_t prefs_size;
+    unsigned char *attrib_img; /* Tag 17 if not null */
+    size_t attrib_len;
+    cdk_pkt_signature_t selfsig;
+    char *name;
+  };
+  typedef struct cdk_pkt_userid_s *cdk_pkt_userid_t;
+
+
+  struct cdk_pkt_pubkey_s
+  {
+    unsigned char version;
+    unsigned char pubkey_algo;
+    unsigned char fpr[20];
+    unsigned int keyid[2];
+    unsigned int main_keyid[2];
+    unsigned int timestamp;
+    unsigned int expiredate;
+    bigint_t mpi[MAX_CDK_PK_PARTS];
+    unsigned is_revoked:1;
+    unsigned is_invalid:1;
+    unsigned has_expired:1;
+    int pubkey_usage;
+    cdk_pkt_userid_t uid;
+    cdk_prefitem_t prefs;
+    size_t prefs_size;
+    cdk_desig_revoker_t revkeys;
+  };
+  typedef struct cdk_pkt_pubkey_s *cdk_pkt_pubkey_t;
 
 /* Alias to define a generic public key context. */
-typedef cdk_pkt_pubkey_t cdk_pubkey_t;
+  typedef cdk_pkt_pubkey_t cdk_pubkey_t;
 
 
-struct cdk_pkt_seckey_s
-{
-  cdk_pkt_pubkey_t pk;
-  unsigned int expiredate;
-  int version;
-  int pubkey_algo;
-  unsigned int keyid[2];
-  unsigned int main_keyid[2];
-  unsigned char s2k_usage;
-  struct
+  struct cdk_pkt_seckey_s
   {
-    unsigned char algo;
-    unsigned char sha1chk;     /* SHA1 is used instead of a 16 bit checksum */
-    cdk_s2k_t s2k;
-    unsigned char iv[16];
-    unsigned char ivlen;
-  } protect;
-  unsigned short csum;
-  bigint_t mpi[MAX_CDK_PK_PARTS];
-  unsigned char *encdata;
-  size_t enclen;
-  unsigned char is_protected;
-  unsigned is_primary:1;
-  unsigned has_expired:1;
-  unsigned is_revoked:1;
-};
-typedef struct cdk_pkt_seckey_s *cdk_pkt_seckey_t;
+    cdk_pkt_pubkey_t pk;
+    unsigned int expiredate;
+    int version;
+    int pubkey_algo;
+    unsigned int keyid[2];
+    unsigned int main_keyid[2];
+    unsigned char s2k_usage;
+    struct
+    {
+      unsigned char algo;
+      unsigned char sha1chk;   /* SHA1 is used instead of a 16 bit checksum */
+      cdk_s2k_t s2k;
+      unsigned char iv[16];
+      unsigned char ivlen;
+    } protect;
+    unsigned short csum;
+    bigint_t mpi[MAX_CDK_PK_PARTS];
+    unsigned char *encdata;
+    size_t enclen;
+    unsigned char is_protected;
+    unsigned is_primary:1;
+    unsigned has_expired:1;
+    unsigned is_revoked:1;
+  };
+  typedef struct cdk_pkt_seckey_s *cdk_pkt_seckey_t;
 
 /* Alias to define a generic secret key context. */
-typedef cdk_pkt_seckey_t cdk_seckey_t;
+  typedef cdk_pkt_seckey_t cdk_seckey_t;
 
 
-struct cdk_pkt_onepass_sig_s
-{
-  unsigned char version;
-  unsigned int keyid[2];
-  unsigned char sig_class;
-  unsigned char digest_algo;
-  unsigned char pubkey_algo;
-  unsigned char last;
-};
-typedef struct cdk_pkt_onepass_sig_s *cdk_pkt_onepass_sig_t;
+  struct cdk_pkt_onepass_sig_s
+  {
+    unsigned char version;
+    unsigned int keyid[2];
+    unsigned char sig_class;
+    unsigned char digest_algo;
+    unsigned char pubkey_algo;
+    unsigned char last;
+  };
+  typedef struct cdk_pkt_onepass_sig_s *cdk_pkt_onepass_sig_t;
 
 
-struct cdk_pkt_pubkey_enc_s
-{
-  unsigned char version;
-  unsigned int keyid[2];
-  int throw_keyid;
-  unsigned char pubkey_algo;
-  bigint_t mpi[MAX_CDK_DATA_PARTS];
-};
-typedef struct cdk_pkt_pubkey_enc_s *cdk_pkt_pubkey_enc_t;
-
-struct cdk_pkt_encrypted_s
-{
-  unsigned int len;
-  int extralen;
-  unsigned char mdc_method;
-  cdk_stream_t buf;
-};
-typedef struct cdk_pkt_encrypted_s *cdk_pkt_encrypted_t;
+  struct cdk_pkt_pubkey_enc_s
+  {
+    unsigned char version;
+    unsigned int keyid[2];
+    int throw_keyid;
+    unsigned char pubkey_algo;
+    bigint_t mpi[MAX_CDK_DATA_PARTS];
+  };
+  typedef struct cdk_pkt_pubkey_enc_s *cdk_pkt_pubkey_enc_t;
+
+  struct cdk_pkt_encrypted_s
+  {
+    unsigned int len;
+    int extralen;
+    unsigned char mdc_method;
+    cdk_stream_t buf;
+  };
+  typedef struct cdk_pkt_encrypted_s *cdk_pkt_encrypted_t;
 
 
-struct cdk_pkt_mdc_s
-{
-  unsigned char hash[20];
-};
-typedef struct cdk_pkt_mdc_s *cdk_pkt_mdc_t;
+  struct cdk_pkt_mdc_s
+  {
+    unsigned char hash[20];
+  };
+  typedef struct cdk_pkt_mdc_s *cdk_pkt_mdc_t;
 
 
-struct cdk_pkt_literal_s
-{
-  unsigned int len;
-  cdk_stream_t buf;
-  int mode;
-  unsigned int timestamp;
-  int namelen;
-  char *name;
-};
-typedef struct cdk_pkt_literal_s *cdk_pkt_literal_t;
+  struct cdk_pkt_literal_s
+  {
+    unsigned int len;
+    cdk_stream_t buf;
+    int mode;
+    unsigned int timestamp;
+    int namelen;
+    char *name;
+  };
+  typedef struct cdk_pkt_literal_s *cdk_pkt_literal_t;
 
 
-struct cdk_pkt_compressed_s
-{
-  unsigned int len;
-  int algorithm;
-  cdk_stream_t buf;
-};
-typedef struct cdk_pkt_compressed_s *cdk_pkt_compressed_t;
+  struct cdk_pkt_compressed_s
+  {
+    unsigned int len;
+    int algorithm;
+    cdk_stream_t buf;
+  };
+  typedef struct cdk_pkt_compressed_s *cdk_pkt_compressed_t;
 
 
 /* Structure which represents a single OpenPGP packet. */
-struct cdk_packet_s
-{
-  size_t pktlen;               /* real packet length */
-  size_t pktsize;              /* length with all headers */
-  int old_ctb;                 /* 1 if RFC1991 mode is used */
-  cdk_packet_type_t pkttype;
-  union
+  struct cdk_packet_s
   {
-    cdk_pkt_mdc_t mdc;
-    cdk_pkt_userid_t user_id;
-    cdk_pkt_pubkey_t public_key;
-    cdk_pkt_seckey_t secret_key;
-    cdk_pkt_signature_t signature;
-    cdk_pkt_pubkey_enc_t pubkey_enc;
-    cdk_pkt_compressed_t compressed;
-    cdk_pkt_encrypted_t encrypted;
-    cdk_pkt_literal_t literal;
-    cdk_pkt_onepass_sig_t onepass_sig;
-  } pkt;
-};
-typedef struct cdk_packet_s *cdk_packet_t;
+    size_t pktlen;             /* real packet length */
+    size_t pktsize;            /* length with all headers */
+    int old_ctb;               /* 1 if RFC1991 mode is used */
+    cdk_packet_type_t pkttype;
+    union
+    {
+      cdk_pkt_mdc_t mdc;
+      cdk_pkt_userid_t user_id;
+      cdk_pkt_pubkey_t public_key;
+      cdk_pkt_seckey_t secret_key;
+      cdk_pkt_signature_t signature;
+      cdk_pkt_pubkey_enc_t pubkey_enc;
+      cdk_pkt_compressed_t compressed;
+      cdk_pkt_encrypted_t encrypted;
+      cdk_pkt_literal_t literal;
+      cdk_pkt_onepass_sig_t onepass_sig;
+    } pkt;
+  };
+  typedef struct cdk_packet_s *cdk_packet_t;
 
 /* Session handle routines */
-cdk_error_t cdk_handle_new (cdk_ctx_t * r_ctx);
-void cdk_handle_free (cdk_ctx_t c);
+  cdk_error_t cdk_handle_new (cdk_ctx_t * r_ctx);
+  void cdk_handle_free (cdk_ctx_t c);
 
 /* Set the key database handle for the given session handle.
    The type of the key db handle (public or secret) decides
    which session key db handle to use. */
-void cdk_handle_set_keydb (cdk_ctx_t hd, cdk_keydb_hd_t db);
+  void cdk_handle_set_keydb (cdk_ctx_t hd, cdk_keydb_hd_t db);
 
 /* Convenient function to avoid to open a key db first.
    The user can directly use the file name, the rest is
    done internally. */
-cdk_error_t cdk_handle_set_keyring (cdk_ctx_t hd, int type,
-                                   const char *kringname);
+  cdk_error_t cdk_handle_set_keyring (cdk_ctx_t hd, int type,
+                                     const char *kringname);
 
 /* Return keydb handle stored in the session handle. */
-cdk_keydb_hd_t cdk_handle_get_keydb (cdk_ctx_t hd, int type);
-int cdk_handle_control (cdk_ctx_t hd, int action, int cmd, ...);
+  cdk_keydb_hd_t cdk_handle_get_keydb (cdk_ctx_t hd, int type);
+  int cdk_handle_control (cdk_ctx_t hd, int action, int cmd, ...);
 
 /* Set a passphrase callback for the given session handle. */
-void cdk_handle_set_passphrase_cb (cdk_ctx_t hd,
-                                  char *(*cb) (void *opa,
-                                               const char *prompt),
-                                  void *cb_value);
+  void cdk_handle_set_passphrase_cb (cdk_ctx_t hd,
+                                    char *(*cb) (void *opa,
+                                                 const char *prompt),
+                                    void *cb_value);
 
 /* shortcuts for some controls */
 
@@ -627,60 +628,62 @@ void cdk_handle_set_passphrase_cb (cdk_ctx_t hd,
 
 
 /* This context holds all information of the verification process. */
-struct cdk_verify_result_s
-{
-  int sig_ver;                 /* Version of the signature. */
-  int sig_status;              /* The status (GOOD, BAD) of the signature */
-  int sig_flags;               /* May contain expired or revoked flags */
-  unsigned int keyid[2];       /* The issuer key ID */
-  unsigned int created;                /* Timestamp when the sig was created. 
*/
-  unsigned int expires;
-  int pubkey_algo;
-  int digest_algo;
-  char *user_id;               /* NULL or user ID which issued the signature. 
*/
-  char *policy_url;            /* If set, the policy the sig was created 
under. */
-  size_t sig_len;              /* Size of the signature data inbits. */
-  unsigned char *sig_data;     /* Raw signature data. */
-};
-typedef struct cdk_verify_result_s *cdk_verify_result_t;
+  struct cdk_verify_result_s
+  {
+    int sig_ver;               /* Version of the signature. */
+    int sig_status;            /* The status (GOOD, BAD) of the signature */
+    int sig_flags;             /* May contain expired or revoked flags */
+    unsigned int keyid[2];     /* The issuer key ID */
+    unsigned int created;      /* Timestamp when the sig was created. */
+    unsigned int expires;
+    int pubkey_algo;
+    int digest_algo;
+    char *user_id;             /* NULL or user ID which issued the signature. 
*/
+    char *policy_url;          /* If set, the policy the sig was created 
under. */
+    size_t sig_len;            /* Size of the signature data inbits. */
+    unsigned char *sig_data;   /* Raw signature data. */
+  };
+  typedef struct cdk_verify_result_s *cdk_verify_result_t;
 
 /* Return the verify result. Do not free the data. */
-cdk_verify_result_t cdk_handle_verify_get_result (cdk_ctx_t hd);
+  cdk_verify_result_t cdk_handle_verify_get_result (cdk_ctx_t hd);
 
 /* Raw packet routines. */
 
 /* Allocate a new packet or a new packet with the given packet type. */
-cdk_error_t cdk_pkt_new (cdk_packet_t * r_pkt);
-cdk_error_t cdk_pkt_alloc (cdk_packet_t * r_pkt, cdk_packet_type_t pkttype);
+  cdk_error_t cdk_pkt_new (cdk_packet_t * r_pkt);
+  cdk_error_t cdk_pkt_alloc (cdk_packet_t * r_pkt, cdk_packet_type_t pkttype);
 
 /* Only release the contents of the packet but not @PKT itself. */
-void cdk_pkt_free (cdk_packet_t pkt);
+  void cdk_pkt_free (cdk_packet_t pkt);
 
 /* Release the packet contents and the packet structure @PKT itself. */
-void cdk_pkt_release (cdk_packet_t pkt);
+  void cdk_pkt_release (cdk_packet_t pkt);
 
 /* Read or write the given output from or to the stream. */
-cdk_error_t cdk_pkt_read (cdk_stream_t inp, cdk_packet_t pkt);
-cdk_error_t cdk_pkt_write (cdk_stream_t out, cdk_packet_t pkt);
+  cdk_error_t cdk_pkt_read (cdk_stream_t inp, cdk_packet_t pkt);
+  cdk_error_t cdk_pkt_write (cdk_stream_t out, cdk_packet_t pkt);
 
 /* Sub packet routines */
-cdk_subpkt_t cdk_subpkt_new (size_t size);
-void cdk_subpkt_free (cdk_subpkt_t ctx);
-cdk_subpkt_t cdk_subpkt_find (cdk_subpkt_t ctx, size_t type);
-cdk_subpkt_t cdk_subpkt_find_next (cdk_subpkt_t root, size_t type);
-size_t cdk_subpkt_type_count (cdk_subpkt_t ctx, size_t type);
-cdk_subpkt_t cdk_subpkt_find_nth (cdk_subpkt_t ctx, size_t type,
-                                 size_t index);
-cdk_error_t cdk_subpkt_add (cdk_subpkt_t root, cdk_subpkt_t node);
-const unsigned char *cdk_subpkt_get_data (cdk_subpkt_t ctx,
-                                         size_t * r_type, size_t * r_nbytes);
-void cdk_subpkt_init (cdk_subpkt_t node, size_t type,
-                     const void *buf, size_t buflen);
+  cdk_subpkt_t cdk_subpkt_new (size_t size);
+  void cdk_subpkt_free (cdk_subpkt_t ctx);
+  cdk_subpkt_t cdk_subpkt_find (cdk_subpkt_t ctx, size_t type);
+  cdk_subpkt_t cdk_subpkt_find_next (cdk_subpkt_t root, size_t type);
+  size_t cdk_subpkt_type_count (cdk_subpkt_t ctx, size_t type);
+  cdk_subpkt_t cdk_subpkt_find_nth (cdk_subpkt_t ctx, size_t type,
+                                   size_t index);
+  cdk_error_t cdk_subpkt_add (cdk_subpkt_t root, cdk_subpkt_t node);
+  const unsigned char *cdk_subpkt_get_data (cdk_subpkt_t ctx,
+                                           size_t * r_type,
+                                           size_t * r_nbytes);
+  void cdk_subpkt_init (cdk_subpkt_t node, size_t type, const void *buf,
+                       size_t buflen);
 
 /* Designated Revoker routines */
-const unsigned char *cdk_key_desig_revoker_walk (cdk_desig_revoker_t root,
-                                                cdk_desig_revoker_t * ctx,
-                                                int *r_class, int *r_algid);
+  const unsigned char *cdk_key_desig_revoker_walk (cdk_desig_revoker_t root,
+                                                  cdk_desig_revoker_t * ctx,
+                                                  int *r_class,
+                                                  int *r_algid);
 
 #define is_RSA(a) ((a) == CDK_PK_RSA           \
                   || (a) == CDK_PK_RSA_E       \
@@ -690,23 +693,23 @@ const unsigned char *cdk_key_desig_revoker_walk 
(cdk_desig_revoker_t root,
 
 /* Encrypt the given session key @SK with the public key @PK
    and write the contents into the packet @PKE. */
-cdk_error_t cdk_pk_encrypt (cdk_pubkey_t pk, cdk_pkt_pubkey_enc_t pke,
-                           bigint_t sk);
+  cdk_error_t cdk_pk_encrypt (cdk_pubkey_t pk, cdk_pkt_pubkey_enc_t pke,
+                             bigint_t sk);
 
 /* Decrypt the given encrypted session key in @PKE with the secret key
    @SK and store it in @R_SK. */
-cdk_error_t cdk_pk_decrypt (cdk_seckey_t sk, cdk_pkt_pubkey_enc_t pke,
-                           bigint_t * r_sk);
+  cdk_error_t cdk_pk_decrypt (cdk_seckey_t sk, cdk_pkt_pubkey_enc_t pke,
+                             bigint_t * r_sk);
 
 /* Sign the given message digest @MD with the secret key @SK and
    store the signature in the packet @SIG. */
-cdk_error_t cdk_pk_sign (cdk_seckey_t sk, cdk_pkt_signature_t sig,
-                        const unsigned char *md);
+  cdk_error_t cdk_pk_sign (cdk_seckey_t sk, cdk_pkt_signature_t sig,
+                          const unsigned char *md);
 
 /* Verify the given signature in @SIG with the public key @PK
    and compare it against the message digest @MD. */
-cdk_error_t cdk_pk_verify (cdk_pubkey_t pk, cdk_pkt_signature_t sig,
-                          const unsigned char *md);
+  cdk_error_t cdk_pk_verify (cdk_pubkey_t pk, cdk_pkt_signature_t sig,
+                            const unsigned char *md);
 
 /* Use cdk_pk_get_npkey() and cdk_pk_get_nskey to find out how much
    multiprecision integers a key consists of. */
@@ -714,350 +717,360 @@ cdk_error_t cdk_pk_verify (cdk_pubkey_t pk, 
cdk_pkt_signature_t sig,
 /* Return a multi precision integer of the public key with the index @IDX
    in the buffer @BUF. @R_NWRITTEN will contain the length in octets.
    Optional @R_NBITS may contain the size in bits. */
-cdk_error_t cdk_pk_get_mpi (cdk_pubkey_t pk, size_t idx,
-                           unsigned char *buf, size_t buflen,
-                           size_t * r_nwritten, size_t * r_nbits);
+  cdk_error_t cdk_pk_get_mpi (cdk_pubkey_t pk, size_t idx,
+                             unsigned char *buf, size_t buflen,
+                             size_t * r_nwritten, size_t * r_nbits);
 
 /* Same as the function above but of the secret key. */
-cdk_error_t cdk_sk_get_mpi (cdk_seckey_t sk, size_t idx,
-                           unsigned char *buf, size_t buflen,
-                           size_t * r_nwritten, size_t * r_nbits);
+  cdk_error_t cdk_sk_get_mpi (cdk_seckey_t sk, size_t idx,
+                             unsigned char *buf, size_t buflen,
+                             size_t * r_nwritten, size_t * r_nbits);
 
 /* Helper to get the exact number of multi precision integers
    for the given object. */
-int cdk_pk_get_nbits (cdk_pubkey_t pk);
-int cdk_pk_get_npkey (int algo);
-int cdk_pk_get_nskey (int algo);
-int cdk_pk_get_nsig (int algo);
-int cdk_pk_get_nenc (int algo);
+  int cdk_pk_get_nbits (cdk_pubkey_t pk);
+  int cdk_pk_get_npkey (int algo);
+  int cdk_pk_get_nskey (int algo);
+  int cdk_pk_get_nsig (int algo);
+  int cdk_pk_get_nenc (int algo);
 
 /* Fingerprint and key ID routines. */
 
 /* Calculate the fingerprint of the given public key.
    the FPR parameter must be at least 20 octets to hold the SHA1 hash. */
-cdk_error_t cdk_pk_get_fingerprint (cdk_pubkey_t pk, unsigned char *fpr);
+  cdk_error_t cdk_pk_get_fingerprint (cdk_pubkey_t pk, unsigned char *fpr);
 
 /* Same as above, but with additional sanity checks of the buffer size. */
-cdk_error_t cdk_pk_to_fingerprint (cdk_pubkey_t pk,
-                                  unsigned char *fpr, size_t fprlen,
-                                  size_t * r_nout);
+  cdk_error_t cdk_pk_to_fingerprint (cdk_pubkey_t pk,
+                                    unsigned char *fpr, size_t fprlen,
+                                    size_t * r_nout);
 
 /* Derive the keyid from the fingerprint. This is only possible for
    modern, version 4 keys. */
-unsigned int cdk_pk_fingerprint_get_keyid (const unsigned char *fpr,
-                                          size_t fprlen,
-                                          unsigned int *keyid);
+  unsigned int cdk_pk_fingerprint_get_keyid (const unsigned char *fpr,
+                                            size_t fprlen,
+                                            unsigned int *keyid);
 
 /* Various functions to get the keyid from the specific packet type. */
-unsigned int cdk_pk_get_keyid (cdk_pubkey_t pk, unsigned int *keyid);
-unsigned int cdk_sk_get_keyid (cdk_seckey_t sk, unsigned int *keyid);
-unsigned int cdk_sig_get_keyid (cdk_pkt_signature_t sig, unsigned int *keyid);
+  unsigned int cdk_pk_get_keyid (cdk_pubkey_t pk, unsigned int *keyid);
+  unsigned int cdk_sk_get_keyid (cdk_seckey_t sk, unsigned int *keyid);
+  unsigned int cdk_sig_get_keyid (cdk_pkt_signature_t sig,
+                                 unsigned int *keyid);
 
 /* Key release functions. */
-void cdk_pk_release (cdk_pubkey_t pk);
-void cdk_sk_release (cdk_seckey_t sk);
+  void cdk_pk_release (cdk_pubkey_t pk);
+  void cdk_sk_release (cdk_seckey_t sk);
 
 /* Create a public key with the data from the secret key @SK. */
-cdk_error_t cdk_pk_from_secret_key (cdk_seckey_t sk, cdk_pubkey_t * ret_pk);
+  cdk_error_t cdk_pk_from_secret_key (cdk_seckey_t sk, cdk_pubkey_t * ret_pk);
 
 /* Sexp conversion of keys. */
-cdk_error_t cdk_pubkey_to_sexp (cdk_pubkey_t pk, char **sexp, size_t * len);
-cdk_error_t cdk_seckey_to_sexp (cdk_seckey_t sk, char **sexp, size_t * len);
+  cdk_error_t cdk_pubkey_to_sexp (cdk_pubkey_t pk, char **sexp, size_t * len);
+  cdk_error_t cdk_seckey_to_sexp (cdk_seckey_t sk, char **sexp, size_t * len);
 
 
 /* String to Key routines. */
-cdk_error_t cdk_s2k_new (cdk_s2k_t * ret_s2k, int mode, int digest_algo,
-                        const unsigned char *salt);
-void cdk_s2k_free (cdk_s2k_t s2k);
+  cdk_error_t cdk_s2k_new (cdk_s2k_t * ret_s2k, int mode, int digest_algo,
+                          const unsigned char *salt);
+  void cdk_s2k_free (cdk_s2k_t s2k);
 
-cdk_error_t cdk_file_armor (cdk_ctx_t hd, const char *file,
-                           const char *output);
-cdk_error_t cdk_file_dearmor (const char *file, const char *output);
-int cdk_armor_filter_use (cdk_stream_t inp);
+  cdk_error_t cdk_file_armor (cdk_ctx_t hd, const char *file,
+                             const char *output);
+  cdk_error_t cdk_file_dearmor (const char *file, const char *output);
+  int cdk_armor_filter_use (cdk_stream_t inp);
 
 /* Protect the inbuf with ASCII armor of the specified type.
    If @outbuf and @outlen are NULL, the function returns the calculated
    size of the base64 encoded data in @nwritten. */
-cdk_error_t cdk_armor_encode_buffer (const unsigned char *inbuf, size_t inlen,
-                                    char *outbuf, size_t outlen,
-                                    size_t * nwritten, int type);
+  cdk_error_t cdk_armor_encode_buffer (const unsigned char *inbuf,
+                                      size_t inlen, char *outbuf,
+                                      size_t outlen, size_t * nwritten,
+                                      int type);
 
 
 /* This context contain user callbacks for different stream operations.
    Some of these callbacks might be NULL to indicate that the callback
    is not used. */
-struct cdk_stream_cbs_s
-{
-  cdk_error_t (*open) (void *);
-  cdk_error_t (*release) (void *);
-  int (*read) (void *, void *buf, size_t);
-  int (*write) (void *, const void *buf, size_t);
-  int (*seek) (void *, off_t);
-};
-typedef struct cdk_stream_cbs_s *cdk_stream_cbs_t;
+  struct cdk_stream_cbs_s
+  {
+    cdk_error_t (*open) (void *);
+    cdk_error_t (*release) (void *);
+    int (*read) (void *, void *buf, size_t);
+    int (*write) (void *, const void *buf, size_t);
+    int (*seek) (void *, off_t);
+  };
+  typedef struct cdk_stream_cbs_s *cdk_stream_cbs_t;
 
-int cdk_stream_is_compressed (cdk_stream_t s);
+  int cdk_stream_is_compressed (cdk_stream_t s);
 
 /* Return a stream object which is associated to a socket. */
-cdk_error_t cdk_stream_sockopen (const char *host, unsigned short port,
-                                cdk_stream_t * ret_out);
+  cdk_error_t cdk_stream_sockopen (const char *host, unsigned short port,
+                                  cdk_stream_t * ret_out);
 
 /* Return a stream object which is associated to an existing file. */
-cdk_error_t cdk_stream_open (const char *file, cdk_stream_t * ret_s);
+  cdk_error_t cdk_stream_open (const char *file, cdk_stream_t * ret_s);
 
 /* Return a stream object which is associated to a file which will
    be created when the stream is closed. */
-cdk_error_t cdk_stream_new (const char *file, cdk_stream_t * ret_s);
+  cdk_error_t cdk_stream_new (const char *file, cdk_stream_t * ret_s);
 
 /* Return a stream object with custom callback functions for the
    various core operations. */
-cdk_error_t cdk_stream_new_from_cbs (cdk_stream_cbs_t cbs, void *opa,
-                                    cdk_stream_t * ret_s);
-cdk_error_t cdk_stream_create (const char *file, cdk_stream_t * ret_s);
-cdk_error_t cdk_stream_tmp_new (cdk_stream_t * r_out);
-cdk_error_t cdk_stream_tmp_from_mem (const void *buf, size_t buflen,
-                                    cdk_stream_t * r_out);
-void cdk_stream_tmp_set_mode (cdk_stream_t s, int val);
-cdk_error_t cdk_stream_flush (cdk_stream_t s);
-cdk_error_t cdk_stream_enable_cache (cdk_stream_t s, int val);
-cdk_error_t cdk_stream_filter_disable (cdk_stream_t s, int type);
-cdk_error_t cdk_stream_close (cdk_stream_t s);
-off_t cdk_stream_get_length (cdk_stream_t s);
-int cdk_stream_read (cdk_stream_t s, void *buf, size_t count);
-int cdk_stream_write (cdk_stream_t s, const void *buf, size_t count);
-int cdk_stream_putc (cdk_stream_t s, int c);
-int cdk_stream_getc (cdk_stream_t s);
-int cdk_stream_eof (cdk_stream_t s);
-off_t cdk_stream_tell (cdk_stream_t s);
-cdk_error_t cdk_stream_seek (cdk_stream_t s, off_t offset);
-cdk_error_t cdk_stream_set_armor_flag (cdk_stream_t s, int type);
+  cdk_error_t cdk_stream_new_from_cbs (cdk_stream_cbs_t cbs, void *opa,
+                                      cdk_stream_t * ret_s);
+  cdk_error_t cdk_stream_create (const char *file, cdk_stream_t * ret_s);
+  cdk_error_t cdk_stream_tmp_new (cdk_stream_t * r_out);
+  cdk_error_t cdk_stream_tmp_from_mem (const void *buf, size_t buflen,
+                                      cdk_stream_t * r_out);
+  void cdk_stream_tmp_set_mode (cdk_stream_t s, int val);
+  cdk_error_t cdk_stream_flush (cdk_stream_t s);
+  cdk_error_t cdk_stream_enable_cache (cdk_stream_t s, int val);
+  cdk_error_t cdk_stream_filter_disable (cdk_stream_t s, int type);
+  cdk_error_t cdk_stream_close (cdk_stream_t s);
+  off_t cdk_stream_get_length (cdk_stream_t s);
+  int cdk_stream_read (cdk_stream_t s, void *buf, size_t count);
+  int cdk_stream_write (cdk_stream_t s, const void *buf, size_t count);
+  int cdk_stream_putc (cdk_stream_t s, int c);
+  int cdk_stream_getc (cdk_stream_t s);
+  int cdk_stream_eof (cdk_stream_t s);
+  off_t cdk_stream_tell (cdk_stream_t s);
+  cdk_error_t cdk_stream_seek (cdk_stream_t s, off_t offset);
+  cdk_error_t cdk_stream_set_armor_flag (cdk_stream_t s, int type);
 
 /* Push the literal filter for the given stream. */
-cdk_error_t cdk_stream_set_literal_flag (cdk_stream_t s,
-                                        cdk_lit_format_t mode,
-                                        const char *fname);
-
-cdk_error_t cdk_stream_set_compress_flag (cdk_stream_t s, int algo,
-                                         int level);
-cdk_error_t cdk_stream_set_hash_flag (cdk_stream_t s, int algo);
-cdk_error_t cdk_stream_set_text_flag (cdk_stream_t s, const char *lf);
-cdk_error_t cdk_stream_kick_off (cdk_stream_t inp, cdk_stream_t out);
-cdk_error_t cdk_stream_mmap (cdk_stream_t s, unsigned char **ret_buf,
-                            size_t * ret_buflen);
-cdk_error_t cdk_stream_mmap_part (cdk_stream_t s, off_t off, size_t len,
-                                 unsigned char **ret_buf,
-                                 size_t * ret_buflen);
+  cdk_error_t cdk_stream_set_literal_flag (cdk_stream_t s,
+                                          cdk_lit_format_t mode,
+                                          const char *fname);
+
+  cdk_error_t cdk_stream_set_compress_flag (cdk_stream_t s, int algo,
+                                           int level);
+  cdk_error_t cdk_stream_set_hash_flag (cdk_stream_t s, int algo);
+  cdk_error_t cdk_stream_set_text_flag (cdk_stream_t s, const char *lf);
+  cdk_error_t cdk_stream_kick_off (cdk_stream_t inp, cdk_stream_t out);
+  cdk_error_t cdk_stream_mmap (cdk_stream_t s, unsigned char **ret_buf,
+                              size_t * ret_buflen);
+  cdk_error_t cdk_stream_mmap_part (cdk_stream_t s, off_t off, size_t len,
+                                   unsigned char **ret_buf,
+                                   size_t * ret_buflen);
 
 /* Read from the stream but restore the file pointer after reading
    the requested amount of bytes. */
-int cdk_stream_peek (cdk_stream_t inp, unsigned char *buf, size_t buflen);
+  int cdk_stream_peek (cdk_stream_t inp, unsigned char *buf, size_t buflen);
 
 /* A wrapper around the various new_from_XXX functions. Because
    the function does not support all combinations, the dedicated
    functions should be preferred. */
-cdk_error_t cdk_keydb_new (cdk_keydb_hd_t * r_hd, int type, void *data,
-                          size_t count);
+  cdk_error_t cdk_keydb_new (cdk_keydb_hd_t * r_hd, int type, void *data,
+                            size_t count);
 
 /* Create a new key db handle from a memory buffer. */
-cdk_error_t cdk_keydb_new_from_mem (cdk_keydb_hd_t * r_hd, int secret,
-                                   const void *data, size_t datlen);
+  cdk_error_t cdk_keydb_new_from_mem (cdk_keydb_hd_t * r_hd, int secret,
+                                     const void *data, size_t datlen);
 
 /* Create a new key db which uses an existing file. */
-cdk_error_t cdk_keydb_new_from_file (cdk_keydb_hd_t * r_hd, int secret,
-                                    const char *fname);
+  cdk_error_t cdk_keydb_new_from_file (cdk_keydb_hd_t * r_hd, int secret,
+                                      const char *fname);
 
 /* Uses a stream as the key db input. For searching it is important
    that the seek function is supported on the stream. Furthermore,
    the stream is not closed in cdk_keydb_free(). The caller must do it. */
-cdk_error_t cdk_keydb_new_from_stream (cdk_keydb_hd_t * r_hd, int secret,
-                                      cdk_stream_t in);
+  cdk_error_t cdk_keydb_new_from_stream (cdk_keydb_hd_t * r_hd, int secret,
+                                        cdk_stream_t in);
 
 /* Check that a secret key with the given key ID is available. */
-cdk_error_t cdk_keydb_check_sk (cdk_keydb_hd_t hd, unsigned int *keyid);
+  cdk_error_t cdk_keydb_check_sk (cdk_keydb_hd_t hd, unsigned int *keyid);
 
 /* Prepare the key db search. */
-cdk_error_t cdk_keydb_search_start (cdk_keydb_search_t * st,
-                                   cdk_keydb_hd_t db, int type, void *desc);
+  cdk_error_t cdk_keydb_search_start (cdk_keydb_search_t * st,
+                                     cdk_keydb_hd_t db, int type,
+                                     void *desc);
 
-void cdk_keydb_search_release (cdk_keydb_search_t st);
+  void cdk_keydb_search_release (cdk_keydb_search_t st);
 
 /* Return a key which matches a valid description given in
    cdk_keydb_search_start(). */
-cdk_error_t cdk_keydb_search (cdk_keydb_search_t st, cdk_keydb_hd_t hd,
-                             cdk_kbnode_t * ret_key);
+  cdk_error_t cdk_keydb_search (cdk_keydb_search_t st, cdk_keydb_hd_t hd,
+                               cdk_kbnode_t * ret_key);
 
 /* Release the key db handle and all its resources. */
-void cdk_keydb_free (cdk_keydb_hd_t hd);
+  void cdk_keydb_free (cdk_keydb_hd_t hd);
 
 /* The following functions will try to find a key in the given key
    db handle either by keyid, by fingerprint or by some pattern. */
-cdk_error_t cdk_keydb_get_bykeyid (cdk_keydb_hd_t hd, unsigned int *keyid,
-                                  cdk_kbnode_t * ret_pk);
-cdk_error_t cdk_keydb_get_byfpr (cdk_keydb_hd_t hd, const unsigned char *fpr,
-                                cdk_kbnode_t * ret_pk);
-cdk_error_t cdk_keydb_get_bypattern (cdk_keydb_hd_t hd, const char *patt,
+  cdk_error_t cdk_keydb_get_bykeyid (cdk_keydb_hd_t hd, unsigned int *keyid,
                                     cdk_kbnode_t * ret_pk);
+  cdk_error_t cdk_keydb_get_byfpr (cdk_keydb_hd_t hd,
+                                  const unsigned char *fpr,
+                                  cdk_kbnode_t * ret_pk);
+  cdk_error_t cdk_keydb_get_bypattern (cdk_keydb_hd_t hd, const char *patt,
+                                      cdk_kbnode_t * ret_pk);
 
 /* These function, in contrast to most other key db functions, only
    return the public or secret key packet without the additional
    signatures and user IDs. */
-cdk_error_t cdk_keydb_get_pk (cdk_keydb_hd_t khd, unsigned int *keyid,
-                             cdk_pubkey_t * ret_pk);
-cdk_error_t cdk_keydb_get_sk (cdk_keydb_hd_t khd, unsigned int *keyid,
-                             cdk_seckey_t * ret_sk);
+  cdk_error_t cdk_keydb_get_pk (cdk_keydb_hd_t khd, unsigned int *keyid,
+                               cdk_pubkey_t * ret_pk);
+  cdk_error_t cdk_keydb_get_sk (cdk_keydb_hd_t khd, unsigned int *keyid,
+                               cdk_seckey_t * ret_sk);
 
 /* Try to read the next key block from the given input stream.
    The key will be returned in @RET_KEY on success. */
-cdk_error_t cdk_keydb_get_keyblock (cdk_stream_t inp, cdk_kbnode_t * ret_key);
+  cdk_error_t cdk_keydb_get_keyblock (cdk_stream_t inp,
+                                     cdk_kbnode_t * ret_key);
 
 /* Rebuild the key db index if possible. */
-cdk_error_t cdk_keydb_idx_rebuild (cdk_keydb_hd_t db, cdk_keydb_search_t dbs);
+  cdk_error_t cdk_keydb_idx_rebuild (cdk_keydb_hd_t db,
+                                    cdk_keydb_search_t dbs);
 
 /* Export one or more keys from the given key db handle into
    the stream @OUT. The export is done by substring search and
    uses the string list @REMUSR for the pattern. */
-cdk_error_t cdk_keydb_export (cdk_keydb_hd_t hd, cdk_stream_t out,
-                             cdk_strlist_t remusr);
+  cdk_error_t cdk_keydb_export (cdk_keydb_hd_t hd, cdk_stream_t out,
+                               cdk_strlist_t remusr);
 
 /* Import the given key node @knode into the key db. */
-cdk_error_t cdk_keydb_import (cdk_keydb_hd_t hd, cdk_kbnode_t knode);
+  cdk_error_t cdk_keydb_import (cdk_keydb_hd_t hd, cdk_kbnode_t knode);
 
 
 /* List or enumerate keys from a given key db handle. */
 
 /* Start the key list process. Either use @PATT for a pattern search
    or @FPATT for a list of pattern. */
-cdk_error_t cdk_listkey_start (cdk_listkey_t * r_ctx, cdk_keydb_hd_t db,
-                              const char *patt, cdk_strlist_t fpatt);
-void cdk_listkey_close (cdk_listkey_t ctx);
+  cdk_error_t cdk_listkey_start (cdk_listkey_t * r_ctx, cdk_keydb_hd_t db,
+                                const char *patt, cdk_strlist_t fpatt);
+  void cdk_listkey_close (cdk_listkey_t ctx);
 
 /* Return the next key which matches the pattern. */
-cdk_error_t cdk_listkey_next (cdk_listkey_t ctx, cdk_kbnode_t * ret_key);
-
-cdk_kbnode_t cdk_kbnode_new (cdk_packet_t pkt);
-cdk_error_t cdk_kbnode_read_from_mem (cdk_kbnode_t * ret_node,
-                                     const unsigned char *buf,
-                                     size_t buflen);
-cdk_error_t cdk_kbnode_write_to_mem (cdk_kbnode_t node,
-                                    unsigned char *buf, size_t * r_nbytes);
-cdk_error_t cdk_kbnode_write_to_mem_alloc (cdk_kbnode_t node,
-                                          unsigned char **r_buf,
-                                          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_error_t cdk_listkey_next (cdk_listkey_t ctx, cdk_kbnode_t * ret_key);
+
+  cdk_kbnode_t cdk_kbnode_new (cdk_packet_t pkt);
+  cdk_error_t cdk_kbnode_read_from_mem (cdk_kbnode_t * ret_node,
+                                       const unsigned char *buf,
+                                       size_t buflen);
+  cdk_error_t cdk_kbnode_write_to_mem (cdk_kbnode_t node,
+                                      unsigned char *buf, size_t * r_nbytes);
+  cdk_error_t cdk_kbnode_write_to_mem_alloc (cdk_kbnode_t node,
+                                            unsigned char **r_buf,
+                                            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);
+  cdk_kbnode_t cdk_kbnode_find (cdk_kbnode_t node, cdk_packet_type_t pkttype);
+  cdk_kbnode_t cdk_kbnode_find_prev (cdk_kbnode_t root, cdk_kbnode_t node,
                                     cdk_packet_type_t pkttype);
-cdk_packet_t cdk_kbnode_get_packet (cdk_kbnode_t node);
-cdk_kbnode_t cdk_kbnode_find (cdk_kbnode_t node, cdk_packet_type_t pkttype);
-cdk_kbnode_t cdk_kbnode_find_prev (cdk_kbnode_t root, cdk_kbnode_t node,
-                                  cdk_packet_type_t pkttype);
-cdk_kbnode_t cdk_kbnode_find_next (cdk_kbnode_t node,
-                                  cdk_packet_type_t pkttype);
-cdk_error_t cdk_kbnode_hash (cdk_kbnode_t node, digest_hd_st * md, int is_v4,
-                            cdk_packet_type_t pkttype, int flags);
+  cdk_kbnode_t cdk_kbnode_find_next (cdk_kbnode_t node,
+                                    cdk_packet_type_t pkttype);
+  cdk_error_t cdk_kbnode_hash (cdk_kbnode_t node, digest_hd_st * md,
+                              int is_v4, cdk_packet_type_t pkttype,
+                              int flags);
 
 /* Check each signature in the key node and return a summary of the
    key status in @r_status. Values of cdk_key_flag_t are used. */
-cdk_error_t cdk_pk_check_sigs (cdk_kbnode_t knode, cdk_keydb_hd_t hd,
-                              int *r_status);
+  cdk_error_t cdk_pk_check_sigs (cdk_kbnode_t knode, cdk_keydb_hd_t hd,
+                                int *r_status);
 
 /* Check the self signature of the key to make sure it is valid. */
-cdk_error_t cdk_pk_check_self_sig (cdk_kbnode_t knode, int *r_status);
+  cdk_error_t cdk_pk_check_self_sig (cdk_kbnode_t knode, int *r_status);
 
 /* Return a matching  algorithm from the given public key list.
    @PREFTYPE can be either sym-cipher/compress/digest. */
-int cdk_pklist_select_algo (cdk_keylist_t pkl, int preftype);
+  int cdk_pklist_select_algo (cdk_keylist_t pkl, int preftype);
 
 /* Return 0 or 1 if the given key list is able to understand the
    MDC feature. */
-int cdk_pklist_use_mdc (cdk_keylist_t pkl);
-cdk_error_t cdk_pklist_build (cdk_keylist_t * ret_pkl, cdk_keydb_hd_t hd,
-                             cdk_strlist_t remusr, int use);
-void cdk_pklist_release (cdk_keylist_t pkl);
+  int cdk_pklist_use_mdc (cdk_keylist_t pkl);
+  cdk_error_t cdk_pklist_build (cdk_keylist_t * ret_pkl, cdk_keydb_hd_t hd,
+                               cdk_strlist_t remusr, int use);
+  void cdk_pklist_release (cdk_keylist_t pkl);
 
 /* Secret key lists */
-cdk_error_t cdk_sklist_build (cdk_keylist_t * ret_skl,
-                             cdk_keydb_hd_t db, cdk_ctx_t hd,
-                             cdk_strlist_t locusr,
-                             int unlock, unsigned int use);
-void cdk_sklist_release (cdk_keylist_t skl);
-cdk_error_t cdk_sklist_write (cdk_keylist_t skl, cdk_stream_t outp,
-                             digest_hd_st * mdctx, int sigclass, int sigver);
-cdk_error_t cdk_sklist_write_onepass (cdk_keylist_t skl, cdk_stream_t outp,
-                                     int sigclass, int mdalgo);
+  cdk_error_t cdk_sklist_build (cdk_keylist_t * ret_skl,
+                               cdk_keydb_hd_t db, cdk_ctx_t hd,
+                               cdk_strlist_t locusr,
+                               int unlock, unsigned int use);
+  void cdk_sklist_release (cdk_keylist_t skl);
+  cdk_error_t cdk_sklist_write (cdk_keylist_t skl, cdk_stream_t outp,
+                               digest_hd_st * mdctx, int sigclass,
+                               int sigver);
+  cdk_error_t cdk_sklist_write_onepass (cdk_keylist_t skl, cdk_stream_t outp,
+                                       int sigclass, int mdalgo);
 
 /* Encrypt the given stream @INP with the recipients given in @REMUSR.
    If @REMUSR is NULL, symmetric encryption will be used. The output
    will be written to @OUT. */
-cdk_error_t cdk_stream_encrypt (cdk_ctx_t hd, cdk_strlist_t remusr,
-                               cdk_stream_t inp, cdk_stream_t out);
+  cdk_error_t cdk_stream_encrypt (cdk_ctx_t hd, cdk_strlist_t remusr,
+                                 cdk_stream_t inp, cdk_stream_t out);
 
 /* Decrypt the @INP stream into @OUT. */
-cdk_error_t cdk_stream_decrypt (cdk_ctx_t hd, cdk_stream_t inp,
-                               cdk_stream_t out);
+  cdk_error_t cdk_stream_decrypt (cdk_ctx_t hd, cdk_stream_t inp,
+                                 cdk_stream_t out);
 
 /* Same as the function above but it works on files. */
-cdk_error_t cdk_file_encrypt (cdk_ctx_t hd, cdk_strlist_t remusr,
-                             const char *file, const char *output);
-cdk_error_t cdk_file_decrypt (cdk_ctx_t hd, const char *file,
-                             const char *output);
+  cdk_error_t cdk_file_encrypt (cdk_ctx_t hd, cdk_strlist_t remusr,
+                               const char *file, const char *output);
+  cdk_error_t cdk_file_decrypt (cdk_ctx_t hd, const char *file,
+                               const char *output);
 
 /* Generic function to transform data. The mode can be either sign,
    verify, encrypt, decrypt, import or export. The meanings of the
    parameters are similar to the functions above.
    @OUTBUF will contain the output and @OUTSIZE the length of it. */
-cdk_error_t cdk_data_transform (cdk_ctx_t hd, enum cdk_crypto_mode_t mode,
-                               cdk_strlist_t locusr, cdk_strlist_t remusr,
-                               const void *inbuf, size_t insize,
-                               unsigned char **outbuf, size_t * outsize,
-                               int modval);
+  cdk_error_t cdk_data_transform (cdk_ctx_t hd, enum cdk_crypto_mode_t mode,
+                                 cdk_strlist_t locusr, cdk_strlist_t remusr,
+                                 const void *inbuf, size_t insize,
+                                 unsigned char **outbuf, size_t * outsize,
+                                 int modval);
 
 /* Sign the stream @INP. Optionally, the output will be encrypted
    if @REMUSR is not NULL and the @ENCRYPTFLAG is set.
    The output will be written to @OUT.
    @LOCUSR contains one ore more pattern for the secret key(s) to use. */
-cdk_error_t cdk_stream_sign (cdk_ctx_t hd, cdk_stream_t inp, cdk_stream_t out,
-                            cdk_strlist_t locusr, cdk_strlist_t remusr,
-                            int encryptflag, int sigmode);
+  cdk_error_t cdk_stream_sign (cdk_ctx_t hd, cdk_stream_t inp,
+                              cdk_stream_t out, cdk_strlist_t locusr,
+                              cdk_strlist_t remusr, int encryptflag,
+                              int sigmode);
 
 /* Same as the function above but it works on files. */
-cdk_error_t cdk_file_sign (cdk_ctx_t hd, cdk_strlist_t locusr,
-                          cdk_strlist_t remusr,
-                          const char *file, const char *output,
-                          int sigmode, int encryptflag);
+  cdk_error_t cdk_file_sign (cdk_ctx_t hd, cdk_strlist_t locusr,
+                            cdk_strlist_t remusr,
+                            const char *file, const char *output,
+                            int sigmode, int encryptflag);
 
-cdk_error_t cdk_stream_verify (cdk_ctx_t hd, cdk_stream_t inp,
-                              cdk_stream_t data, cdk_stream_t out);
+  cdk_error_t cdk_stream_verify (cdk_ctx_t hd, cdk_stream_t inp,
+                                cdk_stream_t data, cdk_stream_t out);
 
 /* Verify the given file @FILE. For a detached signature, @DATA_FILE
    contains the actual file data and @FILE is only the signature.
    If the @OUTPUT is not NULL, the plaintext will be written to this file. */
-cdk_error_t cdk_file_verify (cdk_ctx_t hd, const char *file,
-                            const char *data_file, const char *output);
-
-int cdk_trustdb_get_validity (cdk_stream_t inp, cdk_pkt_userid_t id,
-                             int *r_val);
-int cdk_trustdb_get_ownertrust (cdk_stream_t inp, cdk_pubkey_t pk,
-                               int *r_val, int *r_flags);
-
-void cdk_strlist_free (cdk_strlist_t sl);
-cdk_strlist_t cdk_strlist_add (cdk_strlist_t * list, const char *string);
-cdk_strlist_t cdk_strlist_next (cdk_strlist_t root, const char **r_str);
-const char *cdk_check_version (const char *req_version);
+  cdk_error_t cdk_file_verify (cdk_ctx_t hd, const char *file,
+                              const char *data_file, const char *output);
+
+  int cdk_trustdb_get_validity (cdk_stream_t inp, cdk_pkt_userid_t id,
+                               int *r_val);
+  int cdk_trustdb_get_ownertrust (cdk_stream_t inp, cdk_pubkey_t pk,
+                                 int *r_val, int *r_flags);
+
+  void cdk_strlist_free (cdk_strlist_t sl);
+  cdk_strlist_t cdk_strlist_add (cdk_strlist_t * list, const char *string);
+  cdk_strlist_t cdk_strlist_next (cdk_strlist_t root, const char **r_str);
+  const char *cdk_check_version (const char *req_version);
 /* UTF8 */
-char *cdk_utf8_encode (const char *string);
-char *cdk_utf8_decode (const char *string, size_t length, int delim);
+  char *cdk_utf8_encode (const char *string);
+  char *cdk_utf8_decode (const char *string, size_t length, int delim);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* OPENCDK_H */
+#endif                         /* OPENCDK_H */
diff --git a/lib/opencdk/packet.h b/lib/opencdk/packet.h
index 9120b22..aca38e0 100644
--- a/lib/opencdk/packet.h
+++ b/lib/opencdk/packet.h
@@ -25,7 +25,7 @@
 #ifndef CDK_PACKET_H
 #define CDK_PACKET_H
 
-struct cdk_kbnode_s 
+struct cdk_kbnode_s
 {
   struct cdk_kbnode_s *next;
   cdk_packet_t pkt;
@@ -34,15 +34,16 @@ struct cdk_kbnode_s
 };
 
 /*-- new-packet.c --*/
-void _cdk_free_mpibuf (size_t n, bigint_t *array);
+void _cdk_free_mpibuf (size_t n, bigint_t * array);
 void _cdk_free_userid (cdk_pkt_userid_t uid);
-void _cdk_free_signature( cdk_pkt_signature_t sig );
-cdk_prefitem_t _cdk_copy_prefs( const cdk_prefitem_t prefs );
-cdk_error_t _cdk_copy_userid( cdk_pkt_userid_t *dst, cdk_pkt_userid_t src );
-cdk_error_t _cdk_copy_pubkey( cdk_pkt_pubkey_t* dst, cdk_pkt_pubkey_t src );
-cdk_error_t _cdk_copy_seckey( cdk_pkt_seckey_t* dst, cdk_pkt_seckey_t src );
-cdk_error_t _cdk_copy_pk_to_sk( cdk_pkt_pubkey_t pk, cdk_pkt_seckey_t sk );
-cdk_error_t _cdk_copy_signature( cdk_pkt_signature_t* dst, cdk_pkt_signature_t 
src );
-cdk_error_t _cdk_pubkey_compare( cdk_pkt_pubkey_t a, cdk_pkt_pubkey_t b );
+void _cdk_free_signature (cdk_pkt_signature_t sig);
+cdk_prefitem_t _cdk_copy_prefs (const cdk_prefitem_t prefs);
+cdk_error_t _cdk_copy_userid (cdk_pkt_userid_t * dst, cdk_pkt_userid_t src);
+cdk_error_t _cdk_copy_pubkey (cdk_pkt_pubkey_t * dst, cdk_pkt_pubkey_t src);
+cdk_error_t _cdk_copy_seckey (cdk_pkt_seckey_t * dst, cdk_pkt_seckey_t src);
+cdk_error_t _cdk_copy_pk_to_sk (cdk_pkt_pubkey_t pk, cdk_pkt_seckey_t sk);
+cdk_error_t _cdk_copy_signature (cdk_pkt_signature_t * dst,
+                                cdk_pkt_signature_t src);
+cdk_error_t _cdk_pubkey_compare (cdk_pkt_pubkey_t a, cdk_pkt_pubkey_t b);
 
 #endif /* CDK_PACKET_H */
diff --git a/lib/opencdk/stream.h b/lib/opencdk/stream.h
index f7883c5..491e330 100644
--- a/lib/opencdk/stream.h
+++ b/lib/opencdk/stream.h
@@ -28,27 +28,30 @@
 /* The default buffer size for the stream. */
 #define STREAM_BUFSIZE 8192
 
-enum {
-    fDUMMY   = 0,
-    fARMOR   = 1,
-    fCIPHER  = 2,
-    fLITERAL = 3,
-    fCOMPRESS= 4,
-    fHASH    = 5,
-    fTEXT    = 6
+enum
+{
+  fDUMMY = 0,
+  fARMOR = 1,
+  fCIPHER = 2,
+  fLITERAL = 3,
+  fCOMPRESS = 4,
+  fHASH = 5,
+  fTEXT = 6
 };
 
 /* Type definition for the filter function. */
-typedef cdk_error_t (*filter_fnct_t) (void * opaque, int ctl, FILE * in, FILE 
* out);
+typedef cdk_error_t (*filter_fnct_t) (void *opaque, int ctl, FILE * in,
+                                     FILE * out);
 
 /* The stream filter context structure. */
-struct stream_filter_s 
+struct stream_filter_s
 {
   struct stream_filter_s *next;
   filter_fnct_t fnct;
   void *opaque;
   FILE *tmp;
-  union {
+  union
+  {
     armor_filter_t afx;
     cipher_filter_t cfx;
     literal_filter_t pfx;
@@ -56,7 +59,8 @@ struct stream_filter_s
     text_filter_t tfx;
     md_filter_t mfx;
   } u;
-  struct {
+  struct
+  {
     unsigned enabled:1;
     unsigned rdonly:1;
     unsigned error:1;
@@ -67,12 +71,14 @@ struct stream_filter_s
 
 
 /* The stream context structure. */
-struct cdk_stream_s {
+struct cdk_stream_s
+{
   struct stream_filter_s *filters;
   int fmode;
   int error;
   size_t blkmode;
-  struct {
+  struct
+  {
     unsigned filtrated:1;
     unsigned eof:1;
     unsigned write:1;
@@ -81,7 +87,8 @@ struct cdk_stream_s {
     unsigned no_filter:1;
     unsigned compressed:3;
   } flags;
-  struct {
+  struct
+  {
     unsigned char *buf;
     unsigned on:1;
     size_t size;
diff --git a/lib/opencdk/types.h b/lib/opencdk/types.h
index 5a225d9..88dc0e2 100644
--- a/lib/opencdk/types.h
+++ b/lib/opencdk/types.h
@@ -27,19 +27,19 @@
 
 #ifndef HAVE_BYTE_TYPEDEF
 # undef byte
-  typedef unsigned char byte;
+typedef unsigned char byte;
 # define HAVE_BYTE_TYPEDEF
 #endif
 
 #ifndef HAVE_U16_TYPEDEF
 # undef u16
-  typedef unsigned short u16;
+typedef unsigned short u16;
 # define HAVE_U16_TYPEDEF
 #endif
 
 #ifndef HAVE_U32_TYPEDEF
 # undef u32
-  typedef unsigned int u32;
+typedef unsigned int u32;
 # define HAVE_U32_TYPEDEF
 #endif
 
diff --git a/lib/openpgp/gnutls_openpgp.h b/lib/openpgp/gnutls_openpgp.h
index 9f23f36..36ab853 100644
--- a/lib/openpgp/gnutls_openpgp.h
+++ b/lib/openpgp/gnutls_openpgp.h
@@ -25,7 +25,8 @@ int gnutls_openpgp_get_key (gnutls_datum_t * key,
 
 /* internal */
 int _gnutls_openpgp_raw_crt_to_gcert (gnutls_cert * cert,
-                                     const gnutls_datum_t * raw, const 
gnutls_openpgp_keyid_t);
+                                     const gnutls_datum_t * raw,
+                                     const gnutls_openpgp_keyid_t);
 
 int
 _gnutls_openpgp_raw_privkey_to_gkey (gnutls_privkey * pkey,
diff --git a/lib/openpgp/openpgp_int.h b/lib/openpgp/openpgp_int.h
index 96b2a78..d5eb139 100644
--- a/lib/openpgp/openpgp_int.h
+++ b/lib/openpgp/openpgp_int.h
@@ -39,34 +39,38 @@ typedef struct gnutls_openpgp_keyring_int
 int _gnutls_map_cdk_rc (int rc);
 
 int _gnutls_openpgp_export (cdk_kbnode_t node,
-                              gnutls_openpgp_crt_fmt_t format,
-                              void *output_data, size_t * output_data_size, 
int private);
+                           gnutls_openpgp_crt_fmt_t format,
+                           void *output_data, size_t * output_data_size,
+                           int private);
 
 int _gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert,
                                  gnutls_openpgp_crt_t cert);
 int _gnutls_openpgp_privkey_to_gkey (gnutls_privkey * dest,
                                     gnutls_openpgp_privkey_t src);
 
-cdk_packet_t _gnutls_get_valid_subkey(cdk_kbnode_t knode, int key_type);
+cdk_packet_t _gnutls_get_valid_subkey (cdk_kbnode_t knode, int key_type);
 
-unsigned int _gnutls_get_pgp_key_usage(unsigned int pgp_usage);
+unsigned int _gnutls_get_pgp_key_usage (unsigned int pgp_usage);
 
 int
 _gnutls_openpgp_crt_get_mpis (gnutls_openpgp_crt_t cert, uint32_t keyid[2],
-                          bigint_t * params, int *params_size);
+                             bigint_t * params, int *params_size);
 
 int
-_gnutls_openpgp_privkey_get_mpis (gnutls_openpgp_privkey_t pkey, uint32_t 
keyid[2],
-                          bigint_t * params, int *params_size);
+_gnutls_openpgp_privkey_get_mpis (gnutls_openpgp_privkey_t pkey,
+                                 uint32_t keyid[2], bigint_t * params,
+                                 int *params_size);
 
-cdk_packet_t _gnutls_openpgp_find_key( cdk_kbnode_t knode, uint32_t keyid[2], 
unsigned int priv);
+cdk_packet_t _gnutls_openpgp_find_key (cdk_kbnode_t knode, uint32_t keyid[2],
+                                      unsigned int priv);
 
-int _gnutls_read_pgp_mpi( cdk_packet_t pkt, unsigned int priv, size_t idx, 
bigint_t* m);
+int _gnutls_read_pgp_mpi (cdk_packet_t pkt, unsigned int priv, size_t idx,
+                         bigint_t * m);
 
-int _gnutls_openpgp_find_subkey_idx( cdk_kbnode_t knode, uint32_t keyid[2], 
-  unsigned int priv);
+int _gnutls_openpgp_find_subkey_idx (cdk_kbnode_t knode, uint32_t keyid[2],
+                                    unsigned int priv);
 
-int _gnutls_openpgp_get_algo( int cdk_algo);
+int _gnutls_openpgp_get_algo (int cdk_algo);
 
 #endif /* ENABLE_OPENPGP */
 
diff --git a/lib/x509/pbkdf2-sha1.h b/lib/x509/pbkdf2-sha1.h
index 55d6e7a..5f47c7f 100644
--- a/lib/x509/pbkdf2-sha1.h
+++ b/lib/x509/pbkdf2-sha1.h
@@ -1,4 +1,3 @@
 int _gnutls_pbkdf2_sha1 (const char *P, size_t Plen,
-               const char *S, size_t Slen,
-               unsigned int c,
-               char *DK, size_t dkLen);
+                        const char *S, size_t Slen,
+                        unsigned int c, char *DK, size_t dkLen);
diff --git a/lib/x509/x509_int.h b/lib/x509/x509_int.h
index cc734c6..68c2da0 100644
--- a/lib/x509/x509_int.h
+++ b/lib/x509/x509_int.h
@@ -71,7 +71,7 @@ typedef struct gnutls_pkcs7_int
   ASN1_TYPE pkcs7;
 } gnutls_pkcs7_int;
 
-#define MAX_PRIV_PARAMS_SIZE GNUTLS_MAX_PK_PARAMS /* ok for RSA and DSA */
+#define MAX_PRIV_PARAMS_SIZE GNUTLS_MAX_PK_PARAMS      /* ok for RSA and DSA */
 
 /* parameters should not be larger than this limit */
 #define DSA_PRIVATE_PARAMS 5
@@ -176,18 +176,18 @@ int _gnutls_x509_get_dn_oid (ASN1_TYPE asn1_struct,
                             int indx, void *_oid, size_t * sizeof_oid);
 
 int _gnutls_parse_general_name (ASN1_TYPE src, const char *src_name,
-       int seq, void *name, size_t * name_size,
-        unsigned int *ret_type, int othername_oid);
-                                        
+                               int seq, void *name, size_t * name_size,
+                               unsigned int *ret_type, int othername_oid);
+
 /* dsa.c */
 
 
 /* verify.c */
 int gnutls_x509_crt_is_issuer (gnutls_x509_crt_t cert,
                               gnutls_x509_crt_t issuer);
-int _gnutls_x509_verify_algorithm(gnutls_mac_algorithm_t *hash,
-                                 const gnutls_datum_t * signature,
-                                 const gnutls_x509_crt_t crt);
+int _gnutls_x509_verify_algorithm (gnutls_mac_algorithm_t * hash,
+                                  const gnutls_datum_t * signature,
+                                  const gnutls_x509_crt_t crt);
 int _gnutls_x509_verify_signature (const gnutls_datum_t * tbs,
                                   const gnutls_datum_t * hash,
                                   const gnutls_datum_t * signature,
@@ -197,22 +197,25 @@ int _gnutls_x509_privkey_verify_signature (const 
gnutls_datum_t * tbs,
                                           gnutls_x509_privkey_t issuer);
 
 /* privkey.h */
-ASN1_TYPE _gnutls_privkey_decode_pkcs1_rsa_key (const gnutls_datum_t *raw_key,
+ASN1_TYPE _gnutls_privkey_decode_pkcs1_rsa_key (const gnutls_datum_t *
+                                               raw_key,
                                                gnutls_x509_privkey_t pkey);
 int _gnutls_asn1_encode_dsa (ASN1_TYPE * c2, bigint_t * params);
 
 /* extensions.c */
 int _gnutls_x509_crl_get_extension (gnutls_x509_crl_t crl,
-                               const char *extension_id, int indx,
-                               gnutls_datum_t * ret, unsigned int *_critical);
+                                   const char *extension_id, int indx,
+                                   gnutls_datum_t * ret,
+                                   unsigned int *_critical);
 
 int _gnutls_x509_crl_get_extension_oid (gnutls_x509_crl_t crl,
-                                   int indx, void *oid, size_t * sizeof_oid);
+                                       int indx, void *oid,
+                                       size_t * sizeof_oid);
 
 int _gnutls_x509_crl_set_extension (gnutls_x509_crl_t crl,
-                               const char *ext_id,
-                               const gnutls_datum_t * ext_data,
-                               unsigned int critical);
+                                   const char *ext_id,
+                                   const gnutls_datum_t * ext_data,
+                                   unsigned int critical);
 
 int _gnutls_x509_crt_get_extension (gnutls_x509_crt_t cert,
                                    const char *extension_id, int indx,
@@ -233,25 +236,27 @@ int _gnutls_x509_crt_set_extension (gnutls_x509_crt_t 
cert,
                                    unsigned int critical);
 
 int
-_gnutls_x509_ext_extract_number (opaque *number,
-                                          size_t* nr_size,
-                                          opaque * extnValue,
-                                          int extnValueLen);
+_gnutls_x509_ext_extract_number (opaque * number,
+                                size_t * nr_size,
+                                opaque * extnValue, int extnValueLen);
 int
-_gnutls_x509_ext_gen_number (const opaque* nuber, size_t nr_size, 
gnutls_datum_t * der_ext);
+_gnutls_x509_ext_gen_number (const opaque * nuber, size_t nr_size,
+                            gnutls_datum_t * der_ext);
 
 
 int _gnutls_x509_ext_gen_basicConstraints (int CA, int pathLenConstraint,
                                           gnutls_datum_t * der_ext);
 int _gnutls_x509_ext_gen_keyUsage (uint16_t usage, gnutls_datum_t * der_ext);
 int _gnutls_x509_ext_gen_subject_alt_name (gnutls_x509_subject_alt_name_t
-                                      type, const void* data, unsigned int 
data_size,
-                                      gnutls_datum_t* prev_der_ext, 
gnutls_datum_t * der_ext);
-int
-_gnutls_x509_ext_gen_crl_dist_points (gnutls_x509_subject_alt_name_t
-                                     type, const void *data, unsigned int 
data_size,
-                                     unsigned int reason_flags,
-                                     gnutls_datum_t * der_ext);
+                                          type, const void *data,
+                                          unsigned int data_size,
+                                          gnutls_datum_t * prev_der_ext,
+                                          gnutls_datum_t * der_ext);
+int _gnutls_x509_ext_gen_crl_dist_points (gnutls_x509_subject_alt_name_t type,
+                                         const void *data,
+                                         unsigned int data_size,
+                                         unsigned int reason_flags,
+                                         gnutls_datum_t * der_ext);
 int _gnutls_x509_ext_gen_key_id (const void *id, size_t id_size,
                                 gnutls_datum_t * der_data);
 int _gnutls_x509_ext_gen_auth_key_id (const void *id, size_t id_size,
@@ -259,7 +264,7 @@ int _gnutls_x509_ext_gen_auth_key_id (const void *id, 
size_t id_size,
 int _gnutls_x509_ext_extract_proxyCertInfo (int *pathLenConstraint,
                                            char **policyLanguage,
                                            char **policy,
-                                           size_t *sizeof_policy,
+                                           size_t * sizeof_policy,
                                            opaque * extnValue,
                                            int extnValueLen);
 int _gnutls_x509_ext_gen_proxyCertInfo (int pathLenConstraint,
@@ -270,13 +275,16 @@ int _gnutls_x509_ext_gen_proxyCertInfo (int 
pathLenConstraint,
 
 /* mpi.c */
 int _gnutls_x509_crq_get_mpis (gnutls_x509_crq_t cert,
-                           bigint_t * params, int *params_size);
-                           
+                              bigint_t * params, int *params_size);
+
 int _gnutls_x509_crt_get_mpis (gnutls_x509_crt_t cert,
                               bigint_t * params, int *params_size);
-int _gnutls_x509_read_rsa_params (opaque * der, int dersize, bigint_t * 
params);
-int _gnutls_x509_read_dsa_pubkey (opaque * der, int dersize, bigint_t * 
params);
-int _gnutls_x509_read_dsa_params (opaque * der, int dersize, bigint_t * 
params);
+int _gnutls_x509_read_rsa_params (opaque * der, int dersize,
+                                 bigint_t * params);
+int _gnutls_x509_read_dsa_pubkey (opaque * der, int dersize,
+                                 bigint_t * params);
+int _gnutls_x509_read_dsa_params (opaque * der, int dersize,
+                                 bigint_t * params);
 
 int _gnutls_x509_write_rsa_params (bigint_t * params, int params_size,
                                   gnutls_datum_t * der);
@@ -288,7 +296,7 @@ int _gnutls_x509_write_dsa_public_key (bigint_t * params, 
int params_size,
 int _gnutls_x509_read_uint (ASN1_TYPE node, const char *value,
                            unsigned int *ret);
 
-int _gnutls_x509_read_der_int  (opaque * der, int dersize, bigint_t* out);
+int _gnutls_x509_read_der_int (opaque * der, int dersize, bigint_t * out);
 
 int _gnutls_x509_read_int (ASN1_TYPE node, const char *value,
                           bigint_t * ret_mpi);
@@ -299,8 +307,8 @@ int _gnutls_x509_write_uint32 (ASN1_TYPE node, const char 
*value,
 
 int _gnutls_x509_write_sig_params (ASN1_TYPE dst, const char *dst_name,
                                   gnutls_pk_algorithm_t pk_algorithm,
-                                  gnutls_digest_algorithm_t, bigint_t * params,
-                                  int params_size);
+                                  gnutls_digest_algorithm_t,
+                                  bigint_t * params, int params_size);
 /* pkcs12.h */
 #include <gnutls/pkcs12.h>
 
@@ -343,26 +351,26 @@ typedef struct gnutls_pkcs12_bag_int
 
 int
 _gnutls_pkcs12_string_to_key (unsigned int id, const opaque * salt,
-                      unsigned int salt_size, unsigned int iter,
-                      const char *pw, unsigned int req_keylen,
-                      opaque * keybuf);
+                             unsigned int salt_size, unsigned int iter,
+                             const char *pw, unsigned int req_keylen,
+                             opaque * keybuf);
 
 int _gnutls_pkcs7_decrypt_data (const gnutls_datum_t * data,
                                const char *password, gnutls_datum_t * dec);
 
 typedef enum schema_id
-  {
-    PBES2_GENERIC, /* when the algorithm is unknown, temporal use when reading 
only */
-    PBES2_3DES,                        /* the stuff in PKCS #5 */
-    PBES2_AES_128,
-    PBES2_AES_192,
-    PBES2_AES_256,
-    PKCS12_3DES_SHA1,          /* the stuff in PKCS #12 */
-    PKCS12_ARCFOUR_SHA1,
-    PKCS12_RC2_40_SHA1
-  } schema_id;
-
-int _gnutls_pkcs_flags_to_schema(unsigned int flags);
+{
+  PBES2_GENERIC,               /* when the algorithm is unknown, temporal use 
when reading only */
+  PBES2_3DES,                  /* the stuff in PKCS #5 */
+  PBES2_AES_128,
+  PBES2_AES_192,
+  PBES2_AES_256,
+  PKCS12_3DES_SHA1,            /* the stuff in PKCS #12 */
+  PKCS12_ARCFOUR_SHA1,
+  PKCS12_RC2_40_SHA1
+} schema_id;
+
+int _gnutls_pkcs_flags_to_schema (unsigned int flags);
 int _gnutls_pkcs7_encrypt_data (schema_id schema,
                                const gnutls_datum_t * data,
                                const char *password, gnutls_datum_t * enc);
@@ -380,8 +388,8 @@ int _pkcs12_encode_crt_bag (gnutls_pkcs12_bag_type_t type,
 
 /* crq */
 int _gnutls_x509_crq_set_extension (gnutls_x509_crq_t crq,
-                               const char *ext_id,
-                               const gnutls_datum_t * ext_data,
-                               unsigned int critical);
+                                   const char *ext_id,
+                                   const gnutls_datum_t * ext_data,
+                                   unsigned int critical);
 
 #endif
diff --git a/libextra/includes/gnutls/extra.h b/libextra/includes/gnutls/extra.h
index f43d324..2b2c196 100644
--- a/libextra/includes/gnutls/extra.h
+++ b/libextra/includes/gnutls/extra.h
@@ -51,11 +51,11 @@ extern "C"
    * Enumeration of different certificate encoding formats.
    */
   typedef enum
-    {
-      GNUTLS_IA_APPLICATION_PAYLOAD = 0,
-      GNUTLS_IA_INTERMEDIATE_PHASE_FINISHED = 1,
-      GNUTLS_IA_FINAL_PHASE_FINISHED = 2
-    } gnutls_ia_apptype_t;
+  {
+    GNUTLS_IA_APPLICATION_PAYLOAD = 0,
+    GNUTLS_IA_INTERMEDIATE_PHASE_FINISHED = 1,
+    GNUTLS_IA_FINAL_PHASE_FINISHED = 2
+  } gnutls_ia_apptype_t;
 
   /* TLS/IA credential
    */
@@ -89,8 +89,8 @@ extern "C"
   extern void
     gnutls_ia_set_client_avp_ptr (gnutls_ia_client_credentials_t cred,
                                  void *ptr);
-  extern void *
-  gnutls_ia_get_client_avp_ptr (gnutls_ia_client_credentials_t cred);
+  extern void *gnutls_ia_get_client_avp_ptr (gnutls_ia_client_credentials_t
+                                            cred);
 
   /* Server TLS/IA credential functions. */
   extern void
@@ -99,8 +99,8 @@ extern "C"
   extern void
     gnutls_ia_set_server_avp_ptr (gnutls_ia_server_credentials_t cred,
                                  void *ptr);
-  extern void *
-  gnutls_ia_get_server_avp_ptr (gnutls_ia_server_credentials_t cred);
+  extern void *gnutls_ia_get_server_avp_ptr (gnutls_ia_server_credentials_t
+                                            cred);
 
   /* TLS/IA handshake. */
   extern int gnutls_ia_handshake_p (gnutls_session_t session);
@@ -112,8 +112,7 @@ extern "C"
     gnutls_ia_permute_inner_secret (gnutls_session_t session,
                                    size_t session_keys_size,
                                    const char *session_keys);
-  extern int gnutls_ia_endphase_send (gnutls_session_t session,
-                                     int final_p);
+  extern int gnutls_ia_endphase_send (gnutls_session_t session, int final_p);
 
   extern int gnutls_ia_verify_endphase (gnutls_session_t session,
                                        const char *checksum);
@@ -125,8 +124,7 @@ extern "C"
 
   /* Utility stuff. */
   extern int gnutls_ia_generate_challenge (gnutls_session_t session,
-                                          size_t buffer_size,
-                                          char *buffer);
+                                          size_t buffer_size, char *buffer);
   extern void gnutls_ia_extract_inner_secret (gnutls_session_t session,
                                              char *buffer);
 
diff --git a/libextra/includes/gnutls/openssl.h 
b/libextra/includes/gnutls/openssl.h
index 668fa82..1e67c7c 100644
--- a/libextra/includes/gnutls/openssl.h
+++ b/libextra/includes/gnutls/openssl.h
@@ -169,8 +169,9 @@ extern "C"
 
 #define rbio gnutls_state
 
-  typedef struct {
-    void* handle;
+  typedef struct
+  {
+    void *handle;
   } MD_CTX;
 
   struct rsa_st;
diff --git a/src/certtool-cfg.h b/src/certtool-cfg.h
index b4deb1e..e44183b 100644
--- a/src/certtool-cfg.h
+++ b/src/certtool-cfg.h
@@ -31,7 +31,7 @@ int get_days (void);
 int get_ca_status (void);
 int get_crl_number (void);
 int get_path_len (void);
-int get_crq_extensions_status(void);
+int get_crq_extensions_status (void);
 const char *get_pkcs12_key_name (void);
 int get_tls_client_status (void);
 int get_tls_server_status (void);
@@ -43,9 +43,9 @@ int get_crl_sign_status (void);
 int get_cert_sign_status (void);
 int get_encrypt_status (int server);
 int get_sign_status (int server);
-void get_ip_addr_set (int type, void* crt);
-void get_dns_name_set (int type, void* crt);
-void get_email_set (int type, void* crt);
+void get_ip_addr_set (int type, void *crt);
+void get_dns_name_set (int type, void *crt);
+void get_email_set (int type, void *crt);
 
 
 void get_cn_crq_set (gnutls_x509_crq_t crq);
@@ -56,4 +56,4 @@ void get_unit_crq_set (gnutls_x509_crq_t crq);
 void get_organization_crq_set (gnutls_x509_crq_t crq);
 void get_country_crq_set (gnutls_x509_crq_t crq);
 void get_oid_crq_set (gnutls_x509_crq_t crq);
-const char *get_proxy_policy (char **policy, size_t *policylen);
+const char *get_proxy_policy (char **policy, size_t * policylen);
diff --git a/src/certtool-common.h b/src/certtool-common.h
index be2145c..cb2e9ab 100644
--- a/src/certtool-common.h
+++ b/src/certtool-common.h
@@ -1,30 +1,31 @@
-enum {
-    ACTION_SELF_SIGNED,
-    ACTION_GENERATE_PRIVKEY,
-    ACTION_CERT_INFO,
-    ACTION_GENERATE_REQUEST,
-    ACTION_GENERATE_CERTIFICATE,
-    ACTION_VERIFY_CHAIN,
-    ACTION_PRIVKEY_INFO,
-    ACTION_UPDATE_CERTIFICATE,
-    ACTION_TO_PKCS12,
-    ACTION_PKCS12_INFO,
-    ACTION_GENERATE_DH,
-    ACTION_GET_DH,
-    ACTION_CRL_INFO,
-    ACTION_P7_INFO,
-    ACTION_GENERATE_CRL,
-    ACTION_VERIFY_CRL,
-    ACTION_SMIME_TO_P7,
-    ACTION_GENERATE_PROXY,
-    ACTION_GENERATE_PKCS8,
-    ACTION_PGP_INFO,
-    ACTION_PGP_PRIVKEY_INFO,
-    ACTION_RING_INFO,
-    ACTION_REQUEST
+enum
+{
+  ACTION_SELF_SIGNED,
+  ACTION_GENERATE_PRIVKEY,
+  ACTION_CERT_INFO,
+  ACTION_GENERATE_REQUEST,
+  ACTION_GENERATE_CERTIFICATE,
+  ACTION_VERIFY_CHAIN,
+  ACTION_PRIVKEY_INFO,
+  ACTION_UPDATE_CERTIFICATE,
+  ACTION_TO_PKCS12,
+  ACTION_PKCS12_INFO,
+  ACTION_GENERATE_DH,
+  ACTION_GET_DH,
+  ACTION_CRL_INFO,
+  ACTION_P7_INFO,
+  ACTION_GENERATE_CRL,
+  ACTION_VERIFY_CRL,
+  ACTION_SMIME_TO_P7,
+  ACTION_GENERATE_PROXY,
+  ACTION_GENERATE_PKCS8,
+  ACTION_PGP_INFO,
+  ACTION_PGP_PRIVKEY_INFO,
+  ACTION_RING_INFO,
+  ACTION_REQUEST
 };
 
 #define TYPE_CRT 1
 #define TYPE_CRQ 2
 
-void certtool_version(void);
+void certtool_version (void);
diff --git a/src/common.h b/src/common.h
index d209655..29a68a5 100644
--- a/src/common.h
+++ b/src/common.h
@@ -27,7 +27,8 @@
 extern const char str_unknown[];
 
 int print_info (gnutls_session_t state, const char *hostname, int insecure);
-void print_cert_info (gnutls_session_t state, const char *hostname, int 
insecure);
+void print_cert_info (gnutls_session_t state, const char *hostname,
+                     int insecure);
 void print_list (int verbose);
 
 void parse_comp (char **comp, int ncomp, int *comp_priority);


hooks/post-receive
-- 
GNU gnutls




reply via email to

[Prev in Thread] Current Thread [Next in Thread]