]>
git.ipfire.org Git - thirdparty/openssl.git/blob - test/x509_internal_test.c
2 * Copyright 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
10 /* Internal tests for the x509 and x509v3 modules */
15 #include <openssl/x509.h>
16 #include <openssl/x509v3.h>
18 #include "test_main.h"
21 /**********************************************************************
27 #include "../crypto/x509v3/ext_dat.h"
28 #include "../crypto/x509v3/standard_exts.h"
30 static int test_standard_exts()
33 int prev
= -1, good
= 1;
34 const X509V3_EXT_METHOD
**tmp
;
37 for (i
= 0; i
< OSSL_NELEM(standard_exts
); i
++, tmp
++) {
38 if ((*tmp
)->ext_nid
< prev
)
40 prev
= (*tmp
)->ext_nid
;
45 TEST_error("Extensions out of order!");
46 for (i
= 0; i
< STANDARD_EXTENSION_COUNT
; i
++, tmp
++)
47 fprintf(stderr
, "%d : %s\n", (*tmp
)->ext_nid
,
48 OBJ_nid2sn((*tmp
)->ext_nid
));
50 fprintf(stderr
, "Order OK\n");
58 ADD_TEST(test_standard_exts
);