]>
git.ipfire.org Git - thirdparty/openssl.git/blob - test/pkey_meth_test.c
adff232304b2ea4e479340588849eb5519fc2e48
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>
18 /**********************************************************************
20 * Test of EVP_PKEY_ASN1 method ordering
24 static int test_asn1_meths()
30 const EVP_PKEY_ASN1_METHOD
*ameth
;
32 for (i
= 0; i
< EVP_PKEY_asn1_get_count(); i
++) {
33 ameth
= EVP_PKEY_asn1_get0(i
);
34 EVP_PKEY_asn1_get0_info(&pkey_id
, NULL
, NULL
, NULL
, NULL
, ameth
);
41 TEST_error("EVP_PKEY_ASN1_METHOD table out of order");
42 for (i
= 0; i
< EVP_PKEY_asn1_get_count(); i
++) {
45 ameth
= EVP_PKEY_asn1_get0(i
);
46 EVP_PKEY_asn1_get0_info(&pkey_id
, NULL
, NULL
, &info
, NULL
, ameth
);
49 fprintf(stderr
, "%d : %s : %s\n", pkey_id
, OBJ_nid2ln(pkey_id
),
53 fprintf(stderr
, "Order OK\n");
61 ADD_TEST(test_asn1_meths
);