freebsd-nq/crypto/cversion.c

45 lines
1.0 KiB
C
Raw Normal View History

2018-09-13 19:18:07 +00:00
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
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
*/
2018-09-13 19:18:07 +00:00
#include "internal/cryptlib.h"
2018-09-13 19:18:07 +00:00
#include "buildinf.h"
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:
#ifdef OPENSSLDIR
2015-03-20 15:28:40 +00:00
return "OPENSSLDIR: \"" OPENSSLDIR "\"";
#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";
#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
}