diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/tabtest.c')
| -rw-r--r-- | src/lib/libcrypto/x509v3/tabtest.c | 22 | 
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 | } | 
