pike.git/lib/modules/SSL.pmod/https.pike:174:
{
werror("Connection closed.\n");
exit(0);
}
protected void create(Stdio.File con)
{
SSL.context ctx = SSL.context();
ctx->random = no_random()->read;
// Make sure all cipher suites are available.
- ctx->preferred_suites =
- ctx->sort_suites(indices(SSL.Constants.CIPHER_SUITES));
+ ctx->preferred_suites = ctx->get_suites(-1, 2);
werror("Starting\n");
ssl = SSL.sslfile(con, ctx, 1);
ssl->set_nonblocking(got_data, write_cb, con_closed);
}
}
int main()
{
#ifdef HTTPS_CLIENT
Stdio.File con = Stdio.File();
pike.git/lib/modules/SSL.pmod/https.pike:226:
#endif /* 0 */
#else
key = Crypto.RSA()->
set_random(Crypto.Random.random_string)->generate_key(1024);
my_certificate =
Standards.X509.make_selfsigned_certificate(key, 3600*4, ([
"organizationName" : "Test",
"commonName" : "*",
]));
#endif
- SSL3_DEBUG_MSG("Cipher suites:\n%s", fmt_cipher_suites(preferred_suites));
+
add_cert(key, ({ my_certificate }), ({ "*" }));
key = Crypto.DSA()->
set_random(Crypto.Random.random_string)->generate_key(1024, 160);
my_certificate =
Standards.X509.make_selfsigned_certificate(key, 3600*4, ([
"organizationName" : "Test",
"commonName" : "*",
]));
add_cert(key, ({ my_certificate }));
pike.git/lib/modules/SSL.pmod/https.pike:249: Inside #if constant(Crypto.ECC.Curve)
key = Crypto.ECC.SECP_521R1.ECDSA()->
set_random(Crypto.Random.random_string)->generate_key();
my_certificate =
Standards.X509.make_selfsigned_certificate(key, 3600*4, ([
"organizationName" : "Test",
"commonName" : "*",
]));
add_cert(key, ({ my_certificate }));
#endif
+ // Make sure all cipher suites are available.
+ preferred_suites = get_suites(-1, 2);
+ SSL3_DEBUG_MSG("Cipher suites:\n%s", fmt_cipher_suites(preferred_suites));
+
SSL3_DEBUG_MSG("Certs:\n%O\n", cert_pairs);
random = no_random()->read;
werror("Starting\n");
if (!bind(PORT, my_accept_callback))
{
perror("");
return 17;
}
else {
werror("Listening on port %d.\n", PORT);
return -17;
}
#endif
}