summaryrefslogtreecommitdiffstats
path: root/common/ssl_calls.c
diff options
context:
space:
mode:
authormetalefty <meta@vmeta.jp>2018-04-13 14:49:26 +0900
committerGitHub <noreply@github.com>2018-04-13 14:49:26 +0900
commitf52f632e21e3206295934706ac4091c0561862fa (patch)
tree5cd243b67deb4d28d0eac49e676d596f68abfefc /common/ssl_calls.c
parent3b5b7a59351757e3983d54faf754328b44d55990 (diff)
parent2eb4be426b2b7e803bac71c8a3562301c5d0f42b (diff)
downloadxrdp-proprietary-f52f632e21e3206295934706ac4091c0561862fa.tar.gz
xrdp-proprietary-f52f632e21e3206295934706ac4091c0561862fa.zip
Merge pull request #1096 from metalefty/version_info
Show OpenSSL version to --version
Diffstat (limited to 'common/ssl_calls.c')
-rw-r--r--common/ssl_calls.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/common/ssl_calls.c b/common/ssl_calls.c
index f659a196..809ce966 100644
--- a/common/ssl_calls.c
+++ b/common/ssl_calls.c
@@ -33,6 +33,7 @@
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/dh.h>
+#include <openssl/crypto.h>
#include "os_calls.h"
#include "arch.h"
@@ -78,7 +79,7 @@ DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
return 0;
}
- if (p != NULL)
+ if (p != NULL)
{
BN_free(dh->p);
dh->p = p;
@@ -1064,3 +1065,15 @@ ssl_get_protocols_from_string(const char *str, long *ssl_protocols)
return rv;
}
+/*****************************************************************************/
+const char
+*get_openssl_version()
+{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ return SSLeay_version(SSLEAY_VERSION);
+#else
+ return OpenSSL_version(OPENSSL_VERSION);
+#endif
+
+}
+