projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added SILC Server library.
[silc.git]
/
lib
/
silccore
/
silcmessage.c
diff --git
a/lib/silccore/silcmessage.c
b/lib/silccore/silcmessage.c
index d46a4148ad66472f3d5c5633e4246cf7d046b52f..cf4ee1bf674a05783d0bcb7d053a156559552ca3 100644
(file)
--- a/
lib/silccore/silcmessage.c
+++ b/
lib/silccore/silcmessage.c
@@
-20,7
+20,7
@@
private messages. */
/* $Id$ */
private messages. */
/* $Id$ */
-#include "silc
includes
.h"
+#include "silc.h"
#include "silcmessage.h"
/******************************************************************************
#include "silcmessage.h"
/******************************************************************************
@@
-59,13
+59,13
@@
struct SilcMessagePayloadStruct {
/* Decrypts the Message Payload. The `data' is the actual Message Payload */
/* Decrypts the Message Payload. The `data' is the actual Message Payload */
-
b
ool silc_message_payload_decrypt(unsigned char *data,
+
SilcB
ool silc_message_payload_decrypt(unsigned char *data,
size_t data_len,
size_t data_len,
-
b
ool private_message,
-
b
ool static_key,
+
SilcB
ool private_message,
+
SilcB
ool static_key,
SilcCipher cipher,
SilcHmac hmac,
SilcCipher cipher,
SilcHmac hmac,
-
b
ool check_mac)
+
SilcB
ool check_mac)
{
SilcUInt32 mac_len, iv_len = 0, block_len;
SilcUInt16 len, totlen, dlen;
{
SilcUInt32 mac_len, iv_len = 0, block_len;
SilcUInt16 len, totlen, dlen;
@@
-148,8
+148,8
@@
bool silc_message_payload_decrypt(unsigned char *data,
SilcMessagePayload
silc_message_payload_parse(unsigned char *payload,
SilcUInt32 payload_len,
SilcMessagePayload
silc_message_payload_parse(unsigned char *payload,
SilcUInt32 payload_len,
-
b
ool private_message,
-
b
ool static_key,
+
SilcB
ool private_message,
+
SilcB
ool static_key,
SilcCipher cipher,
SilcHmac hmac)
{
SilcCipher cipher,
SilcHmac hmac)
{
@@
-229,7
+229,7
@@
silc_message_payload_parse(unsigned char *payload,
Payload encoding routines but application may call this too if needed.
The `true_len' is the data length which is used to create MAC out of. */
Payload encoding routines but application may call this too if needed.
The `true_len' is the data length which is used to create MAC out of. */
-
b
ool silc_message_payload_encrypt(unsigned char *data,
+
SilcB
ool silc_message_payload_encrypt(unsigned char *data,
SilcUInt32 data_len,
SilcUInt32 true_len,
unsigned char *iv,
SilcUInt32 data_len,
SilcUInt32 true_len,
unsigned char *iv,
@@
-263,8
+263,8
@@
bool silc_message_payload_encrypt(unsigned char *data,
SilcBuffer silc_message_payload_encode(SilcMessageFlags flags,
const unsigned char *data,
SilcUInt32 data_len,
SilcBuffer silc_message_payload_encode(SilcMessageFlags flags,
const unsigned char *data,
SilcUInt32 data_len,
-
b
ool generate_iv,
-
b
ool private_message,
+
SilcB
ool generate_iv,
+
SilcB
ool private_message,
SilcCipher cipher,
SilcHmac hmac,
SilcRng rng,
SilcCipher cipher,
SilcHmac hmac,
SilcRng rng,
@@
-571,7
+571,7
@@
silc_message_signed_payload_encode(const unsigned char *message_payload,
/* Sign the buffer */
/* Allocate PKCS object */
/* Sign the buffer */
/* Allocate PKCS object */
- if (!silc_pkcs_alloc(private_key->name, &pkcs)) {
+ if (!silc_pkcs_alloc(private_key->name,
SILC_PKCS_SILC,
&pkcs)) {
SILC_LOG_ERROR(("Could not allocated PKCS"));
silc_buffer_clear(sign);
silc_buffer_free(sign);
SILC_LOG_ERROR(("Could not allocated PKCS"));
silc_buffer_clear(sign);
silc_buffer_free(sign);
@@
-679,7
+679,7
@@
int silc_message_signed_verify(SilcMessageSignedPayload sig,
return ret;
/* Allocate PKCS object */
return ret;
/* Allocate PKCS object */
- if (!silc_pkcs_alloc(remote_public_key->name, &pkcs)) {
+ if (!silc_pkcs_alloc(remote_public_key->name,
SILC_PKCS_SILC,
&pkcs)) {
silc_buffer_clear(sign);
silc_buffer_free(sign);
return ret;
silc_buffer_clear(sign);
silc_buffer_free(sign);
return ret;