pike.git/lib/modules/SSL.pmod/https.pike:166: Inside #if defined(HTTPS_CLIENT)
if (!con->connect(HOST, PORT)) {
werror("Failed to connect to server: %s\n", strerror(con->errno()));
return 17;
}
Client(con);
return -17;
#else
SSL.Context ctx = MyContext();
Crypto.Sign key;
- string certificate;
+
common_name = gethostname();
common_name = (gethostbyname(common_name) || ({ common_name }))[0];
werror("Common name: %O\n", common_name);
werror("Generating RSA certificate (%d bits)...\n", RSA_BITS);
key = Crypto.RSA()->generate_key(RSA_BITS);
make_certificate(ctx, key);
// Compat with OLD clients.