2 * Copyright 1995-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 #include "internal/cryptlib.h"
15 unsigned long OpenSSL_version_num(void)
17 return OPENSSL_VERSION_NUMBER;
21 unsigned int OPENSSL_version_major(void)
23 return OPENSSL_VERSION_MAJOR;
26 unsigned int OPENSSL_version_minor(void)
28 return OPENSSL_VERSION_MINOR;
31 unsigned int OPENSSL_version_patch(void)
33 return OPENSSL_VERSION_PATCH;
36 const char *OPENSSL_version_pre_release(void)
38 return OPENSSL_VERSION_PRE_RELEASE_STR;
41 const char *OPENSSL_version_build_metadata(void)
43 return OPENSSL_VERSION_BUILD_METADATA_STR;
46 const char *OpenSSL_version(int t)
50 return OPENSSL_VERSION_TEXT;
51 case OPENSSL_VERSION_STRING:
52 return OPENSSL_VERSION_STR;
53 case OPENSSL_FULL_VERSION_STRING:
54 return OPENSSL_FULL_VERSION_STR;
55 case OPENSSL_BUILT_ON:
58 return compiler_flags;
59 case OPENSSL_PLATFORM:
63 return "OPENSSLDIR: \"" OPENSSLDIR "\"";
65 return "OPENSSLDIR: N/A";
67 case OPENSSL_ENGINES_DIR:
69 return "ENGINESDIR: \"" ENGINESDIR "\"";
71 return "ENGINESDIR: N/A";
74 return "not available";