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"
12 #ifndef NO_WINDOWS_BRAINDEATH
13 # include "buildinf.h"
16 unsigned long OpenSSL_version_num(void)
18 return OPENSSL_VERSION_NUMBER;
21 const char *OpenSSL_version(int t)
23 if (t == OPENSSL_VERSION)
24 return OPENSSL_VERSION_TEXT;
25 if (t == OPENSSL_BUILT_ON) {
27 # ifdef OPENSSL_USE_BUILD_DATE
30 return ("built on: reproducible build, date unspecified");
33 return ("built on: date not available");
36 if (t == OPENSSL_CFLAGS) {
40 return ("compiler: information not available");
43 if (t == OPENSSL_PLATFORM) {
47 return ("platform: information not available");
50 if (t == OPENSSL_DIR) {
52 return "OPENSSLDIR: \"" OPENSSLDIR "\"";
54 return "OPENSSLDIR: N/A";
57 if (t == OPENSSL_ENGINES_DIR) {
59 return "ENGINESDIR: \"" ENGINESDIR "\"";
61 return "ENGINESDIR: N/A";
64 return ("not available");