Mercurial > dropbear
annotate libtomcrypt/src/headers/tomcrypt_dropbear.h @ 1631:292f79307600
fix some gcc warnings (#73)
* tweak string size
fix gcc8 warnings
```
svr-agentfwd.c: In function 'bindagent':
svr-agentfwd.c:254:53: warning: '%s' directive output may be truncated writing up to 107 bytes into a region of size between 0 and 107 [-Wformat-truncation=]
snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s", path, sockfile);
^~ ~~~~~~~~
svr-agentfwd.c:254:2: note: 'snprintf' output between 2 and 216 bytes into a destination of size 108
snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s", path, sockfile);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
* cleanup signed/unsigned comparison
fix gcc8 warnings
```
scp.c: In function 'do_local_cmd':
scp.c:132:17: warning: comparison of integer expressions of different signedness: 'u_int' {aka 'unsigned int'} and 'int' [-Wsign-compare]
for (i = 0; i < a->num; i++)
^
scpmisc.c: In function 'addargs':
scpmisc.c:161:25: warning: comparison of integer expressions of different signedness: 'int' and 'u_int' {aka 'unsigned int'} [-Wsign-compare]
} else if (args->num+2 >= nalloc)
^~
scpmisc.c: In function 'replacearg':
scpmisc.c:183:12: warning: comparison of integer expressions of different signedness: 'u_int' {aka 'unsigned int'} and 'int' [-Wsign-compare]
if (which >= args->num)
^~
scpmisc.c: In function 'freeargs':
scpmisc.c:196:17: warning: comparison of integer expressions of different signedness: 'u_int' {aka 'unsigned int'} and 'int' [-Wsign-compare]
for (i = 0; i < args->num; i++)
^
```
see https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/misc.h.diff?r1=1.16&r2=1.17
author | François Perrad <francois.perrad@gadz.org> |
---|---|
date | Wed, 20 Mar 2019 15:25:15 +0100 |
parents | 8305ebe45940 |
children | 3a97f14c0235 |
rev | line source |
---|---|
1476
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
1 /* compile options depend on Dropbear options.h */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
2 #include "options.h" |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
3 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
4 /* Dropbear config */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
5 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
6 #define LTC_NOTHING |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
7 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
8 /* Use small code where possible */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
9 #if DROPBEAR_SMALL_CODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
10 #define LTC_SMALL_CODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
11 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
12 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
13 #if DROPBEAR_BLOWFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
14 #define LTC_BLOWFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
15 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
16 #if DROPBEAR_AES |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
17 #define LTC_RIJNDAEL |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
18 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
19 /* _TABLES tells it to use tables during setup, _SMALL means to use the smaller scheduled key format |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
20 * (saves 4KB of ram), _ALL_TABLES enables all tables during setup */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
21 #if DROPBEAR_TWOFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
22 #define LTC_TWOFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
23 #define LTC_TWOFISH_SMALL |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
24 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
25 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
26 #if DROPBEAR_3DES |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
27 #define LTC_DES |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
28 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
29 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
30 #if DROPBEAR_ENABLE_CTR_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
31 #define LTC_CBC_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
32 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
33 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
34 #if DROPBEAR_ENABLE_CTR_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
35 #define LTC_CTR_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
36 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
37 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
38 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
39 #if DROPBEAR_SHA512 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
40 #define LTC_SHA512 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
41 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
42 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
43 #if DROPBEAR_SHA384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
44 #define LTC_SHA384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
45 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
46 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
47 #if DROPBEAR_SHA256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
48 #define LTC_SHA256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
49 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
50 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
51 #define LTC_SHA1 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
52 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
53 #if DROPBEAR_MD5 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
54 #define LTC_MD5 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
55 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
56 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
57 /* ECC */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
58 #if DROPBEAR_ECC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
59 #define LTC_MECC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
60 #define LTM_DESC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
61 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
62 /* use Shamir's trick for point mul (speeds up signature verification) */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
63 #define LTC_ECC_SHAMIR |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
64 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
65 #if DROPBEAR_ECC_256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
66 #define LTC_ECC256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
67 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
68 #if DROPBEAR_ECC_384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
69 #define LTC_ECC384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
70 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
71 #if DROPBEAR_ECC_521 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
72 #define LTC_ECC521 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
73 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
74 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
75 #endif /* DROPBEAR_ECC */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
76 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
77 #define LTC_HMAC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
78 #define LTC_HASH_HELPERS |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
79 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
80 #define LTC_NO_TEST |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
81 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
82 #define LTC_BASE64 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
83 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
84 /* end Dropbear config */ |