]>
git.ipfire.org Git - thirdparty/openssl.git/blob - test/pkey_meth_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 EVP_PKEY method ordering */
15 #include <openssl/evp.h>
17 #include "test_main.h"
19 /**********************************************************************
21 * Test of EVP_PKEY_ASN1 method ordering
25 static int test_asn1_meths()
31 const EVP_PKEY_ASN1_METHOD
*ameth
;
33 for (i
= 0; i
< EVP_PKEY_asn1_get_count(); i
++) {
34 ameth
= EVP_PKEY_asn1_get0(i
);
35 EVP_PKEY_asn1_get0_info(&pkey_id
, NULL
, NULL
, NULL
, NULL
, ameth
);
42 fprintf(stderr
, "EVP_PKEY_ASN1_METHOD table out of order!\n");
43 for (i
= 0; i
< EVP_PKEY_asn1_get_count(); i
++) {
46 ameth
= EVP_PKEY_asn1_get0(i
);
47 EVP_PKEY_asn1_get0_info(&pkey_id
, NULL
, NULL
, &info
, NULL
, ameth
);
50 fprintf(stderr
, "%d : %s : %s\n", pkey_id
, OBJ_nid2ln(pkey_id
),
54 fprintf(stderr
, "Order OK\n");
62 ADD_TEST(test_asn1_meths
);