pike.git / lib / modules / SSL.pmod / https.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/https.pike:28:   #endif      #ifdef SSL3_DEBUG   #define SSL3_DEBUG_MSG(X ...) werror(X)   #else /*! SSL3_DEBUG */   #define SSL3_DEBUG_MSG(X ...)   #endif /* SSL3_DEBUG */      class MyContext   { -  inherit SSL.context; +  inherit SSL.Context;       SSL.Alert alert_factory(.Connection con,    int level, int description,    SSL.Constants.ProtocolVersion version,    string|void message)    {    if (message) {    werror("ALERT [%s: %d:%d]: %s",    SSL.Constants.fmt_version(version),    level, description, message);
pike.git/lib/modules/SSL.pmod/https.pike:132:    werror("Data: %O\n", data);    }       void con_closed()    {    exit(0, "Connection closed.\n");    }       protected void create(Stdio.File con)    { -  SSL.context ctx = MyContext(); +  SSL.Context ctx = MyContext();    // Make sure all cipher suites are available.    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();    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(); +  SSL.Context ctx = MyContext();       Crypto.Sign key;    string certificate;       string 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);