summaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-07 07:35:15 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-07 07:35:15 +0200
commit518630213460dc36df809bb31be2fc1ed8c938d9 (patch)
tree36f173897a698616fbb6c697a6db9ea355f476dd /manual
parent8002ccc7c85d7b1cf692619d650a126de21b4f26 (diff)
downloadgnutls-518630213460dc36df809bb31be2fc1ed8c938d9.tar.gz
doc update
Diffstat (limited to 'manual')
-rw-r--r--manual/gnutls.html47
-rw-r--r--manual/gnutls.pdfbin1254234 -> 1253380 bytes
-rw-r--r--manual/html_node/Building-the-source.html2
-rw-r--r--manual/html_node/Initialization.html21
-rw-r--r--manual/html_node/Thread-safety.html22
5 files changed, 31 insertions, 61 deletions
diff --git a/manual/gnutls.html b/manual/gnutls.html
index fe7d7591c4..1e9c29f1df 100644
--- a/manual/gnutls.html
+++ b/manual/gnutls.html
@@ -7671,16 +7671,13 @@ If, however, an object needs to be shared across threads then access must be
protected with a mutex. Read-only access to objects, for example the
credentials holding structures, is also thread-safe.
</p>
-<p>The random generator of the cryptographic back-end, is not thread safe and requires
-mutex locks which are setup by <acronym>GnuTLS</acronym>.
-Applications can either call <a href="#gnutls_005fglobal_005finit">gnutls_global_init</a> which will initialize the default
-operating system provided locks (i.e. <code>pthreads</code> on GNU/Linux and
-<code>CriticalSection</code> on Windows), or manually specify the locking system using
-the function <a href="#gnutls_005fglobal_005fset_005fmutex">gnutls_global_set_mutex</a> before calling <a href="#gnutls_005fglobal_005finit">gnutls_global_init</a>.
-Setting mutexes manually is recommended
-only for applications that have full control of the underlying libraries. If this
-is not the case, the use of the operating system defaults is recommended. An example of
-non-native thread usage is shown below.
+<p>The random generator of the cryptographic back-end, utilizes mutex locks (e.g., pthreads on GNU/Linux and CriticalSection on Windows)
+which are setup by <acronym>GnuTLS</acronym> on library initialization. Prior to version 3.3.0
+they were setup by calling <a href="#gnutls_005fglobal_005finit">gnutls_global_init</a>. On special systems
+you could manually specify the locking system using
+the function <a href="#gnutls_005fglobal_005fset_005fmutex">gnutls_global_set_mutex</a> before calling any other
+GnuTLS function. Setting mutexes manually is not recommended.
+An example of non-native thread usage is shown below.
</p>
<div class="example">
<pre class="example">#include &lt;gnutls/gnutls.h&gt;
@@ -7692,14 +7689,9 @@ int main()
*/
gnutls_global_set_mutex (mutex_init, mutex_deinit,
mutex_lock, mutex_unlock);
- gnutls_global_init();
}
</pre></div>
-<p>Note that <a href="#gnutls_005fglobal_005finit">gnutls_global_init</a> is itself not thread safe. It is also not recommended
-to initialize it on every available thread, but if need to, it should be protected using
-mutex locks.
-</p>
@@ -7803,22 +7795,15 @@ Next: <a href="#Version-check" accesskey="n" rel="next">Version check</a>, Previ
<h4 class="subsection">6.2.2 Initialization</h4>
<p>GnuTLS must be initialized before it can be used. The library is
-initialized by calling <a href="#gnutls_005fglobal_005finit">gnutls_global_init</a>. That call
-typically enables CPU-specific acceleration, performs any required
-precalculations needed, and initializes subsystems that could be
-used later (e.g., PKCS #11 &ndash; see <a href="#PKCS11-Initialization">PKCS11 Initialization</a>).
-Note that since GnuTLS 3.3.0 it is no longer required to call
-<a href="#gnutls_005fglobal_005finit">gnutls_global_init</a> in systems that support library constructors
-(i.e, ELF systems and Windows).
-</p>
-<p>The resources allocated by the initialization process can be released if the
-application no longer has a need to call GnuTLS functions, this is
-done by calling <a href="#gnutls_005fglobal_005fdeinit">gnutls_global_deinit</a>.
-</p>
-<p>In order to take advantage of the internationalization features in
-GnuTLS, such as translated error messages, the application must set
-the current locale using <code>setlocale</code> before initializing GnuTLS.
+initialized on load; prior to 3.3.0 was initialized by calling <a href="#gnutls_005fglobal_005finit">gnutls_global_init</a>.
+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.
+</p>
+<p>The resources allocated by the initialization process will be released
+on library deinitialization, or explictly by calling <a href="#gnutls_005fglobal_005fdeinit">gnutls_global_deinit</a>.
</p>
+
<hr>
<a name="Version-check"></a>
<div class="header">
@@ -7902,7 +7887,7 @@ specifying both options to <code>pkg-config</code>:
line or similar can be used to detect the presence of GnuTLS.
</p>
<div class="example">
-<pre class="example">PKG_CHECK_MODULES([LIBGNUTLS], [gnutls &gt;= 3.0.0])
+<pre class="example">PKG_CHECK_MODULES([LIBGNUTLS], [gnutls &gt;= 3.3.0])
AC_SUBST([LIBGNUTLS_CFLAGS])
AC_SUBST([LIBGNUTLS_LIBS])
diff --git a/manual/gnutls.pdf b/manual/gnutls.pdf
index 3ebfde6357..9ac09c23f5 100644
--- a/manual/gnutls.pdf
+++ b/manual/gnutls.pdf
Binary files differ
diff --git a/manual/html_node/Building-the-source.html b/manual/html_node/Building-the-source.html
index 1ad0cb188b..5297e754d3 100644
--- a/manual/html_node/Building-the-source.html
+++ b/manual/html_node/Building-the-source.html
@@ -212,7 +212,7 @@ specifying both options to <code>pkg-config</code>:
line or similar can be used to detect the presence of GnuTLS.
</p>
<div class="example">
-<pre class="example">PKG_CHECK_MODULES([LIBGNUTLS], [gnutls &gt;= 3.0.0])
+<pre class="example">PKG_CHECK_MODULES([LIBGNUTLS], [gnutls &gt;= 3.3.0])
AC_SUBST([LIBGNUTLS_CFLAGS])
AC_SUBST([LIBGNUTLS_LIBS])
diff --git a/manual/html_node/Initialization.html b/manual/html_node/Initialization.html
index 08382ffd4d..dab713f9fd 100644
--- a/manual/html_node/Initialization.html
+++ b/manual/html_node/Initialization.html
@@ -165,24 +165,17 @@ Next: <a href="Version-check.html#Version-check" accesskey="n" rel="next">Versio
<h4 class="subsection">6.2.2 Initialization</h4>
<p>GnuTLS must be initialized before it can be used. The library is
-initialized by calling <a href="Core-TLS-API.html#gnutls_005fglobal_005finit">gnutls_global_init</a>. That call
-typically enables CPU-specific acceleration, performs any required
-precalculations needed, and initializes subsystems that could be
-used later (e.g., PKCS #11 &ndash; see <a href="PKCS11-Initialization.html#PKCS11-Initialization">PKCS11 Initialization</a>).
-Note that since GnuTLS 3.3.0 it is no longer required to call
-<a href="Core-TLS-API.html#gnutls_005fglobal_005finit">gnutls_global_init</a> in systems that support library constructors
-(i.e, ELF systems and Windows).
+initialized on load; prior to 3.3.0 was initialized by calling <a href="Core-TLS-API.html#gnutls_005fglobal_005finit">gnutls_global_init</a>.
+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.
</p>
-<p>The resources allocated by the initialization process can be released if the
-application no longer has a need to call GnuTLS functions, this is
-done by calling <a href="Core-TLS-API.html#gnutls_005fglobal_005fdeinit">gnutls_global_deinit</a>.
-</p>
-<p>In order to take advantage of the internationalization features in
-GnuTLS, such as translated error messages, the application must set
-the current locale using <code>setlocale</code> before initializing GnuTLS.
+<p>The resources allocated by the initialization process will be released
+on library deinitialization, or explictly by calling <a href="Core-TLS-API.html#gnutls_005fglobal_005fdeinit">gnutls_global_deinit</a>.
</p>
+
</body>
</html>
diff --git a/manual/html_node/Thread-safety.html b/manual/html_node/Thread-safety.html
index ee0f3e9ca5..92e9087e1d 100644
--- a/manual/html_node/Thread-safety.html
+++ b/manual/html_node/Thread-safety.html
@@ -173,16 +173,13 @@ If, however, an object needs to be shared across threads then access must be
protected with a mutex. Read-only access to objects, for example the
credentials holding structures, is also thread-safe.
</p>
-<p>The random generator of the cryptographic back-end, is not thread safe and requires
-mutex locks which are setup by <acronym>GnuTLS</acronym>.
-Applications can either call <a href="Core-TLS-API.html#gnutls_005fglobal_005finit">gnutls_global_init</a> which will initialize the default
-operating system provided locks (i.e. <code>pthreads</code> on GNU/Linux and
-<code>CriticalSection</code> on Windows), or manually specify the locking system using
-the function <a href="Core-TLS-API.html#gnutls_005fglobal_005fset_005fmutex">gnutls_global_set_mutex</a> before calling <a href="Core-TLS-API.html#gnutls_005fglobal_005finit">gnutls_global_init</a>.
-Setting mutexes manually is recommended
-only for applications that have full control of the underlying libraries. If this
-is not the case, the use of the operating system defaults is recommended. An example of
-non-native thread usage is shown below.
+<p>The random generator of the cryptographic back-end, utilizes mutex locks (e.g., pthreads on GNU/Linux and CriticalSection on Windows)
+which are setup by <acronym>GnuTLS</acronym> on library initialization. Prior to version 3.3.0
+they were setup by calling <a href="Core-TLS-API.html#gnutls_005fglobal_005finit">gnutls_global_init</a>. On special systems
+you could manually specify the locking system using
+the function <a href="Core-TLS-API.html#gnutls_005fglobal_005fset_005fmutex">gnutls_global_set_mutex</a> before calling any other
+GnuTLS function. Setting mutexes manually is not recommended.
+An example of non-native thread usage is shown below.
</p>
<div class="example">
<pre class="example">#include &lt;gnutls/gnutls.h&gt;
@@ -194,14 +191,9 @@ int main()
*/
gnutls_global_set_mutex (mutex_init, mutex_deinit,
mutex_lock, mutex_unlock);
- gnutls_global_init();
}
</pre></div>
-<p>Note that <a href="Core-TLS-API.html#gnutls_005fglobal_005finit">gnutls_global_init</a> is itself not thread safe. It is also not recommended
-to initialize it on every available thread, but if need to, it should be protected using
-mutex locks.
-</p>