srtp msvc updates and cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1087 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b3d890ef25
commit
abda472017
|
@ -1,4 +0,0 @@
|
|||
Makefile
|
||||
config.log
|
||||
config.status
|
||||
autom4te.cache
|
|
@ -1,22 +0,0 @@
|
|||
/.cvsignore/1.2/Thu Sep 29 12:23:16 2005//
|
||||
/CHANGES/1.1.1.1/Wed Sep 21 22:51:36 2005//
|
||||
/LICENSE/1.2/Fri Sep 23 19:34:11 2005//
|
||||
/Makefile.in/1.14/Fri Mar 17 21:00:46 2006//
|
||||
/README/1.3/Sun Oct 2 12:04:37 2005//
|
||||
/TODO/1.2/Fri Sep 23 19:34:11 2005//
|
||||
/VERSION/1.2/Fri Sep 23 19:34:11 2005//
|
||||
/config.guess/1.2/Sun Oct 2 19:03:54 2005//
|
||||
/config.sub/1.2/Sun Oct 2 19:03:53 2005//
|
||||
/config_in.h/1.7/Mon Oct 3 15:24:08 2005//
|
||||
/configure/1.9/Mon Oct 3 15:23:13 2005//
|
||||
/configure.in/1.10/Mon Oct 3 15:19:02 2005//
|
||||
/install-sh/1.1.1.1/Wed Sep 21 22:51:38 2005//
|
||||
/timing/1.1.1.1/Wed Sep 21 22:51:38 2005//
|
||||
/undos.sh/1.1.1.1/Wed Sep 21 22:51:38 2005//
|
||||
/update.sh/1.1.1.1/Wed Sep 21 22:51:38 2005//
|
||||
D/crypto////
|
||||
D/doc////
|
||||
D/include////
|
||||
D/srtp////
|
||||
D/tables////
|
||||
D/test////
|
|
@ -1 +0,0 @@
|
|||
srtp
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1 +0,0 @@
|
|||
Makefile
|
|
@ -1,12 +0,0 @@
|
|||
/.cvsignore/1.1/Thu Sep 29 13:27:59 2005//
|
||||
/Makefile.in/1.5/Mon Oct 3 15:16:37 2005//
|
||||
/VERSION/1.1.1.1/Wed Sep 21 22:51:38 2005//
|
||||
D/ae_xfm////
|
||||
D/cipher////
|
||||
D/hash////
|
||||
D/include////
|
||||
D/kernel////
|
||||
D/math////
|
||||
D/replay////
|
||||
D/rng////
|
||||
D/test////
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1,2 +0,0 @@
|
|||
/xfm.c/1.2/Sun Oct 2 20:23:23 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/ae_xfm
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1,6 +0,0 @@
|
|||
/aes.c/1.8/Sat Oct 8 16:39:25 2005//
|
||||
/aes_cbc.c/1.5/Sat Oct 8 16:38:06 2005//
|
||||
/aes_icm.c/1.10/Thu Mar 16 17:11:29 2006//
|
||||
/cipher.c/1.4/Mon Oct 3 15:27:53 2005//
|
||||
/null_cipher.c/1.2/Thu Sep 29 12:36:43 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/cipher
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1358,7 +1358,7 @@ static uint32_t U4[256] = {
|
|||
|
||||
extern debug_module_t mod_aes_icm;
|
||||
|
||||
inline void
|
||||
void
|
||||
aes_expand_encryption_key(const v128_t *key,
|
||||
aes_expanded_key_t expanded_key) {
|
||||
int i;
|
||||
|
@ -1411,7 +1411,7 @@ aes_expand_encryption_key(const v128_t *key,
|
|||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
void
|
||||
aes_expand_decryption_key(const v128_t *key,
|
||||
aes_expanded_key_t expanded_key) {
|
||||
int i;
|
||||
|
|
|
@ -208,7 +208,7 @@ aes_icm_set_octet(aes_icm_ctx_t *c,
|
|||
((high32(octet_num) & 0x0f)<<(32-4)) |
|
||||
(low32(octet_num) >> 4));
|
||||
#else
|
||||
int tail_num = octet_num % 16;
|
||||
int tail_num = (int)(octet_num % 16);
|
||||
uint64_t block_num = octet_num / 16;
|
||||
#endif
|
||||
|
||||
|
@ -329,7 +329,7 @@ aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c,
|
|||
unsigned char *buf, unsigned int *enc_len,
|
||||
int forIsmacryp) {
|
||||
unsigned int bytes_to_encr = *enc_len;
|
||||
int i;
|
||||
unsigned int i;
|
||||
uint32_t *b;
|
||||
|
||||
/* check that there's enough segment left but not for ismacryp*/
|
||||
|
|
|
@ -283,7 +283,7 @@ cipher_type_self_test(const cipher_type_t *ct) {
|
|||
octet_string_hex_string(buffer, length));
|
||||
|
||||
/* copy plaintext into second buffer */
|
||||
for (i=0; i < length; i++)
|
||||
for (i=0; (unsigned int)i < length; i++)
|
||||
buffer2[i] = buffer[i];
|
||||
|
||||
/* choose a key at random */
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
/auth.c/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/hmac.c/1.5/Mon Oct 3 15:53:26 2005//
|
||||
/null_auth.c/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/sha1.c/1.5/Fri Mar 17 17:41:33 2006//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/hash
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1 +0,0 @@
|
|||
config.h
|
|
@ -1,29 +0,0 @@
|
|||
/.cvsignore/1.1/Thu Sep 29 11:59:01 2005//
|
||||
/aes.h/1.3/Sat Oct 8 16:06:05 2005//
|
||||
/aes_cbc.h/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/aes_icm.h/1.3/Fri Mar 17 21:00:46 2006//
|
||||
/alloc.h/1.3/Mon Oct 3 15:52:50 2005//
|
||||
/auth.h/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/cipher.h/1.4/Wed Nov 30 18:47:18 2005//
|
||||
/crypto.h/1.1.1.1/Wed Sep 21 22:51:39 2005//
|
||||
/crypto_kernel.h/1.2/Thu Sep 29 12:48:41 2005//
|
||||
/crypto_math.h/1.3/Mon Oct 3 16:17:23 2005//
|
||||
/crypto_types.h/1.1.1.1/Wed Sep 21 22:51:39 2005//
|
||||
/cryptoalg.h/1.2/Wed Sep 28 14:23:06 2005//
|
||||
/datatypes.h/1.11/Sat Oct 8 16:35:31 2005//
|
||||
/err.h/1.9/Tue Oct 18 15:25:46 2005//
|
||||
/gf2_8.h/1.3/Thu Sep 29 12:36:43 2005//
|
||||
/hmac.h/1.4/Mon Oct 3 14:33:59 2005//
|
||||
/integers.h/1.6/Mon Oct 3 15:36:44 2005//
|
||||
/kernel_compat.h/1.3/Tue Oct 18 15:27:35 2005//
|
||||
/key.h/1.1.1.1/Wed Sep 21 22:51:39 2005//
|
||||
/null_auth.h/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/null_cipher.h/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/prng.h/1.5/Mon Oct 3 15:52:19 2005//
|
||||
/rand_source.h/1.3/Thu Sep 29 12:48:42 2005//
|
||||
/rdb.h/1.1/Mon Sep 26 20:41:14 2005//
|
||||
/rdbx.h/1.1.1.1/Wed Sep 21 22:51:40 2005//
|
||||
/sha1.h/1.3/Mon Oct 3 14:33:59 2005//
|
||||
/stat.h/1.3/Fri Mar 17 20:51:24 2006//
|
||||
/xfm.h/1.2/Wed Sep 28 14:23:06 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/include
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -55,11 +55,11 @@
|
|||
|
||||
typedef v128_t aes_expanded_key_t[11];
|
||||
|
||||
inline void
|
||||
void
|
||||
aes_expand_encryption_key(const v128_t *key,
|
||||
aes_expanded_key_t expanded_key);
|
||||
|
||||
inline void
|
||||
void
|
||||
aes_expand_decryption_key(const v128_t *key,
|
||||
aes_expanded_key_t expanded_key);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ typedef struct {
|
|||
v128_t offset; /* initial offset value */
|
||||
v128_t keystream_buffer; /* buffers bytes of keystream */
|
||||
aes_expanded_key_t expanded_key; /* the cipher key */
|
||||
int bytes_in_buffer; /* number of unused bytes in buffer */
|
||||
unsigned int bytes_in_buffer; /* number of unused bytes in buffer */
|
||||
} aes_icm_ctx_t;
|
||||
|
||||
|
||||
|
|
|
@ -414,7 +414,7 @@ static inline uint64_t be64_to_cpu(uint64_t v) {
|
|||
v = make64(htonl(low32(v)),htonl(high32(v)));
|
||||
# else
|
||||
/* use the native 64-bit math */
|
||||
v= (be32_to_cpu(v >> 32)) | (((uint64_t)be32_to_cpu((uint32_t)v)) << 32);
|
||||
v= (be32_to_cpu((uint32_t)(v >> 32))) | (((uint64_t)be32_to_cpu((uint32_t)v)) << 32);
|
||||
# endif
|
||||
return v;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef enum {
|
|||
} key_event_t;
|
||||
|
||||
err_status_t
|
||||
key_limit_set(key_limit_t key, xtd_seq_num_t s);
|
||||
key_limit_set(key_limit_t key, const xtd_seq_num_t s);
|
||||
|
||||
err_status_t
|
||||
key_limit_clone(key_limit_t original, key_limit_t *new_key);
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
/alloc.c/1.3/Wed Oct 5 11:50:56 2005//
|
||||
/crypto_kernel.c/1.5/Fri Mar 17 20:51:24 2006//
|
||||
/err.c/1.5/Tue Oct 18 15:26:31 2005//
|
||||
/key.c/1.6/Sun Oct 2 20:33:10 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/kernel
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1,5 +0,0 @@
|
|||
/datatypes.c/1.6/Sat Oct 8 16:38:06 2005//
|
||||
/gf2_8.c/1.2/Fri Sep 23 19:34:12 2005//
|
||||
/math.c/1.5/Sat Oct 8 16:38:06 2005//
|
||||
/stat.c/1.4/Fri Mar 17 20:51:25 2006//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/math
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -352,7 +352,7 @@ stat_test_rand_source(rand_source_func_t get_rand_bytes) {
|
|||
|
||||
err_status_t
|
||||
stat_test_rand_source_with_repetition(rand_source_func_t source, unsigned num_trials) {
|
||||
int i;
|
||||
unsigned int i;
|
||||
err_status_t err = err_status_algo_fail;
|
||||
|
||||
for (i=0; i < num_trials; i++) {
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
/rdb.c/1.2/Thu Mar 16 19:13:33 2006//
|
||||
/rdbx.c/1.3/Sun Oct 2 20:35:26 2005//
|
||||
/ut_sim.c/1.2/Sun Oct 2 20:36:02 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/replay
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1,5 +0,0 @@
|
|||
/ctr_prng.c/1.4/Thu Sep 29 12:48:42 2005//
|
||||
/prng.c/1.6/Sat Oct 8 16:38:06 2005//
|
||||
/rand_linux_kernel.c/1.1/Mon Oct 3 15:29:10 2005//
|
||||
/rand_source.c/1.6/Sun Oct 2 20:22:36 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/rng
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -96,10 +96,10 @@ x917_prng_get_octet_string(uint8_t *dest, uint32_t len) {
|
|||
x917_prng.octet_count += len;
|
||||
|
||||
/* find out the time */
|
||||
t = time(NULL);
|
||||
t = (uint32_t)time(NULL);
|
||||
|
||||
/* loop until we have output enough data */
|
||||
for (i=0; i < len/16; i++) {
|
||||
for (i=0; (uint32_t)i < len/16; i++) {
|
||||
|
||||
/* exor time into state */
|
||||
x917_prng.state.v32[0] ^= t;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
aes_calc
|
||||
cipher_driver
|
||||
datatypes_driver
|
||||
env
|
||||
kernel_driver
|
||||
rand_gen
|
||||
sha1_driver
|
||||
stat_driver
|
|
@ -1,11 +0,0 @@
|
|||
/.cvsignore/1.1/Thu Sep 29 12:06:41 2005//
|
||||
/aes_calc.c/1.4/Sat Oct 8 16:23:59 2005//
|
||||
/auth_driver.c/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/cipher_driver.c/1.5/Mon Oct 3 16:29:05 2005//
|
||||
/datatypes_driver.c/1.5/Sat Oct 8 16:38:06 2005//
|
||||
/env.c/1.4/Sun Oct 2 20:40:01 2005//
|
||||
/kernel_driver.c/1.2/Sun Oct 2 20:40:29 2005//
|
||||
/rand_gen.c/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/sha1_driver.c/1.4/Fri Mar 17 17:41:33 2006//
|
||||
/stat_driver.c/1.3/Sun Oct 2 20:43:26 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/crypto/test
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1,3 +0,0 @@
|
|||
Makefile
|
||||
header.tex
|
||||
latex
|
|
@ -1,11 +0,0 @@
|
|||
/.cvsignore/1.2/Thu Sep 29 14:31:57 2005//
|
||||
/Doxyfile/1.2/Tue Sep 27 15:38:26 2005//
|
||||
/Makefile.in/1.2/Thu Sep 29 14:27:35 2005//
|
||||
/crypto_kernel.txt/1.2/Thu Sep 29 12:36:43 2005//
|
||||
/draft-irtf-cfrg-icm-00.txt/1.1.1.1/Wed Sep 21 22:51:41 2005//
|
||||
/header.template/1.1/Tue Sep 27 15:38:26 2005//
|
||||
/intro.txt/1.4/Fri Sep 30 17:30:26 2005//
|
||||
/libsrtp.pdf/1.5/Thu Jan 12 18:30:06 2006//
|
||||
/references.txt/1.1.1.1/Wed Sep 21 22:51:44 2005//
|
||||
/rfc3711.txt/1.1.1.1/Wed Sep 21 22:51:45 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/doc
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1,4 +0,0 @@
|
|||
/rtp.h/1.2/Sun Oct 2 20:16:47 2005//
|
||||
/srtp.h/1.9/Wed Mar 8 20:06:12 2006//
|
||||
/ut_sim.h/1.3/Thu Mar 16 19:13:33 2006//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/include
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -50,6 +50,10 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(4)
|
||||
#endif
|
||||
|
||||
#include "crypto_kernel.h"
|
||||
#include "rdbx.h"
|
||||
#include "rdb.h"
|
||||
|
@ -893,12 +897,12 @@ srtp_install_event_handler(srtp_event_handler_func_t func);
|
|||
#ifndef WORDS_BIGENDIAN
|
||||
|
||||
typedef struct {
|
||||
unsigned cc:4; /* CSRC count */
|
||||
unsigned x:1; /* header extension flag */
|
||||
unsigned p:1; /* padding flag */
|
||||
unsigned version:2; /* protocol version */
|
||||
unsigned pt:7; /* payload type */
|
||||
unsigned m:1; /* marker bit */
|
||||
uint8_t cc:4; /* CSRC count */
|
||||
uint8_t x:1; /* header extension flag */
|
||||
uint8_t p:1; /* padding flag */
|
||||
uint8_t version:2; /* protocol version */
|
||||
uint8_t pt:7; /* payload type */
|
||||
uint8_t m:1; /* marker bit */
|
||||
uint16_t seq; /* sequence number */
|
||||
uint32_t ts; /* timestamp */
|
||||
uint32_t ssrc; /* synchronization source */
|
||||
|
@ -986,6 +990,10 @@ typedef struct {
|
|||
#define SRTCP_E_BYTE_BIT 0x80
|
||||
#define SRTCP_INDEX_MASK 0x7fffffff
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
/srtp.c/1.15/Thu Mar 9 21:17:00 2006//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/srtp
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -662,7 +662,7 @@ srtp_stream_init(srtp_stream_ctx_t *srtp,
|
|||
srtp_hdr_xtnd_t *xtn_hdr = (srtp_hdr_xtnd_t *)enc_start;
|
||||
enc_start += (ntohs(xtn_hdr->length) + 1);
|
||||
}
|
||||
enc_octet_len = *pkt_octet_len - ((enc_start - (uint32_t *)hdr) << 2);
|
||||
enc_octet_len = (unsigned int)(*pkt_octet_len - ((enc_start - (uint32_t *)hdr) << 2));
|
||||
} else {
|
||||
enc_start = NULL;
|
||||
}
|
||||
|
@ -843,7 +843,7 @@ srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
|
|||
delta = low32(est);
|
||||
#else
|
||||
est = (xtd_seq_num_t) ntohs(hdr->seq);
|
||||
delta = est;
|
||||
delta = (int)est;
|
||||
#endif
|
||||
} else {
|
||||
|
||||
|
@ -927,8 +927,7 @@ srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
|
|||
srtp_hdr_xtnd_t *xtn_hdr = (srtp_hdr_xtnd_t *)enc_start;
|
||||
enc_start += (ntohs(xtn_hdr->length) + 1);
|
||||
}
|
||||
enc_octet_len = *pkt_octet_len - tag_len
|
||||
- ((enc_start - (uint32_t *)hdr) << 2);
|
||||
enc_octet_len = (uint32_t)(*pkt_octet_len - tag_len - ((enc_start - (uint32_t *)hdr) << 2));
|
||||
} else {
|
||||
enc_start = NULL;
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
aes_tables
|
|
@ -1,3 +0,0 @@
|
|||
/.cvsignore/1.1/Thu Sep 29 12:06:41 2005//
|
||||
/aes_tables.c/1.6/Sat Oct 8 16:38:06 2005//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/tables
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
|
@ -1,12 +0,0 @@
|
|||
aes_calc
|
||||
cipher_driver
|
||||
datatypes_driver
|
||||
kernel_driver
|
||||
rand_gen
|
||||
rdbx_driver
|
||||
replay_driver
|
||||
roc_driver
|
||||
rtpw
|
||||
sha1_driver
|
||||
srtp_driver
|
||||
stat_driver
|
|
@ -1,9 +0,0 @@
|
|||
/.cvsignore/1.1/Thu Sep 29 11:59:01 2005//
|
||||
/lfsr.c/1.1.1.1/Wed Sep 21 22:51:46 2005//
|
||||
/rdbx_driver.c/1.2/Sun Oct 2 20:46:24 2005//
|
||||
/replay_driver.c/1.3/Thu Sep 29 12:48:42 2005//
|
||||
/roc_driver.c/1.2/Thu Sep 29 12:48:42 2005//
|
||||
/rtp.c/1.5/Thu Oct 6 14:28:00 2005//
|
||||
/rtpw.c/1.8/Thu Jan 12 17:56:02 2006//
|
||||
/srtp_driver.c/1.6/Fri Feb 3 19:43:59 2006//
|
||||
D
|
|
@ -1 +0,0 @@
|
|||
srtp/test
|
|
@ -1 +0,0 @@
|
|||
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/srtp
|
Loading…
Reference in New Issue