#include <libgnomeui/gnome-window-icon.h>
#include <gnome--/client.h>
+#include "silcversion.h"
+
// Pointer to the application
SilcerApp *Silcer_App;
string package = "silcer";
SilcPrivateKey prv_key;
SilcRng rng;
unsigned char *key;
- uint32 key_len;
+ SilcUInt32 key_len;
char pkfile[256], prvfile[256];
if (!pkcs_name || !path)
static
void silc_auth_meth(SilcClient client,
SilcClientConnection conn,
- char *hostname, uint16 port,
+ char *hostname, SilcUInt16 port,
SilcGetAuthMeth completion, void *context)
{
completion(TRUE, SILC_AUTH_NONE, NULL, 0, context);
static
void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
SilcSocketType conn_type, unsigned char *pk,
- uint32 pk_len, SilcSKEPKType pk_type,
+ SilcUInt32 pk_len, SilcSKEPKType pk_type,
SilcVerifyPublicKey completion, void *context)
{
completion(TRUE, context);
silc_pkcs_register_default();
silc_hash_register_default();
silc_hmac_register_default();
+
+ // XXXXX
+ // In real application at this point it would be of course checked
+ // whether ~/.silc direectory or something exists and key pair exists.
+ // If not then some firstsetup-wizard would be lauched that creates
+ // the keypair. In our example we'll always create a key pair. :(
silc_create_key_pair("rsa", 1024, "kk", "UN=foobar, "
"HN=foo.bar.foobar.com",
&silc_client->public_key, &silc_client->private_key);
+
+ // We are ready to initialize the SILC Client library.
silc_client_init(silc_client);
- // Setup SILC scheduler as timeout task
+ // Setup SILC scheduler as timeout task. This will handle the SILC
+ // client library every 50 milliseconds. It will actually make the
+ // SILC client work on background.
Gnome::Main::timeout.connect(slot(this, &SilcerApp::silc_scheduler), 50);
// XXXXX