:py:mod:`pylibressl.lib` ======================== .. py:module:: pylibressl.lib .. autoapi-nested-parse:: Various auxiliary routines **Intended only for internal use!** Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: pylibressl.lib.initialize_libressl pylibressl.lib.get_libressl_error pylibressl.lib.retrieve_bytes pylibressl.lib.check_status .. py:function:: initialize_libressl() .. py:function:: get_libressl_error() Report LibreSSL error w/o passing a string. Unrolls the whole error stack. .. py:function:: retrieve_bytes(cdata, size) Retrieve byte string from cdata. .. py:function:: check_status(status_code, action=None) Wrapper for status code processing. :param status_code: value, returned by LibreSSL function :param action: type of status code verification Action list: - None or 'simple': check if status_code != 1 - 'null': check if status_code is NULL - 'auth': check if status_code == 0 (authentication in GCM mode) - 'verify': return True on 1, False on 0, raise exception on other - 'bio': check if status code is positive (for BIO read/write) - callable: call it with status_code as argument