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"
14 unsigned long OpenSSL_version_num(void)
16 return OPENSSL_VERSION_NUMBER;
19 const char *OpenSSL_version(int t)
21 if (t == OPENSSL_VERSION)
22 return OPENSSL_VERSION_TEXT;
23 if (t == OPENSSL_BUILT_ON) {
25 # ifdef OPENSSL_USE_BUILD_DATE
28 return ("built on: reproducible build, date unspecified");
31 return ("built on: date not available");
34 if (t == OPENSSL_CFLAGS) {
38 return ("compiler: information not available");
41 if (t == OPENSSL_PLATFORM) {
45 return ("platform: information not available");
48 if (t == OPENSSL_DIR) {
50 return "OPENSSLDIR: \"" OPENSSLDIR "\"";
52 return "OPENSSLDIR: N/A";
55 if (t == OPENSSL_ENGINES_DIR) {
57 return "ENGINESDIR: \"" ENGINESDIR "\"";
59 return "ENGINESDIR: N/A";
62 return ("not available");