pike.git/lib/modules/SSL.pmod/https.pike:22: Inside #if undefined(HTTPS_CLIENT)
{
SSL3_DEBUG_MSG("https->create\n");
sslport::create();
}
void my_accept_callback(object f)
{
werror("Accept!\n");
conn(accept());
}
-
- protected string fmt_cipher_suites(array(int) s)
- {
- String.Buffer b = String.Buffer();
- mapping(int:string) ciphers = ([]);
- foreach([array(string)]indices(SSL.Constants), string id)
- if( has_prefix(id, "SSL_") || has_prefix(id, "TLS_") ||
- has_prefix(id, "SSL2_") )
- ciphers[SSL.Constants[id]] = id;
- foreach(s, int c)
- b->sprintf(" %-6d: %010x: %s\n",
- c, cipher_suite_sort_key(c), ciphers[c]||"unknown");
- return (string)b;
- }
+
#endif
string my_certificate = MIME.decode_base64(
"MIIBxDCCAW4CAQAwDQYJKoZIhvcNAQEEBQAwbTELMAkGA1UEBhMCREUxEzARBgNV\n"
"BAgTClRodWVyaW5nZW4xEDAOBgNVBAcTB0lsbWVuYXUxEzARBgNVBAoTClRVIEls\n"
"bWVuYXUxDDAKBgNVBAsTA1BNSTEUMBIGA1UEAxMLZGVtbyBzZXJ2ZXIwHhcNOTYw\n"
"NDMwMDUzNjU4WhcNOTYwNTMwMDUzNjU5WjBtMQswCQYDVQQGEwJERTETMBEGA1UE\n"
"CBMKVGh1ZXJpbmdlbjEQMA4GA1UEBxMHSWxtZW5hdTETMBEGA1UEChMKVFUgSWxt\n"
"ZW5hdTEMMAoGA1UECxMDUE1JMRQwEgYDVQQDEwtkZW1vIHNlcnZlcjBcMA0GCSqG\n"
"SIb3DQEBAQUAA0sAMEgCQQDBB6T7bGJhRhRSpDESxk6FKh3iKKrpn4KcDtFM0W6s\n"
pike.git/lib/modules/SSL.pmod/https.pike:249: Inside #if constant(Crypto.ECC.Curve)
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("Cipher suites:\n%s",
+ .Constants.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
}