2 * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 * Simple program to check the ext_dat.h is correct and print out problems if
17 #include <openssl/x509v3.h>
23 int i, prev = -1, bad = 0;
24 X509V3_EXT_METHOD **tmp;
25 i = OSSL_NELEM(standard_exts);
26 if (i != STANDARD_EXTENSION_COUNT)
27 fprintf(stderr, "Extension number invalid expecting %d\n", i);
29 for (i = 0; i < STANDARD_EXTENSION_COUNT; i++, tmp++) {
30 if ((*tmp)->ext_nid < prev)
32 prev = (*tmp)->ext_nid;
37 fprintf(stderr, "Extensions out of order!\n");
38 for (i = 0; i < STANDARD_EXTENSION_COUNT; i++, tmp++)
39 printf("%d : %s\n", (*tmp)->ext_nid, OBJ_nid2sn((*tmp)->ext_nid));
41 fprintf(stderr, "Order OK\n");