I have a pre-built OpenSSL library (libssl.a and libcrypto.a) which are being used for my C++ application. I don't know the version of the OpenSSL library.
我有一个预构建的OpenSSL库(libssl)。a和libcryptoa),用于我的c++应用程序。我不知道OpenSSL库的版本。
Is there any way to get the version number from these pre-built libraries?
有没有办法从这些预构建的库中获取版本号?
5 个解决方案
#1
4
You can do this programatically by reading the following:
您可以通过阅读以下内容来编程:
OPENSSL_VERSION_NUMBER(3)
- OPENSSL_VERSION_NUMBER(3)
and
和
SSLeay_version(3)
- SSLeay_version(3)
Basically, you will need to use the following functions:
基本上,你需要使用以下功能:
SSLeay()
- SSLeay()
SSLeay_version()
- SSLeay_version()
#2
9
There is a string inside the library containing the version details called SSLEAY_VERSION - it looks like:
库中有一个字符串,其中包含名为SSLEAY_VERSION的版本细节—它看起来如下:
OpenSSL 0.9.5a 1 Apr 2000
- OpenSSL 0.9.5a 1 Apr 2000。
OpenSSL 1.0.1e-fips 11 Feb 2013
- 2013年2月11日
You can find this from the binary library using strings and grep:
您可以在二进制库中使用字符串和grep找到这个:
strings libcrypto.so | grep "^OpenSSL \S\+ [0-9]\+ \S\+ [0-9]\+"
#3
4
You can use the following:
你可使用以下资料:
strings libssl.so | grep "^OpenSSL \S\+ [0-9]\+ \S\+ [0-9]\+"
#4
1
Well the filtering may may not always work. You could do
过滤可能并不总是有效。你可以做
strings libssl.so | grep "^OpenSSL"
OpenSSLDie
OpenSSL 1.0.2n 7 Dec 2017
strings libcrypto.so | grep "^OpenSSL"
OpenSSLDie
OpenSSL_add_all_ciphers
OpenSSL_add_all_digests
OpenSSL 1.0.2n 7 Dec 2017
OpenSSL HMAC method
OpenSSL EC algorithm
OpenSSL RSA method
OpenSSL DSA method
OpenSSL ECDSA method
OpenSSL DH Method
OpenSSL X9.42 DH method
OpenSSL PKCS#3 DH method
OpenSSL ECDH method
OpenSSL 'dlfcn' shared library method
OpenSSL default
OpenSSL default user interface
OpenSSL CMAC method
#5
0
You could also use :
你也可以使用:
openssl version -a
See reference at : https://linux.die.net/man/1/version
参见参考:https://linux.die.net/man/1/version
#1
4
You can do this programatically by reading the following:
您可以通过阅读以下内容来编程:
OPENSSL_VERSION_NUMBER(3)
- OPENSSL_VERSION_NUMBER(3)
and
和
SSLeay_version(3)
- SSLeay_version(3)
Basically, you will need to use the following functions:
基本上,你需要使用以下功能:
SSLeay()
- SSLeay()
SSLeay_version()
- SSLeay_version()
#2
9
There is a string inside the library containing the version details called SSLEAY_VERSION - it looks like:
库中有一个字符串,其中包含名为SSLEAY_VERSION的版本细节—它看起来如下:
OpenSSL 0.9.5a 1 Apr 2000
- OpenSSL 0.9.5a 1 Apr 2000。
OpenSSL 1.0.1e-fips 11 Feb 2013
- 2013年2月11日
You can find this from the binary library using strings and grep:
您可以在二进制库中使用字符串和grep找到这个:
strings libcrypto.so | grep "^OpenSSL \S\+ [0-9]\+ \S\+ [0-9]\+"
#3
4
You can use the following:
你可使用以下资料:
strings libssl.so | grep "^OpenSSL \S\+ [0-9]\+ \S\+ [0-9]\+"
#4
1
Well the filtering may may not always work. You could do
过滤可能并不总是有效。你可以做
strings libssl.so | grep "^OpenSSL"
OpenSSLDie
OpenSSL 1.0.2n 7 Dec 2017
strings libcrypto.so | grep "^OpenSSL"
OpenSSLDie
OpenSSL_add_all_ciphers
OpenSSL_add_all_digests
OpenSSL 1.0.2n 7 Dec 2017
OpenSSL HMAC method
OpenSSL EC algorithm
OpenSSL RSA method
OpenSSL DSA method
OpenSSL ECDSA method
OpenSSL DH Method
OpenSSL X9.42 DH method
OpenSSL PKCS#3 DH method
OpenSSL ECDH method
OpenSSL 'dlfcn' shared library method
OpenSSL default
OpenSSL default user interface
OpenSSL CMAC method
#5
0
You could also use :
你也可以使用:
openssl version -a
See reference at : https://linux.die.net/man/1/version
参见参考:https://linux.die.net/man/1/version