1fea2d86aSMarcel Cornu /**********************************************************************
2fea2d86aSMarcel Cornu Copyright(c) 2024 Intel Corporation All rights reserved.
3fea2d86aSMarcel Cornu
4fea2d86aSMarcel Cornu Redistribution and use in source and binary forms, with or without
5fea2d86aSMarcel Cornu modification, are permitted provided that the following conditions
6fea2d86aSMarcel Cornu are met:
7fea2d86aSMarcel Cornu * Redistributions of source code must retain the above copyright
8fea2d86aSMarcel Cornu notice, this list of conditions and the following disclaimer.
9fea2d86aSMarcel Cornu * Redistributions in binary form must reproduce the above copyright
10fea2d86aSMarcel Cornu notice, this list of conditions and the following disclaimer in
11fea2d86aSMarcel Cornu the documentation and/or other materials provided with the
12fea2d86aSMarcel Cornu distribution.
13fea2d86aSMarcel Cornu * Neither the name of Intel Corporation nor the names of its
14fea2d86aSMarcel Cornu contributors may be used to endorse or promote products derived
15fea2d86aSMarcel Cornu from this software without specific prior written permission.
16fea2d86aSMarcel Cornu
17fea2d86aSMarcel Cornu THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18fea2d86aSMarcel Cornu "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19fea2d86aSMarcel Cornu LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20fea2d86aSMarcel Cornu A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21fea2d86aSMarcel Cornu OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22fea2d86aSMarcel Cornu SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23fea2d86aSMarcel Cornu LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24fea2d86aSMarcel Cornu DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25fea2d86aSMarcel Cornu THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26fea2d86aSMarcel Cornu (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27fea2d86aSMarcel Cornu OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28fea2d86aSMarcel Cornu **********************************************************************/
29fea2d86aSMarcel Cornu
30fea2d86aSMarcel Cornu #include <stdlib.h>
31fea2d86aSMarcel Cornu #include <stdio.h>
32fea2d86aSMarcel Cornu #include "isal_crypto_api.h"
33fea2d86aSMarcel Cornu
34fea2d86aSMarcel Cornu int
main(void)35fea2d86aSMarcel Cornu main(void)
36fea2d86aSMarcel Cornu {
37fea2d86aSMarcel Cornu #ifdef ISAL_CRYPTO_VERSION_STR
38fea2d86aSMarcel Cornu /* Check version number */
39*3aa2266bSPablo de Lara if (isal_crypto_get_version() < ISAL_CRYPTO_MAKE_VERSION(2, 25, 0)) {
40fea2d86aSMarcel Cornu printf("Library version detection unsupported!\n");
41fea2d86aSMarcel Cornu } else {
42fea2d86aSMarcel Cornu printf("Detected library version: %s\n", isal_crypto_get_version_str());
43fea2d86aSMarcel Cornu printf("Tool version: %s\n", ISAL_CRYPTO_VERSION_STR);
44fea2d86aSMarcel Cornu }
45fea2d86aSMarcel Cornu #else
46fea2d86aSMarcel Cornu printf("Library version detection unsupported!\n");
47fea2d86aSMarcel Cornu #endif
48fea2d86aSMarcel Cornu return 0;
49fea2d86aSMarcel Cornu }
50