** libgnutls: Added functions to parse authority key identifiers
when stored as a 'general name' and serial combo.
+** libgnutls: Added function to force explicit reinitialization
+of PKCS #11 modules. This is required on the child process after
+a fork.
+
** API and ABI modifications:
gnutls_x509_crt_get_authority_key_gn_serial: Added
gnutls_x509_crl_get_authority_key_gn_serial: Added
-
+gnutls_pkcs11_reinit: Added
* Version 3.0.12 (released 2012-01-20)
that provides a middleware to control access to resources over the
multiple users.
+Moreover PKCS #11 modules must be reinitialized on the child processes
+after a @funcintref{fork}. @acronym{GnuTLS} provides @funcref{gnutls_pkcs11_reinit}
+to be called for this purpose.
+
+@showfuncdesc{gnutls_pkcs11_reinit}
+
@node Reading objects
@subsection Reading objects
*/
int gnutls_pkcs11_init (unsigned int flags, const char *deprecated_config_file);
+int gnutls_pkcs11_reinit (void);
void gnutls_pkcs11_deinit (void);
void gnutls_pkcs11_set_token_function (gnutls_pkcs11_token_callback_t fn,
void *userdata);
gnutls_pubkey_encrypt_data;
gnutls_x509_dn_oid_name;
gnutls_session_resumption_requested;
+ gnutls_pkcs11_reinit;
+ gnutls_x509_crt_get_authority_key_gn_serial;
+ gnutls_x509_crl_get_authority_key_gn_serial;
} GNUTLS_2_12;
GNUTLS_PRIVATE {
return 0;
}
+/**
+ * gnutls_pkcs11_reinit:
+ *
+ * This function will reinitialize the PKCS 11 subsystem in gnutls.
+ * This is required by PKCS 11 when an application uses fork(). The
+ * reinitialization function must be called on the child.
+ *
+ * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
+ * negative error value.
+ *
+ * Since: 3.0.0
+ **/
+int gnutls_pkcs11_reinit (void)
+{
+ int rv;
+
+ rv = p11_kit_initialize_registered ();
+ if (rv != CKR_OK)
+ {
+ gnutls_assert ();
+ _gnutls_debug_log ("Cannot initialize registered module: %s\n",
+ p11_kit_strerror (rv));
+ return GNUTLS_E_INTERNAL_ERROR;
+ }
+
+ return 0;
+}
+
/**
* gnutls_pkcs11_deinit:
*