/*
- * Generate ephemeral RSA keys.
- */
-static int generate_eph_rsa_key(SSL_CTX *ctx)
-{
- RSA *rsa;
-
- if (!SSL_CTX_need_tmp_RSA(ctx)) return 0;
-
- rsa = RSA_generate_key(512, RSA_F4, NULL, NULL);
-
- if (!SSL_CTX_set_tmp_rsa(ctx, rsa)) {
- ERROR("tls: Couldn't set ephemeral RSA key");
- return -1;
- }
-
- RSA_free(rsa);
- return 0;
-}
-
-/*
* Print debugging messages, and free data.
*
* FIXME: Write sessions to some long-term storage, so that
}
}
- if (generate_eph_rsa_key(conf->ctx) < 0) {
- goto error;
- }
-
if (conf->verify_tmp_dir) {
if (chmod(conf->verify_tmp_dir, S_IRWXU) < 0) {
ERROR("Failed changing permissions on %s: %s", conf->verify_tmp_dir, fr_syserror(errno));
}
}
- if (generate_eph_rsa_key(conf->ctx) < 0) {
- goto error;
- }
-
cf_data_add(cs, "tls-conf", conf, NULL);
return conf;