Next: Version check, Previous: Headers, Up: Preparation [Contents][Index]
The GnuTLS library is initialized on load; prior to 3.3.0 was initialized by calling gnutls_global_init. The initialization typically enables CPU-specific acceleration, performs any required precalculations needed, opens any required system devices (e.g., /dev/urandom on Linux) and initializes subsystems that could be used later.
The resources allocated by the initialization process will be released on library deinitialization, or explictly by calling gnutls_global_deinit.
Note that during initialization file descriptors may be kept open by GnuTLS (e.g. /dev/urandom) on library load. Applications closing all unknown file descriptors must immediately call gnutls_global_init, after that, to ensure they don’t disrupt GnuTLS’ operation.