Mailing List Archive

Fwd: Re: [Help-gnutls] Why delay generating second and other keys?
Hello,
I forward this bug report. It seems like a bug to exit()... I don't know if
there are possible alternatives there though.

---------- Forwarded Message ----------

Subject: Re: [Help-gnutls] Why delay generating second and other keys?
Date: Wednesday 26 October 2005 22:51
From: Fran <e_agf@yahoo.es>
To: help-gnutls@gnu.org

[...]

Another question:
Libcrypt use exit() in functions.

The function

> gnutls_x509_privkey_generate (key, key_type, bits, 0)

does not return any value because libcrypt function use exit(). For this
reason a program that have this function can not known which is the problem.
For example if

> gnutls_global_init();

is not called before.

> static void *
> _gcry_secmem_malloc_internal (size_t size)
> {
> memblock_t *mb;
>
> if (!pool_okay)
> {
> log_info (_
> ("operation is not possible without initialized secure memory\n"));
> exit (2);
> <<<<<<<--------------------------------------------------------------------
>---------------------------------------------------------------- }
> if (show_warning && !suspend_warning)
> {
> show_warning = 0;
> print_warn ();
> }
>
> /* Blocks are always a multiple of 32. */
> size = ((size + 31) / 32) * 32;
>
> mb = mb_get_new ((memblock_t *) pool, size);
> if (mb)
> stats_update (size, 0);
>
> return mb ? &mb->aligned.c : NULL;
> }

_______________________________________________
Help-gnutls mailing list
Help-gnutls@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnutls

-------------------------------------------------------

--
Nikos Mavrogiannopoulos

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: Fwd: Re: [Help-gnutls] Why delay generating second and other keys? [ In reply to ]
On Thu, 27 Oct 2005 11:31:24 +0200, Nikos Mavrogiannopoulos said:

> I forward this bug report. It seems like a bug to exit()... I don't know if
> there are possible alternatives there though.

There is no point in continuing at that point. Yes, we could use
abort() but than you may not get the error message.

Salam-Shalom,

Werner


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel