[gnutls-devel] Automatic library initialization
Nikos Mavrogiannopoulos
nmav at gnutls.org
Mon Nov 16 11:24:40 CET 2015
On Mon, Nov 16, 2015 at 11:02 AM, Tim Ruehsen <tim.ruehsen at gmx.de> wrote:
> Hi Nikos,
> after thinking a bit, ... having GNUTLS_NO_EXPLICIT_INIT is nice, but does not
> solve my issue.
> We are in a world of mixed plain-text and TLS connections. The library doesn't
> know what will be requested (TLS or plain text) - but it rushes ahead and does
> a heavyweight initialization in any case. This is IMO a bad idea (think of
> 'Green IT', embedded devices, low power apps, etc).
> I recognize the additional CPU usage when tuning my projects to less CPU
> utilization. Dynamic loading GnuTLS doesn't make sense right now. Tuning any
> other code doesn't make sense (GnuTLS load factor of ~60 in comparison to the
> rest of the code).
Is that for some specific use of gnutls (e.g., in an embedded system)
or for its generic use (i.e., in a distribution)? In a distribution
the automatic initialization helps to have users of gnutls who
couldn't otherwise use it. For example a library which has no
equivalent global_init function couldn't use gnutls easily.
> IMO, you should revert your decision and should not automatic initialize. For
> someone who badly needs that (beyond my imagination right now), a ./configure
> flag and GNUTLS_NO_EXPLICIT_INIT should do it. Maybe it should be
> GNUTLS_AUTOMATIC_INIT, defaulting to 0.
That is too late now as it would be an ABI break. However a configure
flag is certainly an easy thing to be added, but it would only solve
your problem if you target some specific systems. What is the use case
you are trying to address?
regards,
Nikos
More information about the Gnutls-devel
mailing list