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_99_1-12-g861cf4e


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_99_1-12-g861cf4e
Date: Fri, 06 May 2011 23:13:18 +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=861cf4e7e2096999f7f42456be58bc6b22667827

The branch, master has been updated
       via  861cf4e7e2096999f7f42456be58bc6b22667827 (commit)
       via  26060c5b054939713fd80f0a5e2be896df0e2235 (commit)
      from  05d654f81bbab1dfd9b75a4375804cceb1808873 (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 861cf4e7e2096999f7f42456be58bc6b22667827
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat May 7 01:12:51 2011 +0200

    Do not use /tmp for temporary file. Just use the local (test) directory.

commit 26060c5b054939713fd80f0a5e2be896df0e2235
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu May 5 22:56:15 2011 +0200

    Added a check to verify that we don't try forever trying to verify too many 
wildcards.

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

Summary of changes:
 tests/hostname-check.c |   39 +++++++++++++++++++++++++++++++++++++++
 tests/rng-fork.c       |   13 +++++++------
 2 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/tests/hostname-check.c b/tests/hostname-check.c
index e6b46b9..ffdd819 100644
--- a/tests/hostname-check.c
+++ b/tests/hostname-check.c
@@ -572,6 +572,32 @@ char pem10[] =
   "170AX8R58vurxg6iAYuhQnPelik+v9fZUafUmAd/8PTNAKHhrGwFrKuTG7BcLBOt\n"
   "/yfcgJk0Zr3jMVTVtj/O1AijUihhXr0=\n" "-----END CERTIFICATE-----\n";
 
+char pem_too_many[] = "\n"
+  "      Subject: C=BE,CN=******************.gnutls.org\n"
+  "\n"
+  "-----BEGIN CERTIFICATE-----\n"
+  "MIIDljCCAk6gAwIBAgIETcMNdjANBgkqhkiG9w0BAQsFADA6MQswCQYDVQQGEwJC\n"
+  "RTErMCkGA1UEAxMiKioqKioqKioqKioqKioqKioqKioqKiouZ251dGxzLm9yZzAe\n"
+  "Fw0xMTA1MDUyMDQ5NTlaFw02NDAxMTUyMDUwMDJaMDoxCzAJBgNVBAYTAkJFMSsw\n"
+  "KQYDVQQDEyIqKioqKioqKioqKioqKioqKioqKioqKi5nbnV0bHMub3JnMIIBUjAN\n"
+  "BgkqhkiG9w0BAQEFAAOCAT8AMIIBOgKCATEA3c+X0qUdld2GGNjEua2mDLSdttz6\n"
+  "3CHhOmI0B+gzsuiX7ixB0hLxX+3kdv9lJh4Mx0EVaV8N+a2JFI3q1xZSmkfBuwAC\n"
+  "5IhFc3ikrts4w8YH0mQOh+10jGvEwAJQfE6m0Vjp5RMJqdta6usPBoBcCe+UyOn7\n"
+  "Ny514ayTrZs3E0tmOnYz2MTXTPthyJIhB/zfqYhU5KOpR9JsuOM5iRGIOC2i3D5e\n"
+  "SqmkjtUfstDdQTzaEGieRxtlAqLFKHMCgwMJ/fUpfpfcKk5LqnlGRnCGG5u49oq+\n"
+  "KYd9X9qll2vvyEMJQ+IfihZ+HVBd9doC7vLDKkjmazDqAtfvrIsMuMGF2L98hage\n"
+  "g75cJi55e0f1Sj9mYpL9QSC2LADwUsomBi18z3pQfQ/L3ZcgyG/k4FD04wIDAQAB\n"
+  "o0QwQjAMBgNVHRMBAf8EAjAAMBMGA1UdJQQMMAoGCCsGAQUFBwMBMB0GA1UdDgQW\n"
+  "BBSSU9ZxufhoqrNT9o31OUVmnKflMTANBgkqhkiG9w0BAQsFAAOCATEAUMK435LP\n"
+  "0XpmpWLBBuC6VLLIsAGmXRv7odw8sG9fOctalsbK3zd9pDOaoFI/128GOmlTp1aC\n"
+  "n4a/pZ9G5wTKRvdxVqecdYkozDtAS35uwCSQPU/P12Oug6kA4NNJDxF3FGm5eov6\n"
+  "SnZDL0Qlhat9y0yOakaOkVNwESAwgUEYClZeR45htvH5oP48XEgwqHQ9jPS2MXAe\n"
+  "QLBjqqeYzIvWqwT4z14tIkN0VWWqqVo/dzV+lfNwQy0UL8iWVYnks8wKs2SBkVHx\n"
+  "41wBR3uCgCDwlYGDLIG1cm0n7mXrnE7KNcrwQKXL8WGNRAVvx5MVO1vDoWPyQ1Y4\n"
+  "sDdnQiVER9ee/KxO6IgCTGh+nCBTSSYgLX2E/m789quPvzyi9Hf/go28he6E3dSK\n"
+  "q7/LRSxaZenB/Q==\n"
+  "-----END CERTIFICATE-----\n";
+
 #ifdef ENABLE_OPENPGP
 /* Check basic OpenPGP comparison too.
    <http://thread.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/3812>. */
@@ -807,6 +833,19 @@ doit (void)
   if (ret)
     fail ("Hostname incorrectly matches (%d)\n", ret);
 
+  if (debug)
+    success ("Testing pem_too_many...\n");
+  data.data = pem_too_many;
+  data.size = strlen (pem_too_many);
+
+  ret = gnutls_x509_crt_import (x509, &data, GNUTLS_X509_FMT_PEM);
+  if (ret < 0)
+    fail ("gnutls_x509_crt_import: %d\n", ret);
+
+  ret = gnutls_x509_crt_check_hostname (x509, "localhost.gnutls.gnutls.org");
+  if (ret)
+    fail ("Hostname verification should have failed (too many wildcards)\n");
+
 #ifdef ENABLE_OPENPGP
   if (debug)
     success ("Testing pem11...\n");
diff --git a/tests/rng-fork.c b/tests/rng-fork.c
index c7fc189..4bb396b 100644
--- a/tests/rng-fork.c
+++ b/tests/rng-fork.c
@@ -46,8 +46,8 @@ int i;
   printf("\n");
 }
   
-    
-
+#define FILENAME "./rng-test"
+   
 void
 doit (void)
 {
@@ -57,13 +57,11 @@ doit (void)
   int ret;
   FILE* fp;
 
-
   gnutls_global_init ();
-  
   pid = fork();
   if (pid == 0)
     {
-      fp = fopen("/tmp/rng-test", "w");
+      fp = fopen(FILENAME, "w");
       if (fp == NULL)
         fail("cannot open file");
       
@@ -80,12 +78,15 @@ doit (void)
       if (debug) dump("buf2", buf2, sizeof(buf2));
       waitpid(pid, NULL, 0);
       
-      fp = fopen("/tmp/rng-test", "r");
+      fp = fopen(FILENAME, "r");
       if (fp == NULL)
         fail("cannot open file");
         
       ret = fread(buf1, 1, sizeof(buf1), fp);
       
+      fclose(fp);
+      remove(FILENAME);
+      
       if (ret != sizeof(buf1))
         {
           fail("error testing the random generator.");


hooks/post-receive
-- 
GNU gnutls



reply via email to

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