+Tue Mar 5 14:37:27 EET 2002 Pekka Riikonen <priikone@silcnet.org>
+
+ * Changed all silc_[hash|hmac|cipher|pkcs]_default tables to
+ constants. Affected files in
+ lib/silccrypt/silcpkcs.[ch], silchash.[ch], silchmac.[ch] and
+ silccipher.[ch].
+
Sun Mar 3 18:37:13 EET 2002 Pekka Riikonen <priikone@silcnet.org>
* Fixed the buffer formatting and unformatting routines to
context it provides, which is delivered by SFTP libary to all
callback functions.
+ o EPOC specific additions/changes required:
+
+ o lib/silcutil/epoc routines missing or not completed.
+
+ o Rewrite the lib/silcutil/silcprotocol.[ch] not to have
+ [un]register functions, but to make it context based all the
+ way. The alloc should take as argument the protocol type and
+ its callback (not only final callback). It is not good that we
+ have now global list of registered protocols.
+
+ o Global RNG should not be allowed on EPOC, since it won't
+ work. Every function in library that calls the global RNG must
+ also take the RNG context as argument so that application can
+ provide it if it doesn't want to use global RNG.
+
+ o Think some solution to the global crypto lists in lib/silccrypt.
+ They won't work on EPOC.
+
+ o Something needs to be thought to the logging globals as well,
+ like silc_debug etc. They won't work on EPOC. Perhaps logging
+ and debugging is to be disabled on EPOC.
+
TODO in Toolkit Documentation
=============================
compression thus it must be implemented. SILC Zip API must be
defined.
- o Rewrite the lib/silcutil/silcprotocol.[ch] not to have [un]register
- functions, but to make it context based all the way. The alloc should
- take as argument the protocol type and its callback (not only
- final callback). It is not good that we have now global list of
- registered protocols.
-
o Optimizations in Libraries
o There is currently three (3) allocations per packet in the
SilcDList silc_cipher_list = NULL;
/* Static list of ciphers for silc_cipher_register_default(). */
-SilcCipherObject silc_default_ciphers[] =
+const SilcCipherObject silc_default_ciphers[] =
{
{ "aes-256-cbc", 16, 256, silc_aes_set_key,
silc_aes_set_key_with_string, silc_aes_encrypt_cbc,
int i;
for (i = 0; silc_default_ciphers[i].name; i++)
- silc_cipher_register(&(silc_default_ciphers[i]));
+ silc_cipher_register((SilcCipherObject *)&(silc_default_ciphers[i]));
return TRUE;
}
#define SILC_ALL_CIPHERS ((SilcCipherObject *)1)
/* Static list of ciphers for silc_cipher_register_default(). */
-extern DLLAPI SilcCipherObject silc_default_ciphers[];
+extern DLLAPI const SilcCipherObject silc_default_ciphers[];
/* Default cipher in the SILC protocol */
#define SILC_DEFAULT_CIPHER "aes-256-cbc"
SilcDList silc_hash_list = NULL;
/* Default hash functions for silc_hash_register_default(). */
-SilcHashObject silc_default_hash[] =
+const SilcHashObject silc_default_hash[] =
{
{ "sha1", 20, 64, silc_sha1_init, silc_sha1_update, silc_sha1_final,
silc_sha1_transform, silc_sha1_context_len },
int i;
for (i = 0; silc_default_hash[i].name; i++)
- silc_hash_register(&(silc_default_hash[i]));
+ silc_hash_register((SilcHashObject *)&(silc_default_hash[i]));
return TRUE;
}
#define SILC_ALL_HASH_FUNCTIONS ((SilcHashObject *)1)
/* Default hash functions for silc_hash_register_default(). */
-extern DLLAPI SilcHashObject silc_default_hash[];
+extern DLLAPI const SilcHashObject silc_default_hash[];
/* Default HASH function in the SILC protocol */
#define SILC_DEFAULT_HASH "sha1"
SilcDList silc_hmac_list = NULL;
/* Default hmacs for silc_hmac_register_default(). */
-SilcHmacObject silc_default_hmacs[] =
+const SilcHmacObject silc_default_hmacs[] =
{
{ "hmac-sha1-96", 12 },
{ "hmac-md5-96", 12 },
int i;
for (i = 0; silc_default_hmacs[i].name; i++)
- silc_hmac_register(&(silc_default_hmacs[i]));
+ silc_hmac_register((SilcHmacObject *)&(silc_default_hmacs[i]));
return TRUE;
}
#define SILC_ALL_HMACS ((SilcHmacObject *)1)
/* Default hmacs for silc_hmac_register_default(). */
-extern DLLAPI SilcHmacObject silc_default_hmacs[];
+extern DLLAPI const SilcHmacObject silc_default_hmacs[];
/* Default HMAC in the SILC protocol */
#define SILC_DEFAULT_HMAC "hmac-sha1-96"
SilcDList silc_pkcs_list = NULL;
/* Static list of PKCS for silc_pkcs_register_default(). */
-SilcPKCSObject silc_default_pkcs[] =
+const SilcPKCSObject silc_default_pkcs[] =
{
/* RSA with PKCS #1 (Uses directly routines from Raw RSA operations) */
{ "rsa",
int i;
for (i = 0; silc_default_pkcs[i].name; i++)
- silc_pkcs_register(&(silc_default_pkcs[i]));
+ silc_pkcs_register((SilcPKCSObject *)&(silc_default_pkcs[i]));
return TRUE;
}
#define SILC_ALL_PKCS ((SilcPKCSObject *)1)
/* Static list of PKCS for silc_pkcs_register_default(). */
-extern DLLAPI SilcPKCSObject silc_default_pkcs[];
+extern DLLAPI const SilcPKCSObject silc_default_pkcs[];
/* Default PKXS in the SILC protocol */
#define SILC_DEFAULT_PKCS "rsa"
#define DIR_SEPARATOR "/"
-struct SilcSFTPFilesystemOpsStruct silc_sftp_fs_memory;
+const struct SilcSFTPFilesystemOpsStruct silc_sftp_fs_memory;
/* Memory filesystem entry */
typedef struct MemFSEntryStruct {
fs->root->name = strdup(DIR_SEPARATOR);
filesystem = silc_calloc(1, sizeof(*filesystem));
- filesystem->fs = &silc_sftp_fs_memory;
+ filesystem->fs =
+ (struct SilcSFTPFilesystemOpsStruct *)&silc_sftp_fs_memory;
filesystem->fs_context = (void *)fs;
return filesystem;
callback_context);
}
-struct SilcSFTPFilesystemOpsStruct silc_sftp_fs_memory = {
+const struct SilcSFTPFilesystemOpsStruct silc_sftp_fs_memory = {
mem_get_handle,
mem_encode_handle,
mem_open,