projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f778c13
)
updates.
author
Pekka Riikonen
<priikone@silcnet.org>
Tue, 26 Jun 2001 18:16:28 +0000
(18:16 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Tue, 26 Jun 2001 18:16:28 +0000
(18:16 +0000)
CHANGES
patch
|
blob
|
history
apps/irssi/src/silc/core/silc-core.c
patch
|
blob
|
history
apps/silc/silc.c
patch
|
blob
|
history
lib/Makefile.am.pre
patch
|
blob
|
history
lib/silcclient/README
patch
|
blob
|
history
lib/silcclient/client.c
patch
|
blob
|
history
lib/silcclient/client.h
patch
|
blob
|
history
lib/silcclient/protocol.c
patch
|
blob
|
history
lib/silcclient/silcapi.h
patch
|
blob
|
history
diff --git
a/CHANGES
b/CHANGES
index 362fbaaeabad6e43eb9bc171109697fd2fe81fcc..9f08f7652452c79c47b470f48f6cb5c3340c1b24 100644
(file)
--- a/
CHANGES
+++ b/
CHANGES
@@
-7,6
+7,14
@@
Tue Jun 26 19:23:07 EEST 2001 Pekka Riikonen <priikone@silcnet.org>
the SKE functions anymore, but this function is used to
set the callbacks.
the SKE functions anymore, but this function is used to
set the callbacks.
+ * Fixed the WIN32 DLL generation in lib/Makefile.am.pre.
+
+ * Added `silc_version' argument to the silc_client_alloc
+ to define the version of the application for the library.
+ The library will use the version string to compare it
+ against the remote host's (usually a server) version
+ string. Affected file lib/silcclient/silcapi.h
+
Mon Jun 25 21:42:51 EEST 2001 Pekka Riikonen <priikone@silcnet.org>
* Do not add regex.h for WIN32. The affected file
Mon Jun 25 21:42:51 EEST 2001 Pekka Riikonen <priikone@silcnet.org>
* Do not add regex.h for WIN32. The affected file
diff --git
a/apps/irssi/src/silc/core/silc-core.c
b/apps/irssi/src/silc/core/silc-core.c
index 0c80e52ac703724ae9ed1ae75349ba4e9aa35d12..d29ad5ee82a1031e4856773910cb55670ae11748 100644
(file)
--- a/
apps/irssi/src/silc/core/silc-core.c
+++ b/
apps/irssi/src/silc/core/silc-core.c
@@
-271,7
+271,7
@@
void silc_core_init_finish(void)
silc_init_userinfo();
/* Allocate SILC client */
silc_init_userinfo();
/* Allocate SILC client */
- silc_client = silc_client_alloc(&ops, NULL);
+ silc_client = silc_client_alloc(&ops, NULL
, silc_version_string
);
/* Load local config file */
silc_config = silc_client_config_alloc(SILC_CLIENT_HOME_CONFIG_FILE);
/* Load local config file */
silc_config = silc_client_config_alloc(SILC_CLIENT_HOME_CONFIG_FILE);
diff --git
a/apps/silc/silc.c
b/apps/silc/silc.c
index 40d16d7365d7eef1615a336498fce5c65d99dfd2..47f39dd983e9b8f40a07c206bb30dd668c6204f0 100644
(file)
--- a/
apps/silc/silc.c
+++ b/
apps/silc/silc.c
@@
-275,7
+275,7
@@
SILC Secure Internet Live Conferencing, version %s\n",
app = silc_calloc(1, sizeof(*app));
/* Allocate new client */
app = silc_calloc(1, sizeof(*app));
/* Allocate new client */
- app->client = silc = silc_client_alloc(&ops, app);
+ app->client = silc = silc_client_alloc(&ops, app
, silc_version_string
);
if (!silc)
goto fail;
if (!silc)
goto fail;
diff --git
a/lib/Makefile.am.pre
b/lib/Makefile.am.pre
index 0b553b69a08c7e9f48c6308905e0d548d8f67db4..6201f9751b2a1a4a624f57d2df56b169ccae09b4 100644
(file)
--- a/
lib/Makefile.am.pre
+++ b/
lib/Makefile.am.pre
@@
-75,13
+75,13
@@
if SILC_DIST_WIN32DLL
# WIN32 DLL generation
silc.dll: libsilc.a
dllwrap --export-all --output-def silc.def \
# WIN32 DLL generation
silc.dll: libsilc.a
dllwrap --export-all --output-def silc.def \
- --implib
lib
silc.a --driver-name $(CC) --target i386-mingw32 \
- -
-
mno-cygwin -o silc.dll libsilc.a -lwsock32
+ --implib silc.a --driver-name $(CC) --target i386-mingw32 \
+ -mno-cygwin -o silc.dll libsilc.a -lwsock32
silcclient.dll: libsilcclient.a
dllwrap --export-all --output-def silcclient.def \
silcclient.dll: libsilcclient.a
dllwrap --export-all --output-def silcclient.def \
- --implib
lib
silcclient.a --driver-name $(CC) --target i386-mingw32 \
- -
-mno-cygwin -o silcclient.dll libsilcclient.a
+ --implib silcclient.a --driver-name $(CC) --target i386-mingw32 \
+ -
mno-cygwin -o silcclient.dll libsilcclient.a -L. -lsilc -lwsock32
endif
libsilc.a:
endif
libsilc.a:
diff --git
a/lib/silcclient/README
b/lib/silcclient/README
index 499298dbf9e8ce227046c144ac0892dc7e4fc086..cd2801b39e4e202ab0be35d8e8eccd0c510fc504 100644
(file)
--- a/
lib/silcclient/README
+++ b/
lib/silcclient/README
@@
-30,7
+30,7
@@
needed per application.
The client object is SilcClient which is usually allocated in following
manner:
The client object is SilcClient which is usually allocated in following
manner:
- SilcClient client = silc_client_alloc(&ops, context);
+ SilcClient client = silc_client_alloc(&ops, context
, version
);
`ops' is the static structure of client operations that library will call.
`context' can be some application specific context that will be saved into
`ops' is the static structure of client operations that library will call.
`context' can be some application specific context that will be saved into
diff --git
a/lib/silcclient/client.c
b/lib/silcclient/client.c
index 4cd047fdf71337e8075674edb23b2cc5f9808a9b..b79fc7891d5c29c95d9c0f3bfbcd1a285bfc659e 100644
(file)
--- a/
lib/silcclient/client.c
+++ b/
lib/silcclient/client.c
@@
-40,13
+40,15
@@
static void silc_client_packet_parse_type(SilcClient client,
the client. The `application' is application specific user data pointer
and caller must free it. */
the client. The `application' is application specific user data pointer
and caller must free it. */
-SilcClient silc_client_alloc(SilcClientOperations *ops, void *application)
+SilcClient silc_client_alloc(SilcClientOperations *ops, void *application,
+ const char *silc_version)
{
SilcClient new_client;
new_client = silc_calloc(1, sizeof(*new_client));
new_client->application = application;
new_client->ops = ops;
{
SilcClient new_client;
new_client = silc_calloc(1, sizeof(*new_client));
new_client->application = application;
new_client->ops = ops;
+ new_client->silc_client_version = strdup(silc_version);
return new_client;
}
return new_client;
}
diff --git
a/lib/silcclient/client.h
b/lib/silcclient/client.h
index dd27a1467a6af1b94e66463fbc2ad92f17452fe7..1a3b8565ec79f32e7d88932e53095d3041eaad70 100644
(file)
--- a/
lib/silcclient/client.h
+++ b/
lib/silcclient/client.h
@@
-186,6
+186,9
@@
struct SilcClientStruct {
/* Random Number Generator. Application should use this as its primary
random number generator. */
SilcRng rng;
/* Random Number Generator. Application should use this as its primary
random number generator. */
SilcRng rng;
+
+ /* Client version. Used to compare to remote host's version strings. */
+ char *silc_client_version;
};
/* Macros */
};
/* Macros */
diff --git
a/lib/silcclient/protocol.c
b/lib/silcclient/protocol.c
index f00982e0d2a64d88e0929e518350618f227af9a1..ff9ba038c227f5a362e6cf9f83131ed2b33ea1c3 100644
(file)
--- a/
lib/silcclient/protocol.c
+++ b/
lib/silcclient/protocol.c
@@
-29,8
+29,6
@@
SILC_TASK_CALLBACK(silc_client_protocol_connection_auth);
SILC_TASK_CALLBACK(silc_client_protocol_key_exchange);
SILC_TASK_CALLBACK(silc_client_protocol_rekey);
SILC_TASK_CALLBACK(silc_client_protocol_key_exchange);
SILC_TASK_CALLBACK(silc_client_protocol_rekey);
-extern char *silc_version_string;
-
/*
* Key Exhange protocol functions
*/
/*
* Key Exhange protocol functions
*/
@@
-195,7
+193,7
@@
SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
if (cp)
build = atoi(cp + 1);
if (cp)
build = atoi(cp + 1);
- cp =
silc_version_string
+ 9;
+ cp =
client->silc_client_version
+ 9;
if (!cp)
status = SILC_SKE_STATUS_BAD_VERSION;
if (!cp)
status = SILC_SKE_STATUS_BAD_VERSION;
@@
-320,14
+318,14
@@
SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
/* Start the key exchange by processing the received security
properties packet from initiator. */
status = silc_ske_responder_start(ske, ctx->rng, ctx->sock,
/* Start the key exchange by processing the received security
properties packet from initiator. */
status = silc_ske_responder_start(ske, ctx->rng, ctx->sock,
-
silc_version_string
,
+
client->silc_client_version
,
ctx->packet->buffer, TRUE);
} else {
SilcSKEStartPayload *start_payload;
/* Assemble security properties. */
silc_ske_assemble_security_properties(ske, SILC_SKE_SP_FLAG_NONE,
ctx->packet->buffer, TRUE);
} else {
SilcSKEStartPayload *start_payload;
/* Assemble security properties. */
silc_ske_assemble_security_properties(ske, SILC_SKE_SP_FLAG_NONE,
-
silc_version_string
,
+
client->silc_client_version
,
&start_payload);
/* Start the key exchange by sending our security properties
&start_payload);
/* Start the key exchange by sending our security properties
diff --git
a/lib/silcclient/silcapi.h
b/lib/silcclient/silcapi.h
index b84c729b533a7d98bb3d9ea69eda3176294027d9..c1f46d258fd4f01e6dc7dd3eace21ab997d90d7c 100644
(file)
--- a/
lib/silcclient/silcapi.h
+++ b/
lib/silcclient/silcapi.h
@@
-314,10
+314,13
@@
typedef struct {
* Allocates new client object. This has to be done before client may
* work. After calling this one must call silc_client_init to initialize
* the client. The `application' is application specific user data pointer
* Allocates new client object. This has to be done before client may
* work. After calling this one must call silc_client_init to initialize
* the client. The `application' is application specific user data pointer
- * and caller must free it.
+ * and caller must free it. The `silc_version' is the application version
+ * that will be used to compare against remote host's (usually a server)
+ * version string.
*
***/
*
***/
-SilcClient silc_client_alloc(SilcClientOperations *ops, void *application);
+SilcClient silc_client_alloc(SilcClientOperations *ops, void *application,
+ const char *silc_version);
/****f* silcclient/SilcClientAPI/silc_client_free
*
/****f* silcclient/SilcClientAPI/silc_client_free
*