Apparently, there are still chances we have to deal with buggy pod2man versions.
[openssl.git] / demos / tunala / cb.c
index ac7122da4f9803ecebd328bf0be95f2b6a7a21c4..e64983896ebb443a937ba6a635783c622cc1bc61 100644 (file)
@@ -17,9 +17,9 @@ static int int_verify_depth = 10;
 
 /* 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)
@@ -129,5 +129,15 @@ void cb_ssl_verify_set_level(unsigned int level)
                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) */