Make a variables static

- Patch from Andreas Mohr

--HG--
extra : convert_revision : de230e99968203f63995d49e9123b3ac45feab71
This commit is contained in:
Matt Johnston 2005-08-24 16:43:29 +00:00
parent 20ceb493b6
commit 71c07ed930
3 changed files with 9 additions and 13 deletions

View File

@ -33,19 +33,19 @@
{&cipher_desc, keysize, blocksize} */ {&cipher_desc, keysize, blocksize} */
#ifdef DROPBEAR_AES128_CBC #ifdef DROPBEAR_AES128_CBC
const struct dropbear_cipher dropbear_aes128 = static const struct dropbear_cipher dropbear_aes128 =
{&aes_desc, 16, 16}; {&aes_desc, 16, 16};
#endif #endif
#ifdef DROPBEAR_BLOWFISH_CBC #ifdef DROPBEAR_BLOWFISH_CBC
const struct dropbear_cipher dropbear_blowfish = static const struct dropbear_cipher dropbear_blowfish =
{&blowfish_desc, 16, 8}; {&blowfish_desc, 16, 8};
#endif #endif
#ifdef DROPBEAR_TWOFISH128_CBC #ifdef DROPBEAR_TWOFISH128_CBC
const struct dropbear_cipher dropbear_twofish128 = static const struct dropbear_cipher dropbear_twofish128 =
{&twofish_desc, 16, 16}; {&twofish_desc, 16, 16};
#endif #endif
#ifdef DROPBEAR_3DES_CBC #ifdef DROPBEAR_3DES_CBC
const struct dropbear_cipher dropbear_3des = static const struct dropbear_cipher dropbear_3des =
{&des3_desc, 24, 8}; {&des3_desc, 24, 8};
#endif #endif
@ -57,11 +57,11 @@ const struct dropbear_cipher dropbear_nocipher =
{&hash_desc, keysize, hashsize} */ {&hash_desc, keysize, hashsize} */
#ifdef DROPBEAR_SHA1_HMAC #ifdef DROPBEAR_SHA1_HMAC
const struct dropbear_hash dropbear_sha1 = static const struct dropbear_hash dropbear_sha1 =
{&sha1_desc, 20, 20}; {&sha1_desc, 20, 20};
#endif #endif
#ifdef DROPBEAR_MD5_HMAC #ifdef DROPBEAR_MD5_HMAC
const struct dropbear_hash dropbear_md5 = static const struct dropbear_hash dropbear_md5 =
{&md5_desc, 16, 16}; {&md5_desc, 16, 16};
#endif #endif

View File

@ -35,7 +35,7 @@
#include "random.h" #include "random.h"
/* diffie-hellman-group1-sha1 value for p */ /* diffie-hellman-group1-sha1 value for p */
const unsigned char dh_p_val[] = { static const unsigned char dh_p_val[] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2,
0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, 0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1,
0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6, 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6,
@ -47,8 +47,9 @@ const unsigned char dh_p_val[] = {
0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11, 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11,
0x7C, 0x4B, 0x1F, 0xE6, 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE6, 0x53, 0x81, 0x7C, 0x4B, 0x1F, 0xE6, 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE6, 0x53, 0x81,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
#define DH_P_LEN sizeof(dh_p_val)
const int DH_G_VAL = 2; static const int DH_G_VAL = 2;
static void kexinitialise(); static void kexinitialise();
void gen_new_keys(); void gen_new_keys();

5
kex.h
View File

@ -42,11 +42,6 @@ void recv_msg_kexdh_init(); /* server */
void send_msg_kexdh_init(); /* client */ void send_msg_kexdh_init(); /* client */
void recv_msg_kexdh_reply(); /* client */ void recv_msg_kexdh_reply(); /* client */
extern const unsigned char dh_p_val[];
#define DH_P_LEN 128 /* The length of the dh_p_val array */
extern const int DH_G_VAL; /* == 2 */
struct KEXState { struct KEXState {
unsigned sentkexinit : 1; /*set when we've sent/recv kexinit packet */ unsigned sentkexinit : 1; /*set when we've sent/recv kexinit packet */