summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/tabtest.c
diff options
context:
space:
mode:
authorjsing <>2014-04-21 16:49:02 +0000
committerjsing <>2014-04-21 16:49:02 +0000
commit1d74853fd0a51591b1a5915391aee920ef15e5eb (patch)
tree5bd805c4799b19613d3cf314de0a3004d86aa88e /src/lib/libcrypto/x509v3/tabtest.c
parentfd7ee4f098b5b70e38ec12a3ba7875821d79748f (diff)
downloadopenbsd-1d74853fd0a51591b1a5915391aee920ef15e5eb.tar.gz
openbsd-1d74853fd0a51591b1a5915391aee920ef15e5eb.tar.bz2
openbsd-1d74853fd0a51591b1a5915391aee920ef15e5eb.zip
KNF.
Diffstat (limited to 'src/lib/libcrypto/x509v3/tabtest.c')
-rw-r--r--src/lib/libcrypto/x509v3/tabtest.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509v3/tabtest.c b/src/lib/libcrypto/x509v3/tabtest.c
index 5ed6eb6891..6b8a211e5d 100644
--- a/src/lib/libcrypto/x509v3/tabtest.c
+++ b/src/lib/libcrypto/x509v3/tabtest.c
@@ -10,7 +10,7 @@
10 * are met: 10 * are met:
11 * 11 *
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 14 *
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in 16 * notice, this list of conditions and the following disclaimer in
@@ -70,19 +70,23 @@ main()
70{ 70{
71 int i, prev = -1, bad = 0; 71 int i, prev = -1, bad = 0;
72 X509V3_EXT_METHOD **tmp; 72 X509V3_EXT_METHOD **tmp;
73
73 i = sizeof(standard_exts) / sizeof(X509V3_EXT_METHOD *); 74 i = sizeof(standard_exts) / sizeof(X509V3_EXT_METHOD *);
74 if(i != STANDARD_EXTENSION_COUNT) 75 if (i != STANDARD_EXTENSION_COUNT)
75 fprintf(stderr, "Extension number invalid expecting %d\n", i); 76 fprintf(stderr, "Extension number invalid expecting %d\n", i);
76 tmp = standard_exts; 77 tmp = standard_exts;
77 for(i = 0; i < STANDARD_EXTENSION_COUNT; i++, tmp++) { 78 for (i = 0; i < STANDARD_EXTENSION_COUNT; i++, tmp++) {
78 if((*tmp)->ext_nid < prev) bad = 1; 79 if ((*tmp)->ext_nid < prev)
80 bad = 1;
79 prev = (*tmp)->ext_nid; 81 prev = (*tmp)->ext_nid;
80 82
81 } 83 }
82 if(bad) { 84 if (bad) {
83 tmp = standard_exts; 85 tmp = standard_exts;
84 fprintf(stderr, "Extensions out of order!\n"); 86 fprintf(stderr, "Extensions out of order!\n");
85 for(i = 0; i < STANDARD_EXTENSION_COUNT; i++, tmp++) 87 for (i = 0; i < STANDARD_EXTENSION_COUNT; i++, tmp++)
86 printf("%d : %s\n", (*tmp)->ext_nid, OBJ_nid2sn((*tmp)->ext_nid)); 88 printf("%d : %s\n", (*tmp)->ext_nid,
87 } else fprintf(stderr, "Order OK\n"); 89 OBJ_nid2sn((*tmp)->ext_nid));
90 } else
91 fprintf(stderr, "Order OK\n");
88} 92}