add openssl_version_number & doc openssl_version_text (#3329)
* add openssl_version_number & doc openssl_version_text
fixes #3315
* more docs + actually assert on the test...
* text
diff --git a/docs/hazmat/backends/openssl.rst b/docs/hazmat/backends/openssl.rst
index e293c06..22807f1 100644
--- a/docs/hazmat/backends/openssl.rst
+++ b/docs/hazmat/backends/openssl.rst
@@ -36,6 +36,20 @@
The string name of this backend: ``"openssl"``
+ .. method:: openssl_version_text()
+
+ :return text: The friendly string name of the loaded OpenSSL library.
+ This is not necessarily the same version as it was compiled against.
+
+ .. method:: openssl_version_number()
+
+ .. versionadded:: 1.8
+
+ :return int: The integer version of the loaded OpenSSL library. This is
+ defined in ``opensslv.h`` as ``OPENSSL_VERSION_NUMBER`` and is
+ typically shown in hexadecimal (e.g. ``0x1010003f``). This is
+ not necessarily the same version as it was compiled against.
+
.. method:: activate_osrandom_engine()
Activates the OS random engine. This will effectively disable OpenSSL's