9 /* #define TLS_INTERNAL
12 /* RSA *tls_tmp_rsa_cb(ssl, export, keylength)
13 /* SSL *ssl; /* unused */
17 /* This module maintains parameters for Diffie-Hellman key generation.
19 /* tls_tmp_rsa_cb() is a call-back routine for the
20 /* SSL_CTX_set_tmp_rsa_callback() function.
24 /* This software is free. You can do with it whatever you want.
25 /* The original author kindly requests that you acknowledge
26 /* the use of his software.
28 /* Originally written by:
31 /* Allgemeine Elektrotechnik
32 /* Universitaetsplatz 3-4
33 /* D-03044 Cottbus, Germany
37 /* IBM T.J. Watson Research
39 /* Yorktown Heights, NY 10598, USA
53 /* tls_tmp_rsa_cb - call-back to generate ephemeral RSA key */
55 RSA
*tls_tmp_rsa_cb(SSL
*unused_ssl
, int unused_export
, int keylength
)
59 /* Code adapted from OpenSSL apps/s_cb.c */
62 rsa_tmp
= RSA_generate_key(keylength
, RSA_F4
, NULL
, NULL
);
68 int main(int unused_argc
, char **unused_argv
)
70 tls_tmp_rsa_cb(0, 1, 512);
71 tls_tmp_rsa_cb(0, 1, 1024);
72 tls_tmp_rsa_cb(0, 1, 2048);
73 tls_tmp_rsa_cb(0, 0, 512);