1 /* 2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 * 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 8 */ 9 10 #include "internal/cryptlib.h" 11 12 #include "buildinf.h" 13 OpenSSL_version_num(void)14unsigned long OpenSSL_version_num(void) 15 { 16 return OPENSSL_VERSION_NUMBER; 17 } 18 OpenSSL_version(int t)19const char *OpenSSL_version(int t) 20 { 21 switch (t) { 22 case OPENSSL_VERSION: 23 return OPENSSL_VERSION_TEXT; 24 case OPENSSL_BUILT_ON: 25 return DATE; 26 case OPENSSL_CFLAGS: 27 return compiler_flags; 28 case OPENSSL_PLATFORM: 29 return PLATFORM; 30 case OPENSSL_DIR: 31 #ifdef OPENSSLDIR 32 return "OPENSSLDIR: \"" OPENSSLDIR "\""; 33 #else 34 return "OPENSSLDIR: N/A"; 35 #endif 36 case OPENSSL_ENGINES_DIR: 37 #ifdef ENGINESDIR 38 return "ENGINESDIR: \"" ENGINESDIR "\""; 39 #else 40 return "ENGINESDIR: N/A"; 41 #endif 42 } 43 return "not available"; 44 } 45