diff options
| author | Koichiro IWAO <meta@vmeta.jp> | 2018-04-09 19:23:41 +0900 |
|---|---|---|
| committer | Koichiro IWAO <meta@vmeta.jp> | 2018-04-10 23:58:31 +0900 |
| commit | b2b42d28f37f8553f9183b90715aa2cd511a7f7d (patch) | |
| tree | 47a517c3757b7998dbd7069b8a6a83c7df58738d /common | |
| parent | 48aafc1866131c2c4157f26c956aea622b15531b (diff) | |
| download | xrdp-proprietary-b2b42d28f37f8553f9183b90715aa2cd511a7f7d.tar.gz xrdp-proprietary-b2b42d28f37f8553f9183b90715aa2cd511a7f7d.zip | |
xrdp: add OpenSSL version to --version
While here, cleanup --help, --version, and when unknown option.
Diffstat (limited to 'common')
| -rw-r--r-- | common/ssl_calls.c | 15 | ||||
| -rw-r--r-- | common/ssl_calls.h | 2 |
2 files changed, 16 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 + +} + diff --git a/common/ssl_calls.h b/common/ssl_calls.h index dc60a23e..75b650e6 100644 --- a/common/ssl_calls.h +++ b/common/ssl_calls.h @@ -114,5 +114,7 @@ const char * ssl_get_cipher_name(const struct ssl_st *ssl); int ssl_get_protocols_from_string(const char *str, long *ssl_protocols); +const char * +get_openssl_version(); #endif |
