2018-09-13 19:18:07 +00:00
|
|
|
/*
|
|
|
|
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
2000-01-10 06:22:05 +00:00
|
|
|
*
|
2018-09-13 19:18:07 +00:00
|
|
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
2000-01-10 06:22:05 +00:00
|
|
|
*/
|
|
|
|
|
2018-09-13 19:18:07 +00:00
|
|
|
#include "internal/cryptlib.h"
|
2000-01-10 06:22:05 +00:00
|
|
|
|
2018-09-13 19:18:07 +00:00
|
|
|
#include "buildinf.h"
|
2000-01-10 06:22:05 +00:00
|
|
|
|
2018-09-13 19:18:07 +00:00
|
|
|
unsigned long OpenSSL_version_num(void)
|
2015-03-20 15:28:40 +00:00
|
|
|
{
|
2018-09-13 19:18:07 +00:00
|
|
|
return OPENSSL_VERSION_NUMBER;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *OpenSSL_version(int t)
|
|
|
|
{
|
|
|
|
switch (t) {
|
|
|
|
case OPENSSL_VERSION:
|
2015-03-20 15:28:40 +00:00
|
|
|
return OPENSSL_VERSION_TEXT;
|
2018-09-13 19:18:07 +00:00
|
|
|
case OPENSSL_BUILT_ON:
|
|
|
|
return DATE;
|
|
|
|
case OPENSSL_CFLAGS:
|
|
|
|
return compiler_flags;
|
|
|
|
case OPENSSL_PLATFORM:
|
|
|
|
return PLATFORM;
|
|
|
|
case OPENSSL_DIR:
|
2003-01-28 21:43:22 +00:00
|
|
|
#ifdef OPENSSLDIR
|
2015-03-20 15:28:40 +00:00
|
|
|
return "OPENSSLDIR: \"" OPENSSLDIR "\"";
|
2003-01-28 21:43:22 +00:00
|
|
|
#else
|
2015-03-20 15:28:40 +00:00
|
|
|
return "OPENSSLDIR: N/A";
|
2018-09-13 19:18:07 +00:00
|
|
|
#endif
|
|
|
|
case OPENSSL_ENGINES_DIR:
|
|
|
|
#ifdef ENGINESDIR
|
|
|
|
return "ENGINESDIR: \"" ENGINESDIR "\"";
|
|
|
|
#else
|
|
|
|
return "ENGINESDIR: N/A";
|
2000-01-10 06:22:05 +00:00
|
|
|
#endif
|
2015-03-20 15:28:40 +00:00
|
|
|
}
|
2018-09-13 19:18:07 +00:00
|
|
|
return "not available";
|
2015-03-20 15:28:40 +00:00
|
|
|
}
|