/* This function is largely borrowed from the one used in OpenSSL's "s_client"
* and "s_server" utilities. */
-void cb_ssl_info(SSL *s, int where, int ret)
+void cb_ssl_info(const SSL *s, int where, int ret)
{
- char *str1, *str2;
+ const char *str1, *str2;
int w;
if(!fp_cb_ssl_info)
cb_ssl_verify_level = level;
}
+RSA *cb_generate_tmp_rsa(SSL *s, int is_export, int keylength)
+{
+ /* TODO: Perhaps make it so our global key can be generated on-the-fly
+ * after certain intervals? */
+ static RSA *rsa_tmp = NULL;
+ if(!rsa_tmp)
+ rsa_tmp = RSA_generate_key(keylength, RSA_F4, NULL, NULL);
+ return rsa_tmp;
+}
+
#endif /* !defined(NO_OPENSSL) */