Marek Marcola wrote:
SSL protocol differs in server_key_exchange packet
(with may be used not only for export restriction).
This requires temporary RSA key in context.
If you add to server initialization routine something like:
RSA *rsa;
rsa=RSA_generate_key(512,RSA_F4,NULL,NULL);
if (!SSL_CTX_set_tmp_rsa(SSL_context,rsa)){
ExitPostmaster(1);
}
RSA_free(rsa);
your code will work.
Just to confirm my understanding of this is also correct. Is it
possible to alternatively use:
SSL_CTX_set_tmp_rsa_callback(ssl_ctx, tmp_rsa_cb);
and have my application provide the callback function "tmp_rsa_cb" as
RSA *tmp_rsa_cb(SSL *s, int export, int keylength)
Where it generates one only when necessary. To help reduce delay ?
Many applications generate a static one, can the same exact key be
re-used without any security considerations for unrelated sessions ?
Should a highly secure application generate a new one for every connection?
What guidance can be given on any middle ground being reached by maybe
generating a new one every xyz seconds of demand (new connections
requiring RSA).
Also who exactly owns the "RSA *" that is returned ? Who is responsible
for destructing it, the callback caller or callback itself. From
looking over codebases the callback function itself seems responsible
for destructing it, since the lifetime of the RSA* allows it to be
stored in a static variable re-used again.
Can the callee destruct the key if its still being used by some active
connection, (i.e. is the inheritance a copy into a new handle, like
dupe, or is it a copy of the same handle, like shared).
Sorry for all the questions but the points raised above are
under-documented IMHO.
Darryl
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]