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_3-20-g970711a


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_3-20-g970711a
Date: Fri, 28 Aug 2009 13:01:24 +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=970711aff70f09bfd156b5e31a288c067bc38477

The branch, master has been updated
       via  970711aff70f09bfd156b5e31a288c067bc38477 (commit)
      from  b07f58ce787e9508d6ee33fbe6001ea81987390f (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 970711aff70f09bfd156b5e31a288c067bc38477
Author: Simon Josefsson <address@hidden>
Date:   Fri Aug 28 15:01:18 2009 +0200

    Fix deprecated usage of gnutls_datum.

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

Summary of changes:
 lib/gnutls_buffers.c            |    4 ++--
 lib/gnutls_pk.c                 |    4 ++--
 lib/gnutls_str.c                |   19 +++++++++----------
 lib/gnutls_x509.c               |    2 +-
 lib/includes/gnutls/gnutls.h.in |    2 +-
 lib/opencdk/pubkey.c            |    6 +++---
 lib/openpgp/gnutls_openpgp.c    |    2 +-
 lib/x509/common.c               |    2 +-
 lib/x509/extensions.c           |    2 +-
 lib/x509/mpi.c                  |    4 ++--
 lib/x509/privkey_pkcs8.c        |   12 ++++++------
 lib/x509/x509_write.c           |    2 +-
 src/certtool.c                  |    8 ++++----
 tests/openpgp_test.c            |    4 ++--
 tests/resume.c                  |    2 +-
 tests/x509_test.c               |    2 +-
 tests/x509dn.c                  |    2 +-
 tests/x509sign-verify.c         |    2 +-
 18 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index 836c5a8..6faa5ea 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -651,7 +651,7 @@ _gnutls_io_write_buffered (gnutls_session_t session,
    */
   if (iptr == NULL)
     {
-      gnutls_datum bdata;
+      gnutls_datum_t bdata;
       /* checking is handled above */
       _gnutls_buffer_get_datum (&session->internals.record_send_buffer, 
&bdata, session->internals.record_send_buffer.length);
 
@@ -843,7 +843,7 @@ _gnutls_handshake_io_send_int (gnutls_session_t session,
   if (session->internals.handshake_send_buffer.length > 0 && ptr == NULL
       && n == 0)
     {
-      gnutls_datum bdata;
+      gnutls_datum_t bdata;
 
       /* resuming previously interrupted write
        */
diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c
index 2609252..ff9fbf1 100644
--- a/lib/gnutls_pk.c
+++ b/lib/gnutls_pk.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software 
Foundation
+ * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 Free Software 
Foundation
  *
  * Author: Nikos Mavrogiannopoulos
  *
@@ -53,7 +53,7 @@ _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext,
   size_t k, psize;
   size_t mod_bits;
   gnutls_pk_params_st pk_params;
-  gnutls_datum to_encrypt, encrypted;
+  gnutls_datum_t to_encrypt, encrypted;
 
   for (i = 0; i < params_len; i++)
     pk_params.params[i] = params[i];
diff --git a/lib/gnutls_str.c b/lib/gnutls_str.c
index b25e37f..a4c765e 100644
--- a/lib/gnutls_str.c
+++ b/lib/gnutls_str.c
@@ -212,12 +212,12 @@ _gnutls_string_append_str (gnutls_string * dest, const 
char *src)
   return _gnutls_string_append_data (dest, src, strlen(src));
 }
 
-/* returns data from a string in a constant buffer. 
+/* returns data from a string in a constant buffer.
  * The data will NOT be valid if buffer is released or
  * data are appended in the buffer.
  */
 void
-_gnutls_string_get_datum (gnutls_string * str, gnutls_datum *data,
+_gnutls_string_get_datum (gnutls_string * str, gnutls_datum_t *data,
                            size_t req_size)
 {
 
@@ -232,32 +232,31 @@ _gnutls_string_get_datum (gnutls_string * str, 
gnutls_datum *data,
 
   data->data = str->data;
   data->size = req_size;
-  
+
   str->data += req_size;
   str->length -= req_size;
 
-  /* if string becomes empty start from begining */  
+  /* if string becomes empty start from begining */
   if (str->length == 0) {
       str->data = str->allocd;
   }
-  
+
   return;
-  
 }
 
-/* returns data from a string in a constant buffer. 
+/* returns data from a string in a constant buffer.
  */
 void
 _gnutls_string_get_data (gnutls_string * str, void *data,
-                           size_t *req_size)
+                        size_t *req_size)
 {
-gnutls_datum tdata;
+  gnutls_datum_t tdata;
 
   _gnutls_string_get_datum( str, &tdata, *req_size);
 
   *req_size = tdata.size;
   memcpy( data, tdata.data, tdata.size);
-  
+
   return;
 }
 
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c
index 450ec6c..4ee0984 100644
--- a/lib/gnutls_x509.c
+++ b/lib/gnutls_x509.c
@@ -1939,7 +1939,7 @@ int
  **/
 int
   gnutls_certificate_set_x509_simple_pkcs12_mem
-  (gnutls_certificate_credentials_t res, const gnutls_datum *p12blob,
+  (gnutls_certificate_credentials_t res, const gnutls_datum_t *p12blob,
    gnutls_x509_crt_fmt_t type, const char *password)
 {
   gnutls_pkcs12_t p12;
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index a78fc39..7463fcb 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -771,7 +771,7 @@ extern "C" {
   (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 *p12blob,
+  (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.
diff --git a/lib/opencdk/pubkey.c b/lib/opencdk/pubkey.c
index bcaf9ef..0ee122b 100644
--- a/lib/opencdk/pubkey.c
+++ b/lib/opencdk/pubkey.c
@@ -1,5 +1,5 @@
 /* pubkey.c - Public key API
- * Copyright (C) 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
+ * Copyright (C) 2002, 2003, 2007, 2008, 2009 Free Software Foundation, Inc.
  *
  * Author: Timo Schulz
  *
@@ -72,13 +72,13 @@ sig_to_datum (gnutls_datum_t * r_sig, cdk_pkt_signature_t 
sig)
 cdk_error_t
 cdk_pk_verify (cdk_pubkey_t pk, cdk_pkt_signature_t sig, const byte * md)
 {
-  gnutls_datum s_sig;
+  gnutls_datum_t s_sig;
   byte *encmd = NULL;
   size_t enclen;
   cdk_error_t rc;
   int ret, algo;
   unsigned int i;
-  gnutls_datum data;
+  gnutls_datum_t data;
   gnutls_pk_params_st params;
 
   if (!pk || !sig || !md)
diff --git a/lib/openpgp/gnutls_openpgp.c b/lib/openpgp/gnutls_openpgp.c
index 8f9c140..16d18d8 100644
--- a/lib/openpgp/gnutls_openpgp.c
+++ b/lib/openpgp/gnutls_openpgp.c
@@ -618,7 +618,7 @@ gnutls_certificate_set_openpgp_keyring_mem 
(gnutls_certificate_credentials_t c,
                                            size_t dlen,
                                            gnutls_openpgp_crt_fmt_t format)
 {
-  gnutls_datum ddata;
+  gnutls_datum_t ddata;
   int rc;
 
   ddata.data = (void *) data;
diff --git a/lib/x509/common.c b/lib/x509/common.c
index c44d720..d3ca210 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -742,7 +742,7 @@ _gnutls_x509_export_int_named (ASN1_TYPE asn1_data, const 
char *name,
   else
     {                          /* PEM */
       opaque *out;
-      gnutls_datum tmp;
+      gnutls_datum_t tmp;
 
       result = _gnutls_x509_der_encode (asn1_data, name, &tmp, 0);
       if (result < 0)
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
index b054688..ac3d0b3 100644
--- a/lib/x509/extensions.c
+++ b/lib/x509/extensions.c
@@ -525,7 +525,7 @@ _gnutls_x509_crq_set_extension (gnutls_x509_crq_t crq,
 {
   unsigned char *extensions = NULL;
   size_t extensions_size = 0;
-  gnutls_datum der;
+  gnutls_datum_t der;
   ASN1_TYPE c2;
   int result;
 
diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c
index c4d8650..dc18eaa 100644
--- a/lib/x509/mpi.c
+++ b/lib/x509/mpi.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation
  *
  * Author: Nikos Mavrogiannopoulos
  *
@@ -211,7 +211,7 @@ get_mpis (int pk_algorithm, ASN1_TYPE asn, const char *root,
 {
   int result;
   char name[256];
-  gnutls_datum tmp = { NULL, 0 };
+  gnutls_datum_t tmp = { NULL, 0 };
 
   /* Read the algorithm's parameters
    */
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c
index d6377ae..cd676e8 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation
  *
  * Author: Nikos Mavrogiannopoulos
  *
@@ -126,7 +126,7 @@ check_schema (const char *oid)
  * an ASN.1 INTEGER of the x value.
  */
 inline static int
-_encode_privkey (gnutls_x509_privkey pkey, gnutls_datum * raw)
+_encode_privkey (gnutls_x509_privkey pkey, gnutls_datum_t * raw)
 {
   size_t size = 0;
   opaque *data = NULL;
@@ -216,8 +216,8 @@ encode_to_private_key_info (gnutls_x509_privkey_t pkey,
   int result, len;
   opaque null = 0;
   const char *oid;
-  gnutls_datum algo_params = { NULL, 0 };
-  gnutls_datum algo_privkey = { NULL, 0 };
+  gnutls_datum_t algo_params = { NULL, 0 };
+  gnutls_datum_t algo_privkey = { NULL, 0 };
 
   if (pkey->pk_algorithm != GNUTLS_PK_RSA
       && pkey->pk_algorithm != GNUTLS_PK_DSA)
@@ -856,7 +856,7 @@ static int
 _decode_pkcs8_rsa_key (ASN1_TYPE pkcs8_asn, gnutls_x509_privkey pkey)
 {
   int ret;
-  gnutls_datum tmp;
+  gnutls_datum_t tmp;
 
   ret = _gnutls_x509_read_value (pkcs8_asn, "privateKey", &tmp, 0);
   if (ret < 0)
@@ -886,7 +886,7 @@ static int
 _decode_pkcs8_dsa_key (ASN1_TYPE pkcs8_asn, gnutls_x509_privkey pkey)
 {
   int ret;
-  gnutls_datum tmp;
+  gnutls_datum_t tmp;
 
   ret = _gnutls_x509_read_value (pkcs8_asn, "privateKey", &tmp, 0);
   if (ret < 0)
diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c
index dd07444..a57ccc2 100644
--- a/lib/x509/x509_write.c
+++ b/lib/x509/x509_write.c
@@ -320,7 +320,7 @@ gnutls_x509_crt_set_crq_extensions (gnutls_x509_crt_t crt,
       opaque *extensions;
       size_t extensions_size;
       unsigned int critical;
-      gnutls_datum ext;
+      gnutls_datum_t ext;
 
       oid_size = sizeof (oid);
       result = gnutls_x509_crq_get_extension_info (crq, i, oid,
diff --git a/src/certtool.c b/src/certtool.c
index 882cb99..9e972b2 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -127,8 +127,8 @@ raw_to_string (const unsigned char *raw, size_t raw_size)
 }
 
 static void
-print_dsa_pkey (gnutls_datum * x, gnutls_datum * y, gnutls_datum * p,
-               gnutls_datum * q, gnutls_datum * g)
+print_dsa_pkey (gnutls_datum_t * x, gnutls_datum_t * y, gnutls_datum_t * p,
+               gnutls_datum_t * q, gnutls_datum_t * g)
 {
   fprintf (outfile, "private key:");
   print_hex_datum (x);
@@ -143,8 +143,8 @@ print_dsa_pkey (gnutls_datum * x, gnutls_datum * y, 
gnutls_datum * p,
 }
 
 static void
-print_rsa_pkey (gnutls_datum * m, gnutls_datum * e, gnutls_datum * d,
-               gnutls_datum * p, gnutls_datum * q, gnutls_datum * u)
+print_rsa_pkey (gnutls_datum_t * m, gnutls_datum_t * e, gnutls_datum_t * d,
+               gnutls_datum_t * p, gnutls_datum_t * q, gnutls_datum_t * u)
 {
   fprintf (outfile, "modulus:");
   print_hex_datum (m);
diff --git a/tests/openpgp_test.c b/tests/openpgp_test.c
index cf31d30..2d1f163 100644
--- a/tests/openpgp_test.c
+++ b/tests/openpgp_test.c
@@ -41,7 +41,7 @@ get_pktime (long timestamp)
 }
 
 int
-get_pubkey (gnutls_datum * pk, const gnutls_datum * kr, unsigned long kid)
+get_pubkey (gnutls_datum_t * pk, const gnutls_datum_t * kr, unsigned long kid)
 {
   unsigned char buf[4];
 
@@ -57,7 +57,7 @@ int
 main (int argc, char **argv)
 {
   gnutls_certificate_credentials ctx;
-  gnutls_datum dat, xml, pk;
+  gnutls_datum_t dat, xml, pk;
   gnutls_openpgp_name uid;
   gnutls_privkey *pkey;
   gnutls_cert *cert;
diff --git a/tests/resume.c b/tests/resume.c
index cbd4968..5cc3eda 100644
--- a/tests/resume.c
+++ b/tests/resume.c
@@ -88,7 +88,7 @@ client (struct params_res *params)
   /* variables used in session resuming
    */
   int t;
-  gnutls_datum session_data;
+  gnutls_datum_t session_data;
 
   gnutls_global_init ();
 
diff --git a/tests/x509_test.c b/tests/x509_test.c
index b3e96f5..d1fa206 100644
--- a/tests/x509_test.c
+++ b/tests/x509_test.c
@@ -118,7 +118,7 @@ _verify_x509_mem (const char *cert, int cert_size,
   const char *ptr;
   int ret;
   unsigned int output;
-  gnutls_datum tmp;
+  gnutls_datum_t tmp;
   gnutls_x509_crt *x509_cert_list = NULL;
   gnutls_x509_crt x509_ca;
   gnutls_x509_crl *x509_crl_list = NULL;
diff --git a/tests/x509dn.c b/tests/x509dn.c
index 8568de1..3b31fed 100644
--- a/tests/x509dn.c
+++ b/tests/x509dn.c
@@ -110,7 +110,7 @@ const gnutls_datum_t key = { key_pem, sizeof (key_pem) };
 
 static int
 cert_callback (gnutls_session session,
-              const gnutls_datum * req_ca_rdn, int nreqs,
+              const gnutls_datum_t * req_ca_rdn, int nreqs,
               const gnutls_pk_algorithm * sign_algos,
               int sign_algos_length, gnutls_retr_st * st)
 {
diff --git a/tests/x509sign-verify.c b/tests/x509sign-verify.c
index de17d0e..3b68a70 100644
--- a/tests/x509sign-verify.c
+++ b/tests/x509sign-verify.c
@@ -140,7 +140,7 @@ doit (void)
   gnutls_digest_algorithm_t hash_algo;
   unsigned char _signature[128];
   size_t _signature_size = sizeof (_signature);
-  gnutls_datum signature;
+  gnutls_datum_t signature;
   int ret;
   size_t i;
 


hooks/post-receive
-- 
GNU gnutls




reply via email to

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