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-8-g3d8da57


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-8-g3d8da57
Date: Fri, 27 Nov 2009 22:45:58 +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=3d8da5765133c6ced37bf29b5a07f950b8c26cd7

The branch, master has been updated
       via  3d8da5765133c6ced37bf29b5a07f950b8c26cd7 (commit)
      from  69a40f54c6a20d7add946b0e001ca254a51dc47b (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 3d8da5765133c6ced37bf29b5a07f950b8c26cd7
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat Nov 28 00:41:46 2009 +0200

    Corrected two issues that affected certificate request generation.
    1. Null padding is added on integers (found thanks to Wilankar Trupti 
<address@hidden>)
    2. In optional SignatureAlgorithm parameters field for DSA keys the DSA 
parameters were added. Those
    were rejected by verisign. Gnutls no longer adds those parameters there 
since other implementations
    don't do either and having them does not seem to offer anything (anyway you 
need the signer's certificate
    to verify thus public key will be available).

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

Summary of changes:
 lib/x509/mpi.c |   49 ++++++++++++++-----------------------------------
 1 files changed, 14 insertions(+), 35 deletions(-)

diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c
index dc18eaa..aad7312 100644
--- a/lib/x509/mpi.c
+++ b/lib/x509/mpi.c
@@ -380,14 +380,14 @@ _gnutls_x509_write_rsa_params (bigint_t * params, int 
params_size,
       return _gnutls_asn2err (result);
     }
 
-  result = _gnutls_x509_write_int (spk, "modulus", params[0], 0);
+  result = _gnutls_x509_write_int (spk, "modulus", params[0], 1);
   if (result < 0)
     {
       gnutls_assert ();
       goto cleanup;
     }
 
-  result = _gnutls_x509_write_int (spk, "publicExponent", params[1], 0);
+  result = _gnutls_x509_write_int (spk, "publicExponent", params[1], 1);
   if (result < 0)
     {
       gnutls_assert ();
@@ -448,36 +448,15 @@ _gnutls_x509_write_sig_params (ASN1_TYPE dst, const char 
*dst_name,
   _gnutls_str_cpy (name, sizeof (name), dst_name);
   _gnutls_str_cat (name, sizeof (name), ".parameters");
 
-  if (pk_algorithm == GNUTLS_PK_DSA)
-    {
-      result = _gnutls_x509_write_dsa_params (params, params_size, &der);
-      if (result < 0)
-       {
-         gnutls_assert ();
-         return result;
-       }
+  result = asn1_write_value (dst, name, NULL, 0);
 
-      result = asn1_write_value (dst, name, der.data, der.size);
-      _gnutls_free_datum (&der);
-
-      if (result != ASN1_SUCCESS)
-       {
-         gnutls_assert ();
-         return _gnutls_asn2err (result);
-       }
-    }
-  else
-    {                          /* RSA */
-      result = asn1_write_value (dst, name, NULL, 0);
-
-      if (result != ASN1_SUCCESS && result != ASN1_ELEMENT_NOT_FOUND)
-       {
-         /* Here we ignore the element not found error, since this
-          * may have been disabled before.
-          */
-         gnutls_assert ();
-         return _gnutls_asn2err (result);
-       }
+  if (result != ASN1_SUCCESS && result != ASN1_ELEMENT_NOT_FOUND)
+    {
+      /* Here we ignore the element not found error, since this
+       * may have been disabled before.
+       */
+      gnutls_assert ();
+      return _gnutls_asn2err (result);
     }
 
   return 0;
@@ -514,21 +493,21 @@ _gnutls_x509_write_dsa_params (bigint_t * params, int 
params_size,
       return _gnutls_asn2err (result);
     }
 
-  result = _gnutls_x509_write_int (spk, "p", params[0], 0);
+  result = _gnutls_x509_write_int (spk, "p", params[0], 1);
   if (result < 0)
     {
       gnutls_assert ();
       goto cleanup;
     }
 
-  result = _gnutls_x509_write_int (spk, "q", params[1], 0);
+  result = _gnutls_x509_write_int (spk, "q", params[1], 1);
   if (result < 0)
     {
       gnutls_assert ();
       goto cleanup;
     }
 
-  result = _gnutls_x509_write_int (spk, "g", params[2], 0);
+  result = _gnutls_x509_write_int (spk, "g", params[2], 1);
   if (result < 0)
     {
       gnutls_assert ();
@@ -580,7 +559,7 @@ _gnutls_x509_write_dsa_public_key (bigint_t * params, int 
params_size,
       return _gnutls_asn2err (result);
     }
 
-  result = _gnutls_x509_write_int (spk, "", params[3], 0);
+  result = _gnutls_x509_write_int (spk, "", params[3], 1);
   if (result < 0)
     {
       gnutls_assert ();


hooks/post-receive
-- 
GNU gnutls




reply via email to

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