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_1_4-42-g06695cd


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_1_4-42-g06695cd
Date: Mon, 19 Nov 2012 23:59: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=06695cdb6af5642c821b726d916668c570bc8b93

The branch, master has been updated
       via  06695cdb6af5642c821b726d916668c570bc8b93 (commit)
       via  bb0c78137d11a396caee206f7d453b2c75364cc6 (commit)
      from  a221c87220a212680a74e8fdcf840b02bdaa22fa (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 06695cdb6af5642c821b726d916668c570bc8b93
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Nov 20 00:58:42 2012 +0100

    simplified parsing

commit bb0c78137d11a396caee206f7d453b2c75364cc6
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Nov 20 00:58:23 2012 +0100

    print header only on the first policy

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

Summary of changes:
 lib/x509/output.c     |    3 ++-
 src/certtool-args.c   |    2 +-
 src/certtool-args.def |    4 ++--
 src/certtool-args.h   |    2 +-
 src/certtool-cfg.c    |   23 +++++++++++------------
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/lib/x509/output.c b/lib/x509/output.c
index 47945a9..6ac7c47 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -976,7 +976,8 @@ print_extensions (gnutls_buffer_st * str, const char 
*prefix, int type,
                   break;
                 }
 
-              addf (str, "%s\t\tCertificate Policies (%s):\n", prefix, 
critical ? _("critical") : _("not critical"));
+              if (x==0) addf (str, "%s\t\tCertificate Policies (%s):\n", 
prefix, critical ? _("critical") : _("not critical"));
+
               addf (str, "%s\t\t\t%s\n", prefix, policy.oid);
               for (j=0;j<policy.qualifiers;j++)
                 {
diff --git a/src/certtool-args.c b/src/certtool-args.c
index 33f7ad0..261f2d8 100644
--- a/src/certtool-args.c
+++ b/src/certtool-args.c
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (certtool-args.c)
  *  
- *  It has been AutoGen-ed  November 20, 2012 at 12:12:56 AM by AutoGen 5.16
+ *  It has been AutoGen-ed  November 20, 2012 at 12:55:34 AM by AutoGen 5.16
  *  From the definitions    certtool-args.def
  *  and the template file   options
  *
diff --git a/src/certtool-args.def b/src/certtool-args.def
index 34c2d42..5e22325 100644
--- a/src/certtool-args.def
+++ b/src/certtool-args.def
@@ -634,11 +634,11 @@ signing_key
 # ca_issuers_uri = http://my.ca.issuer
 
 # Certificate policies
-# policy = 1.3.6.1.4.1.5484.1.10.99.1.0
+# policy1 = 1.3.6.1.4.1.5484.1.10.99.1.0
 # policy1_txt = "This is a long policy to summarize"
 # policy1_url = http://www.example.com/a-policy-to-read
 
-# policy = 1.3.6.1.4.1.5484.1.10.99.1.1
+# policy2 = 1.3.6.1.4.1.5484.1.10.99.1.1
 # policy2_txt = "This is a short policy"
 # policy2_url = http://www.example.com/another-policy-to-read
 
diff --git a/src/certtool-args.h b/src/certtool-args.h
index 46af66d..a3c43b3 100644
--- a/src/certtool-args.h
+++ b/src/certtool-args.h
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (certtool-args.h)
  *  
- *  It has been AutoGen-ed  November 20, 2012 at 12:12:55 AM by AutoGen 5.16
+ *  It has been AutoGen-ed  November 20, 2012 at 12:55:34 AM by AutoGen 5.16
  *  From the definitions    certtool-args.def
  *  and the template file   options
  *
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c
index c2cf1c1..b1113c6 100644
--- a/src/certtool-cfg.c
+++ b/src/certtool-cfg.c
@@ -49,6 +49,7 @@
 extern int batch;
 
 #define MAX_ENTRIES 128
+#define MAX_POLICIES 8
 
 typedef struct _cfg_ctx
 {
@@ -61,9 +62,9 @@ typedef struct _cfg_ctx
   char *challenge_password;
   char *pkcs9_email;
   char *country;
-  char **policy_oid;
-  char *policy_txt[MAX_ENTRIES];
-  char *policy_url[MAX_ENTRIES];
+  char *policy_oid[MAX_POLICIES];
+  char *policy_txt[MAX_POLICIES];
+  char *policy_url[MAX_POLICIES];
   char **dc;
   char **dns_name;
   char **uri;
@@ -236,12 +237,14 @@ template_parse (const char *template)
   if (val != NULL && val->valType == OPARG_TYPE_STRING)
     cfg.country = strdup(val->v.strVal);
   
-  READ_MULTI_LINE("policy", cfg.policy_oid);
-  
-  if (cfg.policy_oid != NULL) 
+  for (i=0;i<MAX_POLICIES;i++)
     {
-      int i = 0;
-      while(cfg.policy_oid[i] != NULL) 
+      snprintf(tmpstr, sizeof(tmpstr), "policy%d", i+1);
+      val = optionGetValue(pov, tmpstr);
+      if (val != NULL && val->valType == OPARG_TYPE_STRING)
+        cfg.policy_oid[i] = strdup(val->v.strVal);
+  
+      if (cfg.policy_oid[i] != NULL)
         {
           snprintf(tmpstr, sizeof(tmpstr), "policy%d_url", i+1);
           val = optionGetValue(pov, tmpstr);
@@ -254,8 +257,6 @@ template_parse (const char *template)
             {
               cfg.policy_txt[i] = strdup(val->v.strVal);
             }
-          
-          i++;
         }
     }
   
@@ -1270,8 +1271,6 @@ get_policy_set (gnutls_x509_crt_t crt)
               policy.qualifiers++;
             }
 
-fprintf(stderr, "setting policy %s with %d qualifiers\n", policy.oid, 
policy.qualifiers);
-          
           ret =
             gnutls_x509_crt_set_policy (crt, &policy, 0);
           if (ret < 0)


hooks/post-receive
-- 
GNU gnutls



reply via email to

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