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_3_0_13-91-gf6f9d92


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_13-91-gf6f9d92
Date: Fri, 02 Mar 2012 12:40:07 +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=f6f9d925145ef58a37b9bfb129068eaf7687c4e4

The branch, master has been updated
       via  f6f9d925145ef58a37b9bfb129068eaf7687c4e4 (commit)
       via  14ae51ce07e86a474d5a9c62bcbf19fed83aef5d (commit)
      from  419ad44e36f4e087190943ff72e711fc00042dd9 (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 f6f9d925145ef58a37b9bfb129068eaf7687c4e4
Author: Simon Josefsson <address@hidden>
Date:   Fri Mar 2 13:39:53 2012 +0100

    Doc fixes for GTK-DOC.

commit 14ae51ce07e86a474d5a9c62bcbf19fed83aef5d
Author: Simon Josefsson <address@hidden>
Date:   Fri Mar 2 13:18:18 2012 +0100

    De-inline some dtls functions.
    
    Avoids compiler error on gcc 4.4.5 (Debian Squeeze) that complains about
    "call is unlikely and code size would grow".

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

Summary of changes:
 lib/gnutls_dtls.c               |   30 ++++++++++++++++--
 lib/gnutls_dtls.h               |   22 ++-----------
 lib/includes/gnutls/gnutls.h.in |   64 ++++++++++++++++++++------------------
 lib/includes/gnutls/ocsp.h      |    6 ++--
 lib/verify-tofu.c               |    8 ++--
 5 files changed, 70 insertions(+), 60 deletions(-)

diff --git a/lib/gnutls_dtls.c b/lib/gnutls_dtls.c
index 93ba467..f07b300 100644
--- a/lib/gnutls_dtls.c
+++ b/lib/gnutls_dtls.c
@@ -36,6 +36,28 @@
 #include <gnutls/dtls.h>
 #include <timespec.h>
 
+/* returns a-b in ms */
+unsigned int
+_dtls_timespec_sub_ms (struct timespec *a, struct timespec *b)
+{
+  return (a->tv_sec * 1000 + a->tv_nsec / (1000 * 1000) -
+          (b->tv_sec * 1000 + b->tv_nsec / (1000 * 1000)));
+}
+
+void
+_dtls_async_timer_delete (gnutls_session_t session)
+{
+  if (session->internals.dtls.async_term != 0)
+    {
+      _gnutls_dtls_log ("DTLS[%p]: Deinitializing previous handshake 
state.\n", session);
+      session->internals.dtls.async_term = 0; /* turn off "timer" */
+
+      _dtls_reset_hsk_state(session);
+      _gnutls_handshake_io_buffer_clear (session);
+      _gnutls_epoch_gc(session);
+    }
+}
+
 /* This function fragments and transmits a previously buffered
  * outgoing message. It accepts mtu_data which is a buffer to
  * be reused (should be set to NULL initially).
@@ -233,7 +255,7 @@ unsigned int timeout;
             {
               /* if no retransmission is required yet just return 
                */
-              if (timespec_sub_ms(&now, 
&session->internals.dtls.last_retransmit) < TIMER_WINDOW)
+              if (_dtls_timespec_sub_ms(&now, 
&session->internals.dtls.last_retransmit) < TIMER_WINDOW)
                 {
                   gnutls_assert();
                   goto nb_timeout;
@@ -264,7 +286,7 @@ unsigned int timeout;
     {
       timeout = TIMER_WINDOW;
 
-      diff = timespec_sub_ms(&now, 
&session->internals.dtls.handshake_start_time);
+      diff = _dtls_timespec_sub_ms(&now, 
&session->internals.dtls.handshake_start_time);
       if (diff >= session->internals.dtls.total_timeout_ms) 
         {
           _gnutls_dtls_log("Session timeout: %u ms\n", diff);
@@ -272,7 +294,7 @@ unsigned int timeout;
           goto end_flight;
         }
 
-      diff = timespec_sub_ms(&now, &session->internals.dtls.last_retransmit);
+      diff = _dtls_timespec_sub_ms(&now, 
&session->internals.dtls.last_retransmit);
       if (session->internals.dtls.flight_init == 0 || diff >= TIMER_WINDOW)
         {
           _gnutls_dtls_log ("DTLS[%p]: %sStart of flight transmission.\n", 
session,  (session->internals.dtls.flight_init == 0)?"":"re-");
@@ -621,7 +643,7 @@ unsigned int diff;
 
   gettime(&now);
   
-  diff = timespec_sub_ms(&now, &session->internals.dtls.last_retransmit);
+  diff = _dtls_timespec_sub_ms(&now, &session->internals.dtls.last_retransmit);
   if (diff >= TIMER_WINDOW)
     return 0;
   else
diff --git a/lib/gnutls_dtls.h b/lib/gnutls_dtls.h
index 8ba67bf..cd15f89 100644
--- a/lib/gnutls_dtls.h
+++ b/lib/gnutls_dtls.h
@@ -37,19 +37,14 @@ void _dtls_reset_hsk_state(gnutls_session_t session);
 
 #define MAX_DTLS_TIMEOUT 60000
 
-/* returns a-b in ms */
-inline static unsigned int timespec_sub_ms(struct timespec *a, struct timespec 
*b)
-{
-  return (a->tv_sec * 1000 + a->tv_nsec / (1000 * 1000) -
-          (b->tv_sec * 1000 + b->tv_nsec / (1000 * 1000)));
-}
+unsigned int _dtls_timespec_sub_ms (struct timespec *a, struct timespec *b);
 
 #define RETURN_DTLS_EAGAIN_OR_TIMEOUT(session, r) { \
   struct timespec now; \
   unsigned int diff; \
   gettime(&now); \
    \
-  diff = timespec_sub_ms(&now, &session->internals.dtls.handshake_start_time); 
\
+  diff = _dtls_timespec_sub_ms(&now, 
&session->internals.dtls.handshake_start_time); \
   if (diff > session->internals.dtls.total_timeout_ms) \
     { \
       _gnutls_dtls_log("Session timeout: %u ms\n", diff); \
@@ -97,18 +92,7 @@ inline static void _dtls_async_timer_init(gnutls_session_t 
session)
     }
 }
 
-inline static void _dtls_async_timer_delete(gnutls_session_t session)
-{
-  if (session->internals.dtls.async_term != 0)
-    {
-      _gnutls_dtls_log ("DTLS[%p]: Deinitializing previous handshake 
state.\n", session);
-      session->internals.dtls.async_term = 0; /* turn off "timer" */
-
-      _dtls_reset_hsk_state(session);
-      _gnutls_handshake_io_buffer_clear (session);
-      _gnutls_epoch_gc(session);
-    }
-}
+void _dtls_async_timer_delete(gnutls_session_t session);
 
 /* Checks whether it is time to terminate the timer
  */
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 8bbb504..83deaee 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -1684,36 +1684,40 @@ gnutls_ecc_curve_t 
gnutls_ecc_curve_get(gnutls_session_t session);
   struct gnutls_tdb_int;
   typedef struct gnutls_tdb_int *gnutls_tdb_t;
   
-  int gnutls_tdb_init(gnutls_tdb_t*);
-  void gnutls_tdb_set_store_func(gnutls_tdb_t, gnutls_tdb_store_func);
-  void gnutls_tdb_set_store_commitment_func(gnutls_tdb_t, 
gnutls_tdb_store_commitment_func);
-  void gnutls_tdb_set_verify_func(gnutls_tdb_t, gnutls_tdb_verify_func);
-  void gnutls_tdb_deinit(gnutls_tdb_t);
-
-  int gnutls_verify_stored_pubkey(const char* db_name, 
-                            gnutls_tdb_t,
-                            const char* host,
-                            const char* service,
-                            gnutls_certificate_type_t cert_type,
-                            const gnutls_datum_t * cert, unsigned int flags);
-
-  int gnutls_store_commitment(const char* db_name,
-                    gnutls_tdb_t,
-                    const char* host,
-                    const char* service,
-                    gnutls_digest_algorithm_t hash_algo,
-                    const gnutls_datum_t* hash,
-                    time_t expiration,
-                    unsigned int flags);
-
-  int gnutls_store_pubkey(const char* db_name,
-                    gnutls_tdb_t,
-                    const char* host,
-                    const char* service,
-                    gnutls_certificate_type_t cert_type,
-                    const gnutls_datum_t * cert, 
-                    time_t expiration,
-                    unsigned int flags);
+  int gnutls_tdb_init (gnutls_tdb_t *tdb);
+  void gnutls_tdb_set_store_func (gnutls_tdb_t tdb,
+                                 gnutls_tdb_store_func store);
+  void gnutls_tdb_set_store_commitment_func (gnutls_tdb_t tdb,
+                                    gnutls_tdb_store_commitment_func cstore);
+  void gnutls_tdb_set_verify_func (gnutls_tdb_t tdb,
+                                  gnutls_tdb_verify_func verify);
+  void gnutls_tdb_deinit (gnutls_tdb_t tdb);
+
+  int gnutls_verify_stored_pubkey (const char* db_name,
+                                  gnutls_tdb_t tdb,
+                                  const char* host,
+                                  const char* service,
+                                  gnutls_certificate_type_t cert_type,
+                                  const gnutls_datum_t * cert,
+                                  unsigned int flags);
+
+  int gnutls_store_commitment (const char* db_name,
+                              gnutls_tdb_t tdb,
+                              const char* host,
+                              const char* service,
+                              gnutls_digest_algorithm_t hash_algo,
+                              const gnutls_datum_t* hash,
+                              time_t expiration,
+                              unsigned int flags);
+
+  int gnutls_store_pubkey (const char* db_name,
+                          gnutls_tdb_t tdb,
+                          const char* host,
+                          const char* service,
+                          gnutls_certificate_type_t cert_type,
+                          const gnutls_datum_t * cert,
+                          time_t expiration,
+                          unsigned int flags);
 
 
   /* Gnutls error codes. The mapping to a TLS alert is also shown in
diff --git a/lib/includes/gnutls/ocsp.h b/lib/includes/gnutls/ocsp.h
index 3c12556..db16b70 100644
--- a/lib/includes/gnutls/ocsp.h
+++ b/lib/includes/gnutls/ocsp.h
@@ -241,12 +241,12 @@ extern "C"
                                  size_t *ncerts);
 
   int gnutls_ocsp_resp_verify_direct (gnutls_ocsp_resp_t resp,
-                                     gnutls_x509_crt_t signercert,
-                                     unsigned int*verify,
+                                     gnutls_x509_crt_t issuer,
+                                     unsigned int *verify,
                                      unsigned int flags);
   int gnutls_ocsp_resp_verify (gnutls_ocsp_resp_t resp,
                               gnutls_x509_trust_list_t trustlist,
-                              unsigned int*verify,
+                              unsigned int *verify,
                               unsigned int flags);
 
 #ifdef __cplusplus
diff --git a/lib/verify-tofu.c b/lib/verify-tofu.c
index 7304cb7..b2a34af 100644
--- a/lib/verify-tofu.c
+++ b/lib/verify-tofu.c
@@ -105,7 +105,7 @@ struct gnutls_tdb_int default_tdb = {
  * Since: 3.0
  **/
 int
-gnutls_verify_stored_pubkey(const char* db_name, 
+gnutls_verify_stored_pubkey(const char* db_name,
                             gnutls_tdb_t tdb,
                             const char* host,
                             const char* service,
@@ -599,12 +599,12 @@ char buffer[MAX_HASH_SIZE*2+1];
  * Since: 3.0
  **/
 int
-gnutls_store_pubkey(const char* db_name, 
+gnutls_store_pubkey(const char* db_name,
                     gnutls_tdb_t tdb,
                     const char* host,
                     const char* service,
                     gnutls_certificate_type_t cert_type,
-                    const gnutls_datum_t * cert, 
+                    const gnutls_datum_t * cert,
                     time_t expiration,
                     unsigned int flags)
 {
@@ -684,7 +684,7 @@ cleanup:
  * Since: 3.0
  **/
 int
-gnutls_store_commitment(const char* db_name, 
+gnutls_store_commitment(const char* db_name,
                     gnutls_tdb_t tdb,
                     const char* host,
                     const char* service,


hooks/post-receive
-- 
GNU gnutls



reply via email to

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