]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Indent.
authorSimon Josefsson <simon@josefsson.org>
Thu, 10 Sep 2009 06:25:01 +0000 (08:25 +0200)
committerSimon Josefsson <simon@josefsson.org>
Thu, 10 Sep 2009 06:25:01 +0000 (08:25 +0200)
lib/x509/output.c
lib/x509/x509.c

index 10e5fc21fc9eeeb6519373a968bd82daca537afb..34bdc6cc5176e66930a28b28a65e675591e2b9ea 100644 (file)
@@ -363,8 +363,7 @@ print_crldist (gnutls_string * str, gnutls_x509_crt_t cert)
 
       if ((err == GNUTLS_SAN_DNSNAME
           || err == GNUTLS_SAN_RFC822NAME
-          || err == GNUTLS_SAN_URI) &&
-         strlen (buffer) != size)
+          || err == GNUTLS_SAN_URI) && strlen (buffer) != size)
        {
          adds (str, _("warning: distributionPoint contains an embedded NUL, "
                       "replacing with '!'\n"));
@@ -568,9 +567,8 @@ print_altname (gnutls_string * str, const char *prefix, int altname_type,
          gnutls_x509_crq_get_subject_alt_name (cert.crq, altname_idx, buffer,
                                                &size, NULL, NULL);
       else if (altname_type == TYPE_CRT_IAN)
-       err = 
-         gnutls_x509_crt_get_issuer_alt_name (cert.crt, altname_idx, buffer,
-                                               &size, NULL);
+       err = gnutls_x509_crt_get_issuer_alt_name (cert.crt, altname_idx,
+                                                  buffer, &size, NULL);
 
       if (err < 0)
        {
@@ -582,8 +580,7 @@ print_altname (gnutls_string * str, const char *prefix, int altname_type,
 
       if ((err == GNUTLS_SAN_DNSNAME
           || err == GNUTLS_SAN_RFC822NAME
-          || err == GNUTLS_SAN_URI) &&
-         strlen (buffer) != size)
+          || err == GNUTLS_SAN_URI) && strlen (buffer) != size)
        {
          adds (str, _("warning: altname contains an embedded NUL, "
                       "replacing with '!'\n"));
@@ -598,7 +595,8 @@ print_altname (gnutls_string * str, const char *prefix, int altname_type,
          break;
 
        case GNUTLS_SAN_RFC822NAME:
-         addf (str, "%s\t\t\tRFC822name: %.*s\n", prefix, (int) size, buffer);
+         addf (str, "%s\t\t\tRFC822name: %.*s\n", prefix, (int) size,
+               buffer);
          break;
 
        case GNUTLS_SAN_URI:
@@ -636,7 +634,8 @@ print_altname (gnutls_string * str, const char *prefix, int altname_type,
            if (err != GNUTLS_E_SHORT_MEMORY_BUFFER)
              {
                gnutls_free (buffer);
-               addf (str, "error: get_subject/issuer_alt_othername_oid: %s\n",
+               addf (str,
+                     "error: get_subject/issuer_alt_othername_oid: %s\n",
                      gnutls_strerror (err));
                return;
              }
@@ -705,7 +704,6 @@ print_altname (gnutls_string * str, const char *prefix, int altname_type,
     }
 }
 
-
 static void
 print_extensions (gnutls_string * str, const char *prefix, int type,
                  cert_type_t cert)
@@ -1075,8 +1073,7 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert, int notsigned)
          {
            err = gnutls_x509_crt_get_dn (cert, dn, &dn_size);
            if (err < 0)
-             addf (str, "error: get_dn: %s\n",
-                   gnutls_strerror (err));
+             addf (str, "error: get_dn: %s\n", gnutls_strerror (err));
            else
              addf (str, _("\tSubject: %s\n"), dn);
            gnutls_free (dn);
@@ -1297,8 +1294,7 @@ print_oneline (gnutls_string * str, gnutls_x509_crt_t cert)
          {
            err = gnutls_x509_crt_get_dn (cert, dn, &dn_size);
            if (err < 0)
-             addf (str, "unknown subject (%s), ",
-                   gnutls_strerror (err));
+             addf (str, "unknown subject (%s), ", gnutls_strerror (err));
            else
              addf (str, "subject `%s', ", dn);
            gnutls_free (dn);
@@ -1325,8 +1321,7 @@ print_oneline (gnutls_string * str, gnutls_x509_crt_t cert)
          {
            err = gnutls_x509_crt_get_issuer_dn (cert, dn, &dn_size);
            if (err < 0)
-             addf (str, "unknown issuer (%s), ",
-                   gnutls_strerror (err));
+             addf (str, "unknown issuer (%s), ", gnutls_strerror (err));
            else
              addf (str, "issuer `%s', ", dn);
            gnutls_free (dn);
@@ -1350,8 +1345,7 @@ print_oneline (gnutls_string * str, gnutls_x509_crt_t cert)
 
     err = gnutls_x509_crt_get_signature_algorithm (cert);
     if (err < 0)
-      addf (str, "unknown signature algorithm (%s), ",
-           gnutls_strerror (err));
+      addf (str, "unknown signature algorithm (%s), ", gnutls_strerror (err));
     else
       {
        const char *name = gnutls_sign_algorithm_get_name (err);
@@ -1869,8 +1863,7 @@ print_crq (gnutls_string * str, gnutls_x509_crq_t cert)
          {
            err = gnutls_x509_crq_get_dn (cert, dn, &dn_size);
            if (err < 0)
-             addf (str, "error: get_dn: %s\n",
-                   gnutls_strerror (err));
+             addf (str, "error: get_dn: %s\n", gnutls_strerror (err));
            else
              addf (str, _("\tSubject: %s\n"), dn);
            gnutls_free (dn);
index afb0fc96713cc3de8cf7271e917dea289b5df6e3..f0508a4eadbe0f213540a5023aa9237032d09066 100644 (file)
@@ -214,8 +214,8 @@ gnutls_x509_crt_import (gnutls_x509_crt_t cert,
   if (cert->cert)
     {
       /* Any earlier asn1_der_decoding will modify the ASN.1
-        structure, so we need to replace it with a fresh
-        structure. */
+         structure, so we need to replace it with a fresh
+         structure. */
       asn1_delete_structure (&cert->cert);
 
       result = asn1_create_element (_gnutls_get_pkix (),
@@ -1110,10 +1110,10 @@ _gnutls_parse_general_name (ASN1_TYPE src, const char *src_name,
 }
 
 static int
-get_alt_name(gnutls_x509_crt_t cert, const char *extension_id,
-             unsigned int seq, void *ret,
-            size_t * ret_size, unsigned int *ret_type,
-            unsigned int *critical, int othername_oid)
+get_alt_name (gnutls_x509_crt_t cert, const char *extension_id,
+             unsigned int seq, void *ret,
+             size_t * ret_size, unsigned int *ret_type,
+             unsigned int *critical, int othername_oid)
 {
   int result;
   gnutls_datum_t dnsname;
@@ -1144,14 +1144,12 @@ get_alt_name(gnutls_x509_crt_t cert, const char *extension_id,
       return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
     }
 
-  if (strcmp("2.5.29.17", extension_id) == 0) 
-    {
-      result = asn1_create_element(_gnutls_get_pkix (), "PKIX1.SubjectAltName", &c2);
-    }
-  else if (strcmp("2.5.29.18", extension_id) == 0)
-    {
-      result = asn1_create_element(_gnutls_get_pkix (), "PKIX1.IssuerAltName", &c2);
-    }
+  if (strcmp ("2.5.29.17", extension_id) == 0)
+    result = asn1_create_element (_gnutls_get_pkix (),
+                                 "PKIX1.SubjectAltName", &c2);
+  else if (strcmp ("2.5.29.18", extension_id) == 0)
+    result = asn1_create_element (_gnutls_get_pkix (),
+                                 "PKIX1.IssuerAltName", &c2);
   else
     {
       gnutls_assert ();
@@ -1231,7 +1229,8 @@ gnutls_x509_crt_get_subject_alt_name (gnutls_x509_crt_t cert,
                                      size_t * ret_size,
                                      unsigned int *critical)
 {
-  return get_alt_name (cert, "2.5.29.17", seq, ret, ret_size, NULL, critical, 0);
+  return get_alt_name (cert, "2.5.29.17", seq, ret, ret_size, NULL, critical,
+                      0);
 }
 
 /**
@@ -1269,11 +1268,12 @@ gnutls_x509_crt_get_subject_alt_name (gnutls_x509_crt_t cert,
   **/
 int
 gnutls_x509_crt_get_issuer_alt_name (gnutls_x509_crt_t cert,
-                                     unsigned int seq, void *ret,
-                                     size_t * ret_size,
-                                     unsigned int *critical)
+                                    unsigned int seq, void *ret,
+                                    size_t * ret_size,
+                                    unsigned int *critical)
 {
-  return get_alt_name (cert, "2.5.29.18", seq, ret, ret_size, NULL, critical, 0);
+  return get_alt_name (cert, "2.5.29.18", seq, ret, ret_size, NULL, critical,
+                      0);
 }
 
 /**
@@ -1307,7 +1307,8 @@ gnutls_x509_crt_get_subject_alt_name2 (gnutls_x509_crt_t cert,
                                       unsigned int *ret_type,
                                       unsigned int *critical)
 {
-  return get_alt_name (cert, "2.5.29.17", seq, ret, ret_size, ret_type, critical, 0);
+  return get_alt_name (cert, "2.5.29.17", seq, ret, ret_size, ret_type,
+                      critical, 0);
 }
 
 /**
@@ -1336,12 +1337,13 @@ gnutls_x509_crt_get_subject_alt_name2 (gnutls_x509_crt_t cert,
  **/
 int
 gnutls_x509_crt_get_issuer_alt_name2 (gnutls_x509_crt_t cert,
-                                      unsigned int seq, void *ret,
-                                      size_t * ret_size,
-                                      unsigned int *ret_type,
-                                      unsigned int *critical)
+                                     unsigned int seq, void *ret,
+                                     size_t * ret_size,
+                                     unsigned int *ret_type,
+                                     unsigned int *critical)
 {
-  return get_alt_name (cert, "2.5.29.18", seq, ret, ret_size, ret_type, critical, 0);
+  return get_alt_name (cert, "2.5.29.18", seq, ret, ret_size, ret_type,
+                      critical, 0);
 }
 
 /**
@@ -1406,8 +1408,8 @@ gnutls_x509_crt_get_subject_alt_othername_oid (gnutls_x509_crt_t cert,
  **/
 int
 gnutls_x509_crt_get_issuer_alt_othername_oid (gnutls_x509_crt_t cert,
-                                              unsigned int seq,
-                                              void *ret, size_t * ret_size)
+                                             unsigned int seq,
+                                             void *ret, size_t * ret_size)
 {
   return get_alt_name (cert, "2.5.29.18", seq, ret, ret_size, NULL, NULL, 1);
 }
@@ -2477,7 +2479,7 @@ gnutls_x509_crt_check_revocation (gnutls_x509_crt_t cert,
 int
 gnutls_x509_crt_get_verify_algorithm (gnutls_x509_crt_t crt,
                                      const gnutls_datum_t * signature,
-                                     gnutls_digest_algorithm_t *hash)
+                                     gnutls_digest_algorithm_t * hash)
 {
   if (crt == NULL)
     {