Compare commits
1228 Commits
v1.8.4-sta
...
master
Author | SHA1 | Date |
---|---|---|
|
653e4badeb | |
|
7324f26e09 | |
|
00a57ea972 | |
|
433126e7a1 | |
|
6ce4b7e970 | |
|
d64bb1591a | |
|
4a978c8331 | |
|
20a1bd2e4c | |
|
b4cef2703e | |
|
2db65f0866 | |
|
606222fbae | |
|
4ed0141389 | |
|
37e7741942 | |
|
2fcffcdaa9 | |
|
2c8f92206f | |
|
69ec896e65 | |
|
13d8cd0d65 | |
|
4e082404f1 | |
|
b33af1f94c | |
|
3153062611 | |
|
40d4a58b1c | |
|
d874e5f729 | |
|
584306bf46 | |
|
8388f229dd | |
|
f4e2e51ce4 | |
|
3a24a76de3 | |
|
f8d538f29e | |
|
842c75747a | |
|
e46b8e558f | |
|
cc6067a543 | |
|
dc6ddbc246 | |
|
dc7aa012d5 | |
|
4b12265ae5 | |
|
141ab9ecb4 | |
|
bfc465d477 | |
|
ac5a1bfd3b | |
|
dd3ea8adfe | |
|
e010f89f41 | |
|
21c8fb88d0 | |
|
3e0d758b59 | |
|
1738afc6e3 | |
|
6b729df698 | |
|
56177d461a | |
|
e7bdcb5249 | |
|
e8453f2b9a | |
|
608594f245 | |
|
fc6d4e41d8 | |
|
d7de571fdc | |
|
d2c106db53 | |
|
53356697d9 | |
|
9cf590ccd7 | |
|
815e80ec4d | |
|
666460aced | |
|
4486830fdb | |
|
f0efe043bb | |
|
8b937a4abd | |
|
caeebf6c36 | |
|
aaa0e4d2e0 | |
|
deefecc262 | |
|
20f66fe133 | |
|
676fa39f9a | |
|
00e182d22e | |
|
dd31d0a539 | |
|
e8ac56b045 | |
|
fd5295eb31 | |
|
af90f39b4a | |
|
e33c81b835 | |
|
cc369820d4 | |
|
7ab8e0101d | |
|
b677a0b419 | |
|
b5adc93e2b | |
|
7cacbd1489 | |
|
165100a0d2 | |
|
229abab99f | |
|
e79bdf333c | |
|
57769cffda | |
|
5c7d7194d5 | |
|
82b8fa905e | |
|
133e447fb6 | |
|
8bc280e0dd | |
|
ed32e2e326 | |
|
4d73ed9fdd | |
|
92ba6f61e6 | |
|
c0ce893711 | |
|
cb0480fe84 | |
|
f9c051fc82 | |
|
6d7eca42b7 | |
|
0f3afed664 | |
|
b76b332f2f | |
|
d033ffa3d8 | |
|
220f9e8274 | |
|
a2ca7e29f5 | |
|
298980fa86 | |
|
677612d342 | |
|
e7d936b5d7 | |
|
bcafdc6783 | |
|
a987605513 | |
|
801a5a7084 | |
|
22ac14be8c | |
|
a428b61c7d | |
|
c7e6fc6c7e | |
|
b7757fbd68 | |
|
a238b27879 | |
|
7cced74119 | |
|
50534ecb43 | |
|
be8ba0d132 | |
|
9cac96b4af | |
|
3e71b468f6 | |
|
8f88dc2585 | |
|
aa3afa9062 | |
|
dbf56a9375 | |
|
cf732aba37 | |
|
089b8e4749 | |
|
85486927b3 | |
|
cd7e731cb7 | |
|
ef08470286 | |
|
b793675ef8 | |
|
a9b30951ce | |
|
767f3d37ec | |
|
9d8e1faf59 | |
|
96e0021572 | |
|
7f71924a86 | |
|
0e406d4918 | |
|
bf667a429c | |
|
dba7b72195 | |
|
bfa8964305 | |
|
fca18b63c5 | |
|
a4ff91a991 | |
|
fce7615e42 | |
|
d24f368efe | |
|
8286c85dc0 | |
|
15a955ff21 | |
|
2877e6cb17 | |
|
a53380de4f | |
|
907bcdcfea | |
|
59d076988f | |
|
4dfe1b1a73 | |
|
547a2dd413 | |
|
dd8c2a1a38 | |
|
872e78d342 | |
|
9c41441861 | |
|
ab3bdad5ab | |
|
9549352a10 | |
|
8c014b4bb6 | |
|
3aee8dd341 | |
|
486545527b | |
|
9bb25d8887 | |
|
9432743cea | |
|
bf388b907e | |
|
3a74395254 | |
|
2ca88cbfa1 | |
|
690cd8b534 | |
|
a75da35854 | |
|
87bdfd4e98 | |
|
163fe9b329 | |
|
b3d4da9c0d | |
|
85d995ff23 | |
|
eb3f2741d9 | |
|
e26a5c376e | |
|
2f6aa21bfe | |
|
962d5e1c13 | |
|
27f7e7ba9b | |
|
feb30fafcb | |
|
747039e1cd | |
|
dec895e8d3 | |
|
c32ca2195d | |
|
b0c0b42bc2 | |
|
0c02b3d54b | |
|
7d5ff93785 | |
|
260005ff07 | |
|
57463a31f8 | |
|
7a4c6a25d7 | |
|
eec676948c | |
|
14b5cebb62 | |
|
6a1bcb9dd6 | |
|
1fac0e6603 | |
|
0fa91e0fd3 | |
|
a4afb983d1 | |
|
7acddd0452 | |
|
f52690af82 | |
|
b9e2f79ca5 | |
|
de89c9d45e | |
|
c90ae37263 | |
|
00cfe0ba6d | |
|
63d60a14f8 | |
|
ebb8f101de | |
|
6a0ed51aed | |
|
729c519cb4 | |
|
1e95a19bf4 | |
|
c25837fc62 | |
|
5dc27b1201 | |
|
f7be30cc3f | |
|
695a737a89 | |
|
ac5de110c0 | |
|
e80184ce7a | |
|
cdc6e684eb | |
|
9a0bbbaaec | |
|
649fdfe042 | |
|
7f44afa546 | |
|
cad92e89d0 | |
|
5f6456b36e | |
|
615762d7b3 | |
|
a29a93f0c8 | |
|
06c1a5908c | |
|
12024b9a5d | |
|
4ee6a54d41 | |
|
8202fe1fc7 | |
|
a8e15df633 | |
![]() |
5de519d89b | |
|
31ce5cbdf8 | |
|
d4382b9b80 | |
|
cf231aef03 | |
|
743515e747 | |
|
d51ad9eeef | |
|
804f774ef1 | |
|
4d00a1304d | |
|
3f268a5099 | |
|
a2753a76ce | |
|
e7d5f25fea | |
|
eab906ee98 | |
|
297de775a3 | |
|
a0459a482f | |
|
0c57bdeed8 | |
|
c0699a793d | |
|
0c86f1fbf9 | |
|
a46b297045 | |
|
bb6a5500c3 | |
|
bcdeee1f00 | |
|
0ed65808c6 | |
|
a682d3217b | |
|
55acae7038 | |
|
7f074aecf3 | |
|
4e40956aad | |
|
f5681b64e0 | |
|
b596802f38 | |
|
a4ed0eef67 | |
|
0c0a389f67 | |
|
3c4835a9a4 | |
|
b12dac64ea | |
|
df0c205052 | |
|
c44a398e39 | |
|
7ee94cca94 | |
|
adc49fa066 | |
|
8fe1df8c28 | |
|
a48f183ee1 | |
|
618d28d392 | |
|
def2ef2a9f | |
|
7befd121d4 | |
|
141f6de2c4 | |
|
a004cd8eba | |
|
79d266d274 | |
|
0602499ccf | |
|
7a4ce45f5d | |
|
1aba369dff | |
|
ca925cc348 | |
|
181b3d6235 | |
|
0259703cb2 | |
|
773b5b5362 | |
|
36fa9eaa0e | |
|
0f7855d2f5 | |
|
a8a2b7c29a | |
|
384dbffce4 | |
|
ac60e620ba | |
|
5cc18ac595 | |
|
fb067d4001 | |
|
68cfb4e585 | |
|
0579101272 | |
|
a691b31b8e | |
|
016393fb67 | |
|
e7da893f5a | |
|
7f76d3cdcc | |
|
f1aab806af | |
|
88c0c030f8 | |
|
1c434df87a | |
|
3f387bdad0 | |
|
acc54de922 | |
|
01b97d0c2a | |
|
1d5fcfa3af | |
|
6b317359ba | |
|
f2bf7cb7e1 | |
|
d5799f37d3 | |
|
c7b911497a | |
|
09e1dbdf84 | |
|
64a9c41edc | |
|
55434ebced | |
|
402801e0a6 | |
|
2c5cdf1037 | |
|
91baa4f133 | |
|
e032d14a48 | |
|
36d9efbc64 | |
|
b125cf3da7 | |
|
357e0ccc7e | |
|
e66832c1d7 | |
|
bbea197600 | |
|
2da6cb3a51 | |
|
ce31584a6b | |
|
829ff7975b | |
|
99edadb0b1 | |
|
bc5c4bf344 | |
|
390555c53d | |
|
366342e401 | |
|
aea488167a | |
|
5fdb750922 | |
|
1474f04f53 | |
|
f3eb89121d | |
|
38390f9b88 | |
|
0dbedd31dc | |
|
72849864a3 | |
|
87c5f874e4 | |
|
01a78a4d3a | |
|
06951ea9f0 | |
|
142e8dc847 | |
|
95afed5256 | |
|
bd0c671fcc | |
|
fc045fc793 | |
|
65f4db7563 | |
|
43708ae0d6 | |
|
9b55aaae1e | |
|
dbe4dc5d12 | |
|
8122484c3d | |
|
7756557204 | |
|
2cd21cc95f | |
|
012a7dc055 | |
|
0699536382 | |
|
c1d131fd38 | |
|
167a1075fa | |
|
9745df29cd | |
|
4aee34848e | |
|
5a02070b54 | |
|
b38f844dc0 | |
|
3804198105 | |
|
600d31f29b | |
|
1418196af1 | |
|
c3aba1b20b | |
|
7dbfa63a63 | |
|
7aa110475e | |
|
fa46480c35 | |
|
b204520864 | |
|
d58a9fbe84 | |
|
bd1db368b3 | |
|
4a031b8ce5 | |
|
4aefd64add | |
|
0fdcf8b225 | |
|
d186548a53 | |
|
36ae769987 | |
|
9a9d22105c | |
|
6b71871204 | |
|
7452b64482 | |
|
4d32e29275 | |
|
c815abf0e8 | |
|
345bb4b62b | |
|
7210bfa615 | |
|
93ef15774b | |
|
bd3a8be956 | |
|
3d0186695f | |
|
bbd1accb93 | |
|
ef769d4802 | |
|
3395cca967 | |
|
2393393b88 | |
|
03c1f06878 | |
|
965cd70ba2 | |
|
d06395a6f2 | |
|
515805fc1a | |
|
00f2b1f615 | |
|
b16ad17340 | |
|
938ad34e2d | |
|
e9b82b462c | |
|
c336cfde8f | |
|
7331519b51 | |
|
69cfd14ee9 | |
|
2b2818c1a7 | |
|
0f29c7716d | |
|
8df50c734f | |
|
0ec5283506 | |
|
64a9320d61 | |
|
b477efa706 | |
|
0a1f080231 | |
|
583b2cb5ae | |
|
b373d8eda9 | |
|
8891364258 | |
|
89c6623c0e | |
|
5eac13a969 | |
|
5d0f6e6f73 | |
|
dacbfc1ee2 | |
|
64265e926f | |
|
460f5df838 | |
|
13a0359c58 | |
|
f23e8a6ad9 | |
|
7868043ac4 | |
|
a6e5e47366 | |
|
56f1232352 | |
|
b99ca80eaa | |
|
5eafd30de4 | |
|
a626f245a9 | |
|
e354d79d81 | |
|
5522d077aa | |
|
4a2f1a9b61 | |
|
b02a20bd36 | |
|
df15e76e12 | |
|
4039bc2f3d | |
|
9368845d8e | |
|
b0f0a6fa96 | |
|
787f907587 | |
|
61771d9039 | |
|
b4c1e4c239 | |
|
b93bcccf57 | |
|
6868491483 | |
|
a0af288b2b | |
|
94a280a82b | |
|
95f2a840be | |
|
21eadc9661 | |
|
722b7d6cc4 | |
|
8ab6ad64f9 | |
|
dbd10820c3 | |
|
fe0f3303d7 | |
|
81d4758c28 | |
|
db63edde69 | |
|
dc2869f48b | |
|
639415ea44 | |
|
5636e9cb40 | |
|
5d82510ee8 | |
|
a9421a9cd3 | |
|
7a2b38ad56 | |
|
2d2e92989c | |
|
6653de6450 | |
|
b3349ddfec | |
|
30c77497df | |
|
675a17d6e8 | |
|
b5c7eb45ef | |
|
0deaaad2c9 | |
|
e0051d17d8 | |
|
fb3eaa3e3c | |
|
8cd59ebee7 | |
|
e37277fe8f | |
|
f0d2459247 | |
|
b6a1b57420 | |
|
79c191ab2b | |
|
11edf04107 | |
|
af0ce63733 | |
|
a0b3124f80 | |
|
b2324f0d24 | |
|
6fb4512617 | |
|
3afa54d0da | |
|
e8d7cd3f10 | |
|
e5999f01a8 | |
|
72d1c8cd65 | |
|
c79120c049 | |
|
65fb58ebe5 | |
|
f2f9f1ec64 | |
|
d9745a737a | |
|
8335ffd5e5 | |
|
170a271737 | |
|
6e2ed1e597 | |
|
adb175df9e | |
|
55e3d52eec | |
|
13ac24821a | |
|
3d832fd728 | |
|
36ed253e12 | |
|
e2d460b779 | |
|
d8e0394a54 | |
|
8ef0668b09 | |
|
1246ec36fd | |
|
dc2d8e9661 | |
|
937326bf4f | |
|
96e8adbaae | |
|
da3876325d | |
|
9080ce451b | |
|
22e353869a | |
|
3e4de1d9c1 | |
|
3737ed634d | |
|
983b84be35 | |
|
9c6de19f17 | |
|
07a1c31fab | |
|
93a4035409 | |
|
6daa516e99 | |
|
459c136036 | |
|
14a708db33 | |
|
29723a5745 | |
|
8d9f8fa617 | |
|
210c2b70bd | |
|
8320686e0d | |
|
90f7a68695 | |
|
0ed18c6b89 | |
|
69a65e4725 | |
|
4dddbb5816 | |
|
894191d1cb | |
|
f791a482b9 | |
|
0ed9451430 | |
|
28466eea10 | |
|
1bdc95a498 | |
|
f1c570752b | |
|
70a4ece9e8 | |
|
58f6c735ff | |
|
fca05b9163 | |
|
7bb541ea91 | |
|
ccfa10f2a0 | |
|
5812030f43 | |
|
e31ebc1b22 | |
|
69ea670c1f | |
|
3600f4b255 | |
|
4ec30b6ade | |
|
452820eef7 | |
|
c685f0f231 | |
|
cf3b86341a | |
|
6c88843771 | |
|
dea143bfd7 | |
|
dcc45dd80e | |
|
7bcb74adc1 | |
|
e9f6092172 | |
|
b0e415de03 | |
|
83d0639230 | |
|
93c04bb2fa | |
|
36f3235f51 | |
|
d9d39040ae | |
|
9df4741748 | |
|
f71c68506e | |
|
a841b2858f | |
|
8dd6bc2c55 | |
|
58d8f020dc | |
|
910f1f3ac1 | |
|
f7b7c55b53 | |
|
0cd2e6bb6c | |
|
00c18b4c92 | |
|
9f15b1bcf2 | |
|
c6ff6a6de6 | |
|
0ddd38ece1 | |
|
3e3e183e75 | |
|
6dc59d14a3 | |
|
f399c8c642 | |
|
ea0717b5f5 | |
|
4e83ea7f9a | |
|
f23a2ecec3 | |
|
30bc1948c6 | |
|
bad0373bbb | |
|
7a2c3f7741 | |
|
e2f59c7475 | |
|
49210e1ea4 | |
|
1c5a95f810 | |
|
1c398dcd66 | |
|
40ee389296 | |
|
af444a6932 | |
|
8e8b38b493 | |
|
8e1a5921f6 | |
|
1e118ee8e8 | |
|
0f5cdecf51 | |
|
6c19a87f63 | |
|
b3374a07ed | |
|
b09a3985d0 | |
|
40f94c6477 | |
|
0be33c3032 | |
|
500a82824f | |
|
cd8176e69f | |
|
ae8ef7f4f2 | |
|
6074f9b648 | |
|
a3804c4915 | |
|
e4392b51b4 | |
|
d362f7ad52 | |
|
9b5e2c2da3 | |
|
e518694026 | |
|
a82b845e07 | |
|
ab40f52f4b | |
|
84fcbea34b | |
|
2f86911c87 | |
|
18ac0fe4b5 | |
|
c54424794f | |
|
929a8e133d | |
|
854a6b2a86 | |
|
d85a47ad80 | |
|
35e6693d6d | |
|
cdf37376f5 | |
|
6a70ef9efb | |
|
4afa31ac54 | |
|
acbe6d371f | |
|
5d031588b2 | |
|
0af43a2488 | |
|
3e6095fc34 | |
|
47aac5081f | |
|
acca0d7f6f | |
|
75db3a64ca | |
|
15ddd868d4 | |
|
5621846854 | |
|
a90b1bdd34 | |
|
71f2ca7c35 | |
|
b8ca2d0381 | |
|
fac5610b44 | |
|
bf1fd35237 | |
|
783fbbd84d | |
|
24b3ee547c | |
|
41f5ef2e09 | |
|
726f5e2b53 | |
|
a92e9d90f4 | |
|
79c08baf43 | |
|
0a56cdbca0 | |
|
4dedd88ab2 | |
|
b6861a7d3c | |
|
c806a5137a | |
|
cb1d116cce | |
|
c38c6bcaa2 | |
|
4afe5ddf87 | |
|
943b9a8a0a | |
|
730c065ee7 | |
|
94f8336af5 | |
|
03f9009d10 | |
|
3d835ea4aa | |
|
1b99390c96 | |
|
d4a2a055cc | |
|
5f71b47b5a | |
|
ea3e20ade1 | |
|
14a7ca0848 | |
|
51118014b1 | |
|
2c32270d49 | |
|
624a718f2d | |
|
ce3e8243a9 | |
|
be45440e84 | |
|
65172ebd60 | |
|
b8fa610f8f | |
|
ab887a4e90 | |
|
a58cdf625e | |
|
0eeb4ce240 | |
|
53ebc47ace | |
|
f203a7f49e | |
|
e65ea3c545 | |
![]() |
3794767459 | |
![]() |
b2aac6719f | |
![]() |
075d4f4758 | |
![]() |
c63dd6f4f1 | |
![]() |
9e2fbe269d | |
|
7a0bc3abb7 | |
|
5916d40053 | |
|
af8bbf2674 | |
![]() |
a381347233 | |
![]() |
73c13ab023 | |
|
443e656be2 | |
|
87820d9387 | |
|
c7c14f02dd | |
![]() |
5498836b6f | |
|
cc69299ea3 | |
|
ccfa11ca7b | |
|
b28442ee1b | |
|
4806441cb2 | |
|
55c74e9075 | |
|
4c0690dd96 | |
|
af789958f0 | |
|
5467b90982 | |
|
f928c81afc | |
|
39ccc4cbe6 | |
![]() |
2ddc81d927 | |
![]() |
dc5dc25de7 | |
|
53ee9c7803 | |
![]() |
1f3a91e74e | |
|
99188fe24b | |
![]() |
a956cad0da | |
![]() |
e88bc97e63 | |
|
f857354535 | |
|
b570e57591 | |
|
76c39aaf4e | |
|
a645e9a296 | |
![]() |
773a0081e3 | |
![]() |
8b69f9fe03 | |
![]() |
0b2dfd80e2 | |
![]() |
c7569f8af7 | |
|
b8ad9b8aba | |
![]() |
9ab77545ee | |
![]() |
f4301a7618 | |
![]() |
f299558cdf | |
![]() |
7fd6711829 | |
![]() |
b43581c2f5 | |
![]() |
bd4c214c39 | |
![]() |
642eb33446 | |
|
0b5ca57b9c | |
![]() |
a7fb1b56f6 | |
![]() |
5e19820425 | |
![]() |
9e7792e2ae | |
![]() |
42a8f69050 | |
![]() |
1734e6d7f6 | |
![]() |
6c4199b11a | |
![]() |
767188799e | |
![]() |
e6d0f40a36 | |
![]() |
129e61a33a | |
![]() |
4c04f39685 | |
![]() |
131a19d478 | |
![]() |
6c5acdd552 | |
![]() |
d81054ab6e | |
![]() |
1be86a9248 | |
![]() |
ea025f5958 | |
![]() |
6e5b340bcc | |
![]() |
451bd72b30 | |
![]() |
c16fd089f6 | |
![]() |
96627f4f07 | |
![]() |
c5e70af09a | |
![]() |
72cc7e3d89 | |
![]() |
fe818a4955 | |
![]() |
ecfa7d7d1c | |
|
9a2d61cbb5 | |
![]() |
626aa9a3e8 | |
![]() |
12ed71250a | |
![]() |
d75bdb8ec0 | |
![]() |
63a7936e9f | |
![]() |
3389a980ea | |
![]() |
a600801319 | |
![]() |
bac2999d3e | |
![]() |
921a40c684 | |
![]() |
ea1c563647 | |
![]() |
51abdc281d | |
![]() |
b9a59c014f | |
![]() |
ed05dc2b2e | |
![]() |
24987e0694 | |
![]() |
b4604b0921 | |
![]() |
3edbc00397 | |
![]() |
e396f8d55e | |
![]() |
5362dbc297 | |
![]() |
5b31036cdc | |
![]() |
625253a7e8 | |
![]() |
c605cbdbcc | |
![]() |
116a133902 | |
![]() |
e6a3a124ee | |
![]() |
786d513379 | |
![]() |
4da5c29e5f | |
![]() |
db1e05ff08 | |
![]() |
315f4c05ca | |
![]() |
c351d450ae | |
![]() |
b55fe3237a | |
![]() |
2a4382bac9 | |
![]() |
c1827bde51 | |
|
65b9d795cf | |
![]() |
1648c1d51a | |
![]() |
916b085474 | |
![]() |
b994c94a90 | |
![]() |
60d121aed3 | |
![]() |
15c83eca48 | |
![]() |
0f42f82439 | |
![]() |
b36a91a363 | |
![]() |
dc15dc6081 | |
![]() |
cfe8719982 | |
![]() |
87ff075c15 | |
![]() |
ec1d68912d | |
![]() |
cfc13f1f04 | |
![]() |
45805bbdcb | |
![]() |
06d5080b42 | |
![]() |
0e5ed7a305 | |
![]() |
be0fab1775 | |
![]() |
a3ec43999f | |
![]() |
d169555b28 | |
![]() |
b1be8227d2 | |
![]() |
30304255ea | |
![]() |
a71779647d | |
![]() |
4571f4cc6e | |
![]() |
07dad10251 | |
![]() |
28cb82bcb0 | |
![]() |
cebe7873a4 | |
![]() |
3b20310deb | |
![]() |
f5b5258f4a | |
![]() |
a8d0dfdacc | |
![]() |
71a20eedec | |
![]() |
8073db2247 | |
![]() |
6cf4f14dec | |
![]() |
f07070f7f9 | |
![]() |
5bd7e6bfe8 | |
![]() |
f30fe8775c | |
![]() |
3023f9b469 | |
![]() |
2ffd92accc | |
|
649b43c3cc | |
![]() |
d5544dc6d1 | |
![]() |
541fb2afc5 | |
![]() |
e93b203b87 | |
![]() |
6cb65ebf05 | |
![]() |
df129f139b | |
![]() |
faec8a2f84 | |
![]() |
b64512d65f | |
![]() |
1effd7bc0b | |
![]() |
531ced363c | |
![]() |
edfc7e9bbc | |
![]() |
dea4359cce | |
![]() |
b3298ad799 | |
![]() |
eb025871c4 | |
![]() |
830f6acbef | |
![]() |
d9530bf7aa | |
![]() |
d8237238b4 | |
![]() |
b77eec1f17 | |
![]() |
9240cc12df | |
![]() |
ccb02372bf | |
![]() |
cda6933f10 | |
![]() |
c68d355ce5 | |
![]() |
8bdd530d7d | |
![]() |
5af4b13611 | |
![]() |
0f2063b67f | |
![]() |
ecf4ebf50e | |
![]() |
31a64731c1 | |
![]() |
dbfb04a6ec | |
![]() |
ce8c65f8f9 | |
![]() |
8fb904285b | |
![]() |
33b81742b5 | |
![]() |
da37ccdf87 | |
![]() |
5a0465eb36 | |
![]() |
0bb94da72d | |
![]() |
0929086428 | |
![]() |
99b16334b5 | |
![]() |
2169eb679b | |
![]() |
f12bfdfedc | |
|
5a1c217b54 | |
|
49b607a729 | |
|
ff0525254d | |
|
3b19884fd4 | |
|
bbfcc5cbb3 | |
|
3d245c7255 | |
|
f51ec97b3b | |
|
2600cb303d | |
|
d61d2c0d6c | |
|
fa2b12bc63 | |
|
c20346971d | |
|
0058ae9e80 | |
|
1d5bb1ff46 | |
|
20961312e7 | |
|
843f34a830 | |
|
43948f7871 | |
|
7c89fdb6eb | |
|
7f48685411 | |
|
32f4dea7f5 | |
|
5f7e047484 | |
|
da2754d41e | |
|
98a6b0421a | |
|
087b07b335 | |
|
45580db33c | |
|
62ab8ffc4f | |
|
0953ac069b | |
|
56f7403f68 | |
|
dbdb033bcc | |
|
8d92b7ad45 | |
|
ca830f267a | |
|
9d79f9bee4 | |
|
e041af6010 | |
|
0f137543e4 | |
|
b52eb95f41 | |
|
b646b284bf | |
|
98e617a937 | |
|
b87dba52ba | |
|
857482ced7 | |
|
e608f8f081 | |
|
cc2f1146ea | |
|
b0c80b419a | |
|
0c2b89ed21 | |
|
bae51a4406 | |
|
3e6920964a | |
|
40e943d145 | |
|
762718d938 | |
|
ae8db8b125 | |
|
c556184114 | |
|
58e8e06812 | |
|
b097171c69 | |
|
3e6b6dc7b8 | |
|
823868f767 | |
|
7deb5f04f3 | |
|
46231cd35c | |
|
0290583ab9 | |
|
485540bbb4 | |
|
1c5e986dcf | |
|
f987381a0f | |
|
526fe3d453 | |
|
bb726e6deb | |
|
54632e2ceb | |
|
6784c1df66 | |
|
9732e3f9bc | |
|
17abdefd20 | |
|
f38d86aeb0 | |
|
ab566bb5a4 | |
|
1d39bbe506 | |
|
cd015482d5 | |
|
30baa8fbe1 | |
|
a73b65431b | |
|
0888b1228c | |
|
29ca4b76ac | |
|
58eb7952a6 | |
|
165bfa3dd6 | |
|
9df559598a | |
|
b5c24ec449 | |
|
fe117db525 | |
|
242f1e7e29 | |
|
876744ad2c | |
|
380e2db9aa | |
|
d7e1b79733 | |
|
53d702a7c1 | |
|
0ac88db778 | |
|
032ca5cf30 | |
|
10cabbc5a0 | |
|
c4feae3491 | |
|
07ab0850c8 | |
|
563b8c5b31 | |
|
a9f293061e | |
|
5c967781c3 | |
|
cb1b7eee50 | |
|
cc0048657e | |
|
86d6697dea | |
|
485a7fff03 | |
|
9900132176 | |
|
c0376e9e2f | |
|
513f50a9e0 | |
|
be2e3f117f | |
|
67f01e02d0 | |
|
e883660809 | |
|
78faf2712e | |
|
b8cfbdefef | |
|
c28892ea04 | |
|
338aebde95 | |
|
b7042e936d | |
|
3ce7e6add6 | |
|
ca4c734535 | |
|
db8b341dff | |
|
03447ffd64 | |
|
b3f606daee | |
|
0348ba0483 | |
|
6b3600ece0 | |
|
fedbcb0f3a | |
|
0cd45ba1ef | |
|
50dc29394e | |
|
2b3d3f9339 | |
|
926478e8dc | |
|
0cddcdca10 | |
|
f815f9840d | |
|
9ce58f1f4e | |
|
a35c567e2f | |
|
58e2ece498 | |
|
4b77e25992 | |
|
bb73b1722a | |
|
7f0f3123c5 | |
|
adf051a354 | |
|
c266b921a7 | |
|
20948522ea | |
|
8d8d4d600e | |
|
03c05af734 | |
|
37b3f63690 | |
|
ec56ac4485 | |
|
c30301e234 | |
|
5909df9ee7 | |
|
c5b83ce4c4 | |
|
c211184c23 | |
|
d45831f5ea | |
|
99473fbb9a | |
|
09935aaf6c | |
|
db70d56d01 | |
|
5a355fe68f | |
|
91f27a13a5 | |
|
f7b87e0670 | |
|
3ac4fe7723 | |
|
f90b537b01 | |
|
c6d5db77a9 | |
|
ed29889f25 | |
|
71f24c0664 | |
|
971f5bd1ed | |
|
688095d0a7 | |
|
9b14f4242a | |
|
94c3fe7979 | |
|
06c9aa73e7 | |
|
30768207b3 | |
|
191dac1193 | |
|
df58209e83 | |
|
7bcd595da4 | |
|
1a62200a56 | |
|
ab534cd292 | |
|
31680ee252 | |
|
39e0974f71 | |
|
2e4a22c440 | |
|
271418a0ba | |
|
8f17659d43 | |
|
4263fd1717 | |
|
31a7fb395c | |
|
6a5abbe3c2 | |
|
839318add6 | |
|
196fa02443 | |
|
7d3531e3c2 | |
|
f9b3969f72 | |
|
b52cadd1f7 | |
|
7c9f99a378 | |
|
15885086fa | |
|
9fbec1184e | |
|
5f3bf6ddeb | |
|
f8b7282db1 | |
|
b9d12e2197 | |
|
7161e28cf6 | |
|
e4db361d62 | |
|
e3f3b7424c | |
|
7cd4642e92 | |
|
82a4b859c3 | |
|
c297fced3d | |
|
c0e812a57a | |
|
0d404cd659 | |
|
1a536acdff | |
|
e779b2b49a | |
|
ccda3a6e4f | |
|
6a27ad617a | |
|
b46daccc29 | |
|
6bb3a921e6 | |
|
3733290442 | |
|
e86029d7ea | |
|
d95b39bb70 | |
|
c85ad6cd06 | |
|
0c0a969c5a | |
|
cd8d4107e8 | |
|
2abfd7a0d5 | |
|
c79759115b | |
|
84c8c891af | |
|
ed16db9df6 | |
|
e58bbd197f | |
|
c960bdb6db | |
|
1d2932df4f | |
|
c6cab74481 | |
|
deea23f866 | |
|
4902b8674c | |
|
7f2b25d453 | |
|
a76ae31126 | |
|
0d8bc9d7e2 | |
|
e0b4561e55 | |
|
abeedf9bcc | |
|
b405f4e476 | |
|
14aa1cfd82 | |
|
5fdf50ce93 | |
|
0322cf0112 | |
|
0feb5df327 | |
|
1759afd82d | |
|
790d108a56 | |
|
d37920364d | |
|
72c394208f | |
|
eb0e5a9ecd | |
|
2a333b7fbf | |
|
680c9b4078 | |
|
fc3cc78c3e | |
|
ed17e9275d | |
|
2d9ed0d335 | |
|
2643cea67b | |
|
4b913b5599 | |
|
1499f7b27c | |
|
f35e3e5e06 | |
|
180d3e57d2 | |
|
adf34eba40 | |
|
b5a81579ed | |
|
0eff5a95be | |
|
ba55369d42 | |
|
8e6bf53233 | |
|
21d4e6a908 | |
|
f5944278ed | |
|
3d3b7ca881 | |
|
3bb833b798 | |
|
a5140aa1b9 | |
|
c27c094f9c | |
|
9799e96903 | |
|
487d8c99a1 | |
|
fd6ea65f1a | |
|
b69570ec2c | |
|
ade4b7f8a2 | |
|
2ab21aaa01 | |
|
5061f51a66 | |
|
c31f908fb2 | |
|
74d63df244 | |
|
3b92a87261 | |
|
c764e26144 | |
|
e1dc29799f | |
|
4297673387 | |
|
72b1ebcdb2 | |
|
a49de58738 | |
|
d8cd60f057 | |
|
00db51cd93 | |
|
e8145aa779 | |
|
a19ce2da96 | |
|
c79ef74392 | |
|
f0601119ab | |
|
7c12608f20 | |
|
265cc5c687 | |
|
a279348cf9 | |
|
e6ca9e417d | |
|
f2f4b05c6f | |
|
b8233fc146 | |
|
5cccac360c | |
|
24a548273e | |
|
1a7920f80d | |
|
7ce6905935 | |
|
340ee43d90 | |
|
514e2475c3 | |
|
96efe5fb73 | |
|
6a7703f229 | |
|
a18eba7520 | |
|
20a34e5abf | |
|
771d2a419b | |
|
c9bb421fb5 | |
|
2f2dd7742f | |
|
3e9815dfdd | |
|
ef9842c819 | |
|
af62174b59 | |
|
af9037276c | |
|
fa7daa48f7 | |
|
73685c3d92 | |
|
4206799ae3 | |
|
2de06b9727 | |
|
9f1e91cc76 | |
|
906fd15b4a | |
|
8d193c76b5 | |
|
0d4fd6dcef | |
|
c2372bc9a8 | |
|
cf397a0d6f | |
|
c62c4d503d | |
|
640262dfff | |
|
6b0cd35527 | |
|
b7e0473cb4 | |
|
f08f0b3f37 | |
|
492df1f3fd | |
|
b66043e000 | |
|
a59c437fd3 | |
|
1842a68a0e | |
|
e17130f060 | |
|
3048ca5fc6 | |
|
bdf5546058 | |
|
7bae07d34e | |
|
868887155d | |
|
ae590907a8 | |
|
f2a1d962bc | |
|
e01d0ce4c7 | |
|
f441c24a23 | |
|
984ca48f34 | |
|
6a7d1dd43c | |
|
47913e57b8 | |
|
02c23905d6 | |
|
dc4beba9e9 | |
|
dfc7c31d67 | |
|
020b7974df | |
|
17961501f6 | |
|
e5aae66ff7 | |
|
880864a249 | |
|
45f37c508c | |
|
e48be9099d | |
|
e65631c451 | |
|
859608424d | |
|
98610fabde | |
|
fc67cdf56e | |
|
5a34da3ce0 | |
|
99dbdc5eb3 | |
|
88c59b4ca6 | |
|
599415f047 | |
|
8b4d7abfb0 | |
|
c7dc198d82 | |
|
b5a6ae0a94 | |
|
7eefa49c77 | |
|
714b2f6440 | |
|
e05ced287c | |
|
e14ff8935b | |
|
0dd0e65e2a | |
|
b20d04d80c | |
|
3ee9ac5d49 | |
|
4ad7c7fe39 | |
|
3b98a7b785 | |
|
1f93b4a918 | |
|
d244683ac4 | |
|
dc31f395cc | |
|
55414e4581 | |
|
89851fddc3 | |
|
2b1b0640ea | |
|
92b29276d0 | |
|
1e5dfd3cb5 | |
|
dce4b382e6 | |
|
33ebe61ef2 | |
|
727fc5c220 | |
|
540882056f | |
|
743e96f277 | |
|
fd8e778b2a | |
|
719e64dc8f | |
|
235f528dd9 | |
|
2a452307cd | |
|
92a885524b | |
|
92680b2877 | |
|
82e55702ef | |
|
4be9fc1800 | |
|
d92fcd2453 | |
|
c7cd74ab5f | |
|
817f8f2bcb | |
|
c21fc4a6dd | |
|
5ea1fdc7c6 | |
|
df88faaad8 | |
|
d1396c9767 | |
|
2b9f48602c | |
|
a50ae2ad36 | |
|
fc879323bc | |
|
964f1aa093 | |
|
cb20fdcc97 | |
|
c7bf59e6c1 | |
|
bb3be59c91 | |
|
342b3d1e8d | |
|
4ad8621adc | |
|
9897711967 | |
|
091b7b98ef | |
|
f7d8ea9686 | |
|
c5d5d5cba0 | |
|
e1432f670c | |
|
04184b51ea | |
|
3ead310161 | |
|
bc24568a6f | |
|
74c48c6516 | |
|
cf1e5239cb | |
|
485469b5cd | |
|
433cfc232c | |
|
76a776ef86 | |
|
d37d3e8944 | |
|
454bf4dc5f | |
|
70bdbe2736 | |
|
cd09a36286 | |
|
38db630816 | |
|
79a61b28f4 | |
|
64dbae8918 | |
|
6c58913899 | |
|
1bb1b21f77 | |
|
25d8c5c32a | |
|
13e8047967 | |
|
c2b6b60cec | |
|
42494a72a5 | |
|
ba04f2dfc5 | |
|
10a1ae8271 | |
|
e742269ada | |
|
8f99911636 | |
|
1f78fe6f6d | |
|
8058ed06a1 | |
|
ebfe01cb3b | |
|
e2459eb1b7 | |
|
d3814cc454 | |
|
9115d5570b | |
|
e1e1199a57 | |
|
d42ea08a1d | |
|
fa9f30ff81 | |
|
d1e80c668e | |
|
fb4590c6ac | |
|
1e39a430e5 | |
|
5a03ece50b | |
|
f00f60a8fe |
|
@ -0,0 +1,9 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
|
@ -1,31 +0,0 @@
|
|||
### Operating Systems ###
|
||||
|
||||
Client: Applesoft Windy OS 10
|
||||
|
||||
Server: microOS Tiara
|
||||
|
||||
**READ ME, DELETE ME**: On Windows, hold the Windows key and press 'r', type 'winver' and hit return to get your OS version. On Mac, hit the Apple menu (top left of the screen) and check 'About this Mac'. Linux users... you know what you're using ;)
|
||||
|
||||
### Synergy Version ###
|
||||
|
||||
1.8.π
|
||||
|
||||
**READ ME, DELETE ME**: Go to the 'Help' (on Windows) or 'Synergy' (on macOS) menu and then 'About Synergy' to check your version. Verify that you are using the same version across all of your machines, and that your issue still occurs with the latest release available at https://symless.com/account/login
|
||||
|
||||
### Steps to reproduce bug ###
|
||||
|
||||
**READ ME, DELETE ME**: Try to be succinct. If your bug is intermittent, try and describe what you're doing when it happens most.
|
||||
|
||||
1. Click things.
|
||||
2. Type things.
|
||||
3. Bug occurs.
|
||||
4. ...
|
||||
5. Profit?
|
||||
|
||||
### Other info ###
|
||||
|
||||
* When did the problem start to occur? When I...
|
||||
* Is there a way to work around it? No/Yes, you can...
|
||||
* Does this bug prevent you from using Synergy entirely? Yes/No
|
||||
|
||||
Put anything else you can think of here.
|
|
@ -0,0 +1,80 @@
|
|||
name: Bug Report
|
||||
description: File a bug report (for questions, ideas & support, use the Discussions tab, or IRC for quick answers, but make sure to stay on the channel!)
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen?
|
||||
placeholder: Tell us what you see! Screenshots are also helpful - please attach to the issue (when created), rather than linking to image hosting sites.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version of Barrier are you running?
|
||||
options:
|
||||
- v2.0.0-RC1
|
||||
- v2.0.0-RC2
|
||||
- v2.0.0
|
||||
- v2.1.1
|
||||
- v2.1.2
|
||||
- v2.3.0
|
||||
- v2.3.1
|
||||
- v2.3.2-alpha
|
||||
- v2.3.2
|
||||
- v2.3.3
|
||||
- v2.3.4
|
||||
- v2.4.0
|
||||
- From Git HEAD or commit (specify below)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: git-commit-if
|
||||
attributes:
|
||||
label: Git commit hash (if applicable)
|
||||
description: "When building Barrier from Git, what commit hash did you checkout from?"
|
||||
placeholder: b0c0b42b
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: pkg-mgr-origin
|
||||
attributes:
|
||||
label: If applicable, where did you install Barrier from?
|
||||
description: This includes Snaps, Flatpaks, and self-built executables.
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: What OSes are you seeing the problem on? (Check all that apply)
|
||||
multiple: true
|
||||
options:
|
||||
- Linux
|
||||
- Windows
|
||||
- macOS
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: os-version
|
||||
attributes:
|
||||
label: What OS versions are you using?
|
||||
description: This applies to both client(s) and the server.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: misc-info
|
||||
attributes:
|
||||
label: Any other information
|
||||
description: Please enter any other information we should know, if applicable.
|
|
@ -0,0 +1 @@
|
|||
blank_issues_enabled: false
|
|
@ -0,0 +1,4 @@
|
|||
## Contributor Checklist:
|
||||
|
||||
* [ ] I have created a file in the `doc/newsfragments` directory *IF* it is a
|
||||
user-visible change (and make sure to read the `README.md` in that directory)
|
|
@ -1,14 +1,16 @@
|
|||
build_env.*
|
||||
config.h
|
||||
.DS_Store
|
||||
*.pyc
|
||||
*.o
|
||||
*~
|
||||
\.*.swp
|
||||
*build-gui-Desktop_Qt*
|
||||
/bin
|
||||
/lib
|
||||
/build
|
||||
/CMakeFiles
|
||||
/ext/cryptopp562
|
||||
/ext/gmock-1.6.0
|
||||
/ext/gtest-1.6.0
|
||||
/ext/openssl
|
||||
/src/gui/Makefile*
|
||||
/src/gui/object_script*
|
||||
|
@ -17,4 +19,16 @@ config.h
|
|||
src/gui/gui.pro.user*
|
||||
src/gui/.qmake.stash
|
||||
src/gui/.rnd
|
||||
src/setup/win32/synergy.suo
|
||||
src/setup/win32/barrier.suo
|
||||
Makefile
|
||||
*.cmake
|
||||
**/CMakeFiles/
|
||||
CMakeCache.txt
|
||||
/rpm
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# VS Code Directory
|
||||
.vscode/
|
||||
# Transient in-project-directory dependencies
|
||||
/deps/
|
||||
/out/build/x64-Debug
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
[submodule "ext/gtest"]
|
||||
path = ext/gtest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "ext/gmock"]
|
||||
path = ext/gmock
|
||||
url = https://github.com/google/googlemock.git
|
||||
[submodule "ext/gulrak-filesystem"]
|
||||
path = ext/gulrak-filesystem
|
||||
url = https://github.com/gulrak/filesystem
|
13
.lvimrc
13
.lvimrc
|
@ -1,13 +0,0 @@
|
|||
"Instructions
|
||||
"Download vim script 411
|
||||
"http://www.vim.org/scripts/script.php?script_id=441
|
||||
"Install localvimrc.vim to .vim/plugin
|
||||
"
|
||||
" Hint: You can disable it asking before sourcing a file by adding this to
|
||||
" your .vimrc: let g:localvimrc_ask=0
|
||||
|
||||
set nosmarttab
|
||||
set noexpandtab
|
||||
set shiftwidth=8
|
||||
set softtabstop=0
|
||||
set tabstop=4
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Barrier build parameters
|
||||
#
|
||||
BARRIER_VERSION_MAJOR = 2
|
||||
BARRIER_VERSION_MINOR = 4
|
||||
BARRIER_VERSION_PATCH = 0
|
||||
BARRIER_VERSION_STAGE = release
|
666
CMakeLists.txt
666
CMakeLists.txt
|
@ -1,11 +1,12 @@
|
|||
# synergy -- mouse and keyboard sharing utility
|
||||
# Barrier -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2018 Debauchee Open Source Group
|
||||
# Copyright (C) 2012-2016 Symless Ltd.
|
||||
# Copyright (C) 2009 Nick Bolton
|
||||
#
|
||||
#
|
||||
# This package is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# found in the file LICENSE that should have accompanied this file.
|
||||
#
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
|
@ -14,352 +15,447 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Version number for Synergy
|
||||
set(VERSION_MAJOR 1)
|
||||
set(VERSION_MINOR 8)
|
||||
set(VERSION_REV 4)
|
||||
set(VERSION_STAGE stable)
|
||||
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
||||
cmake_minimum_required (VERSION 3.4)
|
||||
project (barrier C CXX)
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
option (BARRIER_BUILD_GUI "Build the GUI" ON)
|
||||
option (BARRIER_BUILD_INSTALLER "Build the installer" ON)
|
||||
option (BARRIER_BUILD_TESTS "Build the tests" ON)
|
||||
option (BARRIER_USE_EXTERNAL_GTEST "Use external installation of Google Test framework" OFF)
|
||||
|
||||
# CMake complains if we don't have this.
|
||||
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set (CMAKE_CXX_STANDARD 14)
|
||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_definitions (-DNDEBUG)
|
||||
endif()
|
||||
|
||||
include (cmake/Version.cmake)
|
||||
include (cmake/Package.cmake)
|
||||
|
||||
# TODO: Find out why we need these, and remove them
|
||||
if (COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
cmake_policy (SET CMP0003 NEW)
|
||||
cmake_policy (SET CMP0005 NEW)
|
||||
endif()
|
||||
|
||||
# We're escaping quotes in the Windows version number, because
|
||||
# for some reason CMake won't do it at config version 2.4.7
|
||||
# It seems that this restores the newer behaviour where define
|
||||
# args are not auto-escaped.
|
||||
if (COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0005 NEW)
|
||||
endif()
|
||||
|
||||
# First, declare project (important for prerequisite checks).
|
||||
project(synergy C CXX)
|
||||
|
||||
# put binaries in a different dir to make them easier to find.
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
|
||||
|
||||
# for unix, put debug files in a separate bin "debug" dir.
|
||||
# release bin files should stay in the root of the bin dir.
|
||||
if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/debug)
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/debug)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Set some easy to type variables.
|
||||
set(root_dir ${CMAKE_SOURCE_DIR})
|
||||
set(cmake_dir ${root_dir}/res)
|
||||
set(bin_dir ${root_dir}/bin)
|
||||
set(doc_dir ${root_dir}/doc)
|
||||
set(doc_dir ${root_dir}/doc)
|
||||
|
||||
# Declare libs, so we can use list in linker later. There's probably
|
||||
# a more elegant way of doing this; with SCons, when you check for the
|
||||
# lib, it is automatically passed to the linker.
|
||||
set(libs)
|
||||
|
||||
# only include headers as "source" if not unix makefiles,
|
||||
# which is useful when using an IDE.
|
||||
# Add headers to source list
|
||||
if (${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
||||
set(SYNERGY_ADD_HEADERS FALSE)
|
||||
set (BARRIER_ADD_HEADERS FALSE)
|
||||
else()
|
||||
set(SYNERGY_ADD_HEADERS TRUE)
|
||||
set (BARRIER_ADD_HEADERS TRUE)
|
||||
endif()
|
||||
|
||||
# Depending on the platform, pass in the required defines.
|
||||
set (libs)
|
||||
|
||||
if (UNIX)
|
||||
if (NOT APPLE)
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
# warnings as errors:
|
||||
# we have a problem with people checking in code with warnings.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-unused-local-typedef")
|
||||
# For config.h, detect the libraries, functions, etc.
|
||||
include (CheckIncludeFiles)
|
||||
include (CheckLibraryExists)
|
||||
include (CheckFunctionExists)
|
||||
include (CheckTypeSize)
|
||||
include (CheckIncludeFileCXX)
|
||||
include (CheckSymbolExists)
|
||||
include (CheckCSourceCompiles)
|
||||
include (FindPkgConfig)
|
||||
|
||||
if (NOT APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
endif()
|
||||
check_include_file_cxx (istream HAVE_ISTREAM)
|
||||
check_include_file_cxx (ostream HAVE_OSTREAM)
|
||||
check_include_file_cxx (sstream HAVE_SSTREAM)
|
||||
|
||||
# For config.h, detect the libraries, functions, etc.
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckTypeSize)
|
||||
include(CheckIncludeFileCXX)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckCSourceCompiles)
|
||||
check_include_files (inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files (locale.h HAVE_LOCALE_H)
|
||||
check_include_files (memory.h HAVE_MEMORY_H)
|
||||
check_include_files (stdlib.h HAVE_STDLIB_H)
|
||||
check_include_files (strings.h HAVE_STRINGS_H)
|
||||
check_include_files (string.h HAVE_STRING_H)
|
||||
check_include_files (sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_files (sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_files (sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files (unistd.h HAVE_UNISTD_H)
|
||||
check_include_files (wchar.h HAVE_WCHAR_H)
|
||||
|
||||
check_include_file_cxx(istream HAVE_ISTREAM)
|
||||
check_include_file_cxx(ostream HAVE_OSTREAM)
|
||||
check_include_file_cxx(sstream HAVE_SSTREAM)
|
||||
check_function_exists (getpwuid_r HAVE_GETPWUID_R)
|
||||
check_function_exists (gmtime_r HAVE_GMTIME_R)
|
||||
check_function_exists (nanosleep HAVE_NANOSLEEP)
|
||||
check_function_exists (poll HAVE_POLL)
|
||||
check_function_exists (sigwait HAVE_POSIX_SIGWAIT)
|
||||
check_function_exists (strftime HAVE_STRFTIME)
|
||||
check_function_exists (inet_aton HAVE_INET_ATON)
|
||||
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files(locale.h HAVE_LOCALE_H)
|
||||
check_include_files(memory.h HAVE_MEMORY_H)
|
||||
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||
check_include_files(strings.h HAVE_STRINGS_H)
|
||||
check_include_files(string.h HAVE_STRING_H)
|
||||
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_files(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
check_include_files(wchar.h HAVE_WCHAR_H)
|
||||
# For some reason, the check_function_exists macro doesn't detect
|
||||
# the inet_aton on some pure Unix platforms (e.g. sunos5). So we
|
||||
# need to do a more detailed check and also include some extra libs.
|
||||
if (NOT HAVE_INET_ATON)
|
||||
set (CMAKE_REQUIRED_LIBRARIES nsl)
|
||||
|
||||
check_function_exists(getpwuid_r HAVE_GETPWUID_R)
|
||||
check_function_exists(gmtime_r HAVE_GMTIME_R)
|
||||
check_function_exists(nanosleep HAVE_NANOSLEEP)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
check_function_exists(sigwait HAVE_POSIX_SIGWAIT)
|
||||
check_function_exists(strftime HAVE_STRFTIME)
|
||||
check_function_exists(vsnprintf HAVE_VSNPRINTF)
|
||||
check_function_exists(inet_aton HAVE_INET_ATON)
|
||||
|
||||
# For some reason, the check_function_exists macro doesn't detect
|
||||
# the inet_aton on some pure Unix platforms (e.g. sunos5). So we
|
||||
# need to do a more detailed check and also include some extra libs.
|
||||
if (NOT HAVE_INET_ATON)
|
||||
check_c_source_compiles (
|
||||
"#include <arpa/inet.h>\n int main() { inet_aton (0, 0); }"
|
||||
HAVE_INET_ATON_ADV)
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES nsl)
|
||||
check_c_source_compiles(
|
||||
"#include <arpa/inet.h>\n int main() { inet_aton(0, 0); }"
|
||||
HAVE_INET_ATON_ADV)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
set (CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
if (HAVE_INET_ATON_ADV)
|
||||
|
||||
# Override the previous fail.
|
||||
set(HAVE_INET_ATON 1)
|
||||
if (HAVE_INET_ATON_ADV)
|
||||
# Override the previous fail.
|
||||
set (HAVE_INET_ATON 1)
|
||||
|
||||
# Assume that both nsl and socket will be needed,
|
||||
# it seems safe to add socket on the back of nsl,
|
||||
# since socket only ever needed when nsl is needed.
|
||||
list(APPEND libs nsl socket)
|
||||
# Assume that both nsl and socket will be needed,
|
||||
# it seems safe to add socket on the back of nsl,
|
||||
# since socket only ever needed when nsl is needed.
|
||||
list (APPEND libs nsl socket)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
check_type_size (char SIZEOF_CHAR)
|
||||
check_type_size (int SIZEOF_INT)
|
||||
check_type_size (long SIZEOF_LONG)
|
||||
check_type_size (short SIZEOF_SHORT)
|
||||
|
||||
check_type_size(char SIZEOF_CHAR)
|
||||
check_type_size(int SIZEOF_INT)
|
||||
check_type_size(long SIZEOF_LONG)
|
||||
check_type_size(short SIZEOF_SHORT)
|
||||
# pthread is used on both Linux and Mac
|
||||
set (CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set (THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package (Threads REQUIRED)
|
||||
list (APPEND libs Threads::Threads)
|
||||
|
||||
# pthread is used on both Linux and Mac
|
||||
check_library_exists("pthread" pthread_create "" HAVE_PTHREAD)
|
||||
if (HAVE_PTHREAD)
|
||||
list(APPEND libs pthread)
|
||||
else()
|
||||
message(FATAL_ERROR "Missing library: pthread")
|
||||
endif()
|
||||
# curl is used on both Linux and Mac
|
||||
find_package (CURL)
|
||||
if (CURL_FOUND)
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
list (APPEND libs ${CURL_LIBRARIES})
|
||||
|
||||
# curl is used on both Linux and Mac
|
||||
find_package(CURL)
|
||||
if (CURL_FOUND)
|
||||
list(APPEND libs curl)
|
||||
else()
|
||||
message(FATAL_ERROR "Missing library: curl")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
message(STATUS "OSX_TARGET_MAJOR=${OSX_TARGET_MAJOR}")
|
||||
message(STATUS "OSX_TARGET_MINOR=${OSX_TARGET_MINOR}")
|
||||
else()
|
||||
message (FATAL_ERROR "Missing library: curl")
|
||||
endif()
|
||||
|
||||
if (NOT (OSX_TARGET_MAJOR EQUAL 10))
|
||||
message(FATAL_ERROR "Mac OS X target must be 10.x")
|
||||
endif ()
|
||||
if (APPLE)
|
||||
set (CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
|
||||
if (OSX_TARGET_MINOR LESS 6)
|
||||
# <= 10.5: 32-bit Intel and PowerPC
|
||||
set(CMAKE_OSX_ARCHITECTURES "ppc;i386"
|
||||
CACHE STRING "" FORCE)
|
||||
else()
|
||||
# >= 10.6: Intel only
|
||||
set(CMAKE_OSX_ARCHITECTURES "i386"
|
||||
CACHE STRING "" FORCE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
find_library (lib_ScreenSaver ScreenSaver)
|
||||
find_library (lib_IOKit IOKit)
|
||||
find_library (lib_ApplicationServices ApplicationServices)
|
||||
find_library (lib_Foundation Foundation)
|
||||
find_library (lib_Carbon Carbon)
|
||||
|
||||
find_library(lib_ScreenSaver ScreenSaver)
|
||||
find_library(lib_IOKit IOKit)
|
||||
find_library(lib_ApplicationServices ApplicationServices)
|
||||
find_library(lib_Foundation Foundation)
|
||||
find_library(lib_Carbon Carbon)
|
||||
list (APPEND libs
|
||||
${lib_ScreenSaver}
|
||||
${lib_IOKit}
|
||||
${lib_ApplicationServices}
|
||||
${lib_Foundation}
|
||||
${lib_Carbon}
|
||||
)
|
||||
|
||||
list(APPEND libs
|
||||
${lib_ScreenSaver}
|
||||
${lib_IOKit}
|
||||
${lib_ApplicationServices}
|
||||
${lib_Foundation}
|
||||
${lib_Carbon}
|
||||
)
|
||||
else() # not-apple
|
||||
# FreeBSD uses /usr/local for anything not part of base
|
||||
# Also package avahi-libdns puts dns_sd.h a bit deeper
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};/usr/local/include;/usr/local/include/avahi-compat-libdns_sd")
|
||||
set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -L/usr/local/lib")
|
||||
include_directories("/usr/local/include" "/usr/local/include/avahi-compat-libdns_sd")
|
||||
link_directories("/usr/local/lib")
|
||||
endif()
|
||||
|
||||
else() # not-apple
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};/usr/X11R6/include;/usr/local/include;/usr/local/include/avahi-compat-libdns_sd")
|
||||
set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -L/usr/local/lib -L/usr/X11R6/lib")
|
||||
include_directories("/usr/local/include" "/usr/X11R6/include" "/usr/local/include/avahi-compat-libdns_sd")
|
||||
link_directories("/usr/local/lib")
|
||||
link_directories("/usr/X11R6/lib")
|
||||
endif()
|
||||
|
||||
# add include dir for bsd (posix uses /usr/include/)
|
||||
set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/local/include")
|
||||
if (BARRIER_BUILD_GUI AND ${PKG_CONFIG_FOUND})
|
||||
pkg_check_modules (AVAHI_COMPAT REQUIRED avahi-compat-libdns_sd)
|
||||
include_directories (BEFORE SYSTEM ${AVAHI_COMPAT_INCLUDE_DIRS})
|
||||
set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${AVAHI_COMPAT_INCLUDE_DIRS}")
|
||||
endif ()
|
||||
|
||||
set(XKBlib "X11/Xlib.h;X11/XKBlib.h")
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h")
|
||||
check_type_size("XRRNotifyEvent" X11_EXTENSIONS_XRANDR_H)
|
||||
set(HAVE_X11_EXTENSIONS_XRANDR_H "${X11_EXTENSIONS_XRANDR_H}")
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
set (XKBlib "X11/Xlib.h;X11/XKBlib.h")
|
||||
set (CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h")
|
||||
check_type_size ("XRRNotifyEvent" X11_EXTENSIONS_XRANDR_H)
|
||||
set (HAVE_X11_EXTENSIONS_XRANDR_H "${X11_EXTENSIONS_XRANDR_H}")
|
||||
set (CMAKE_EXTRA_INCLUDE_FILES)
|
||||
|
||||
check_include_files("${XKBlib};X11/extensions/dpms.h" HAVE_X11_EXTENSIONS_DPMS_H)
|
||||
check_include_files("X11/extensions/Xinerama.h" HAVE_X11_EXTENSIONS_XINERAMA_H)
|
||||
check_include_files("${XKBlib};X11/extensions/XKBstr.h" HAVE_X11_EXTENSIONS_XKBSTR_H)
|
||||
check_include_files("X11/extensions/XKB.h" HAVE_XKB_EXTENSION)
|
||||
check_include_files("X11/extensions/XTest.h" HAVE_X11_EXTENSIONS_XTEST_H)
|
||||
check_include_files("${XKBlib}" HAVE_X11_XKBLIB_H)
|
||||
check_include_files("X11/extensions/XInput2.h" HAVE_XI2)
|
||||
check_include_files ("${XKBlib};X11/extensions/dpms.h" HAVE_X11_EXTENSIONS_DPMS_H)
|
||||
check_include_files ("X11/extensions/Xinerama.h" HAVE_X11_EXTENSIONS_XINERAMA_H)
|
||||
check_include_files ("${XKBlib};X11/extensions/XKBstr.h" HAVE_X11_EXTENSIONS_XKBSTR_H)
|
||||
check_include_files ("X11/extensions/XKB.h" HAVE_XKB_EXTENSION)
|
||||
check_include_files ("X11/extensions/XTest.h" HAVE_X11_EXTENSIONS_XTEST_H)
|
||||
check_include_files ("${XKBlib}" HAVE_X11_XKBLIB_H)
|
||||
check_include_files ("X11/extensions/XInput2.h" HAVE_XI2)
|
||||
check_include_files ("dns_sd.h" HAVE_DNSSD)
|
||||
|
||||
if (HAVE_X11_EXTENSIONS_DPMS_H)
|
||||
# Assume that function prototypes declared, when include exists.
|
||||
set(HAVE_DPMS_PROTOTYPES 1)
|
||||
endif()
|
||||
if (NOT HAVE_X11_EXTENSIONS_XTEST_H)
|
||||
message (FATAL_ERROR "Missing header: X11/extensions/XTest.h")
|
||||
endif()
|
||||
|
||||
if (NOT HAVE_X11_XKBLIB_H)
|
||||
message(FATAL_ERROR "Missing header: " ${XKBlib})
|
||||
endif()
|
||||
if (NOT HAVE_X11_XKBLIB_H)
|
||||
message (FATAL_ERROR "Missing header: " ${XKBlib})
|
||||
endif()
|
||||
|
||||
check_library_exists("SM;ICE" IceConnectionNumber "" HAVE_ICE)
|
||||
check_library_exists("Xext;X11" DPMSQueryExtension "" HAVE_Xext)
|
||||
check_library_exists("Xtst;Xext;X11" XTestQueryExtension "" HAVE_Xtst)
|
||||
check_library_exists("Xinerama" XineramaQueryExtension "" HAVE_Xinerama)
|
||||
check_library_exists("Xi" XISelectEvents "" HAVE_Xi)
|
||||
check_library_exists("Xrandr" XRRQueryExtension "" HAVE_Xrandr)
|
||||
if (BARRIER_BUILD_GUI AND NOT HAVE_DNSSD)
|
||||
message (FATAL_ERROR "Missing header: dns_sd.h")
|
||||
endif()
|
||||
|
||||
if (HAVE_ICE)
|
||||
check_library_exists ("SM;ICE" IceConnectionNumber "" HAVE_ICE)
|
||||
check_library_exists ("Xext;X11" DPMSQueryExtension "" HAVE_Xext)
|
||||
check_library_exists ("Xtst;Xext;X11" XTestQueryExtension "" HAVE_Xtst)
|
||||
check_library_exists ("Xinerama" XineramaQueryExtension "" HAVE_Xinerama)
|
||||
check_library_exists ("Xi" XISelectEvents "" HAVE_Xi)
|
||||
check_library_exists ("Xrandr" XRRQueryExtension "" HAVE_Xrandr)
|
||||
|
||||
# Assume we have SM if we have ICE.
|
||||
set(HAVE_SM 1)
|
||||
list(APPEND libs SM ICE)
|
||||
if (HAVE_ICE)
|
||||
|
||||
endif()
|
||||
# Assume we have SM if we have ICE.
|
||||
set (HAVE_SM 1)
|
||||
list (APPEND libs SM ICE)
|
||||
|
||||
if (HAVE_Xtst)
|
||||
endif()
|
||||
|
||||
# Xtxt depends on X11.
|
||||
set(HAVE_X11)
|
||||
list(APPEND libs Xtst X11)
|
||||
if (HAVE_Xtst)
|
||||
|
||||
else()
|
||||
# Xtxt depends on X11.
|
||||
set (HAVE_X11 1)
|
||||
list (APPEND libs Xtst X11)
|
||||
|
||||
message(FATAL_ERROR "Missing library: Xtst")
|
||||
else()
|
||||
|
||||
endif()
|
||||
message (FATAL_ERROR "Missing library: Xtst")
|
||||
|
||||
if (HAVE_Xext)
|
||||
list(APPEND libs Xext)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (HAVE_Xinerama)
|
||||
list(APPEND libs Xinerama)
|
||||
else (HAVE_Xinerama)
|
||||
if (HAVE_X11_EXTENSIONS_XINERAMA_H)
|
||||
set(HAVE_X11_EXTENSIONS_XINERAMA_H 0)
|
||||
message(WARNING "Old Xinerama implementation detected, disabled")
|
||||
endif()
|
||||
endif()
|
||||
if (HAVE_Xext)
|
||||
list (APPEND libs Xext)
|
||||
endif()
|
||||
|
||||
if (HAVE_Xrandr)
|
||||
list(APPEND libs Xrandr)
|
||||
endif()
|
||||
|
||||
# this was outside of the linux scope,
|
||||
# not sure why, moving it back inside.
|
||||
if(HAVE_Xi)
|
||||
list(APPEND libs Xi)
|
||||
endif()
|
||||
if (HAVE_Xinerama)
|
||||
list (APPEND libs Xinerama)
|
||||
else (HAVE_Xinerama)
|
||||
if (HAVE_X11_EXTENSIONS_XINERAMA_H)
|
||||
set (HAVE_X11_EXTENSIONS_XINERAMA_H 0)
|
||||
message (WARNING "Old Xinerama implementation detected, disabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
if (HAVE_Xrandr)
|
||||
list (APPEND libs Xrandr)
|
||||
endif()
|
||||
|
||||
# For config.h, set some static values; it may be a good idea to make
|
||||
# these values dynamic for non-standard UNIX compilers.
|
||||
set(ACCEPT_TYPE_ARG3 socklen_t)
|
||||
set(HAVE_CXX_BOOL 1)
|
||||
set(HAVE_CXX_CASTS 1)
|
||||
set(HAVE_CXX_EXCEPTIONS 1)
|
||||
set(HAVE_CXX_MUTABLE 1)
|
||||
set(HAVE_CXX_STDLIB 1)
|
||||
set(HAVE_PTHREAD_SIGNAL 1)
|
||||
set(SELECT_TYPE_ARG1 int)
|
||||
set(SELECT_TYPE_ARG234 "(fd_set *)")
|
||||
set(SELECT_TYPE_ARG5 "(struct timeval *)")
|
||||
set(STDC_HEADERS 1)
|
||||
set(TIME_WITH_SYS_TIME 1)
|
||||
set(HAVE_SOCKLEN_T 1)
|
||||
# this was outside of the linux scope,
|
||||
# not sure why, moving it back inside.
|
||||
if (HAVE_Xi)
|
||||
list (APPEND libs Xi)
|
||||
endif()
|
||||
|
||||
# For config.h, save the results based on a template (config.h.in).
|
||||
configure_file(res/config.h.in ${root_dir}/config.h)
|
||||
endif()
|
||||
|
||||
add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
||||
# For config.h, set some static values; it may be a good idea to make
|
||||
# these values dynamic for non-standard UNIX compilers.
|
||||
set (ACCEPT_TYPE_ARG3 socklen_t)
|
||||
set (HAVE_CXX_BOOL 1)
|
||||
set (HAVE_CXX_CASTS 1)
|
||||
set (HAVE_CXX_EXCEPTIONS 1)
|
||||
set (HAVE_CXX_MUTABLE 1)
|
||||
set (HAVE_CXX_STDLIB 1)
|
||||
set (SELECT_TYPE_ARG1 int)
|
||||
set (SELECT_TYPE_ARG234 " (fd_set *)")
|
||||
set (SELECT_TYPE_ARG5 " (struct timeval *)")
|
||||
set (STDC_HEADERS 1)
|
||||
set (TIME_WITH_SYS_TIME 1)
|
||||
set (HAVE_SOCKLEN_T 1)
|
||||
|
||||
if (APPLE)
|
||||
add_definitions(-DWINAPI_CARBON=1 -D_THREAD_SAFE)
|
||||
else (APPLE)
|
||||
add_definitions(-DWINAPI_XWINDOWS=1)
|
||||
endif()
|
||||
# For config.h, save the results based on a template (config.h.in).
|
||||
configure_file (res/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/lib/config.h)
|
||||
|
||||
else() # not-unix
|
||||
add_definitions (-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
||||
|
||||
list(APPEND libs Wtsapi32 Userenv Wininet comsuppw Shlwapi)
|
||||
if (APPLE)
|
||||
add_definitions (-DWINAPI_CARBON=1 -D_THREAD_SAFE)
|
||||
else()
|
||||
add_definitions (-DWINAPI_XWINDOWS=1)
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
/DWIN32
|
||||
/D_WINDOWS
|
||||
/D_CRT_SECURE_NO_WARNINGS
|
||||
/DVERSION=\"${VERSION}\"
|
||||
)
|
||||
|
||||
if (MSVC_VERSION EQUAL 1600)
|
||||
set(SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/synergy.sln")
|
||||
if (EXISTS "${SLN_FILENAME}" )
|
||||
file(APPEND "${SLN_FILENAME}" "\n# This should be regenerated!\n")
|
||||
endif()
|
||||
endif()
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /D _BIND_TO_CURRENT_VCLIBS_VERSION=1")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD /O2 /Ob2")
|
||||
|
||||
list (APPEND libs Wtsapi32 Userenv Wininet comsuppw Shlwapi)
|
||||
|
||||
add_definitions (
|
||||
/DSYSAPI_WIN32=1
|
||||
/DWINAPI_MSWINDOWS=1
|
||||
/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1 # tr1 is used from gtest and gmock
|
||||
/DWIN32
|
||||
/D_WINDOWS
|
||||
/D_CRT_SECURE_NO_WARNINGS
|
||||
/DBARRIER_VERSION=\"${BARRIER_VERSION}\"
|
||||
/D_XKEYCHECK_H
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
include_directories("${CMAKE_SOURCE_DIR}/ext/gulrak-filesystem/include")
|
||||
|
||||
if (WIN32)
|
||||
# TODO: consider using /analyze to uncover potential bugs in the source code.
|
||||
#
|
||||
# OpenSSL
|
||||
#
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set (OPENSSL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/ext/openssl/windows)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set (OPENSSL_ROOT "${OPENSSL_ROOT}/x64")
|
||||
else()
|
||||
set (OPENSSL_ROOT "${OPENSSL_ROOT}/x86")
|
||||
endif()
|
||||
|
||||
# /WX - warnings as errors (we have a problem with people checking in code with warnings).
|
||||
# /FR - generate browse information (ncb files) useful for using IDE.
|
||||
# /MP - use multi cores to compile.
|
||||
# /D _BIND_TO_CURRENT_VCLIBS_VERSION - TODO: explain why.
|
||||
# /D _SECURE_SCL=1 - find bugs with iterators.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX /FR /MP /D _BIND_TO_CURRENT_VCLIBS_VERSION=1 /D _SECURE_SCL=1")
|
||||
|
||||
# /MD - use multi-core libraries.
|
||||
# /O2 - get the fastest code.
|
||||
# /Ob2 - expand inline functions (auto-inlining).
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD /O2 /Ob2")
|
||||
include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
|
||||
set (OPENSSL_LIBS
|
||||
${OPENSSL_ROOT}/lib/libeay32.lib
|
||||
${OPENSSL_ROOT}/lib/ssleay32.lib
|
||||
)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
find_program(APT_PROGRAM "apt")
|
||||
find_program(BREW_PROGRAM "brew")
|
||||
find_program(PORT_PROGRAM "port")
|
||||
|
||||
if (IS_DIRECTORY /opt/procursus AND APT_PROGRAM)
|
||||
# procursus/apt
|
||||
set (OPENSSL_ROOT /opt/procursus)
|
||||
|
||||
include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
|
||||
|
||||
set (OPENSSL_LIBS
|
||||
${OPENSSL_ROOT}/lib/libssl.a
|
||||
${OPENSSL_ROOT}/lib/libcrypto.a
|
||||
)
|
||||
elseif (IS_DIRECTORY /opt/local AND PORT_PROGRAM)
|
||||
# macports
|
||||
set (OPENSSL_ROOT /opt/local)
|
||||
|
||||
set (OPENSSL_LIBS
|
||||
${OPENSSL_ROOT}/lib/libssl.a
|
||||
${OPENSSL_ROOT}/lib/libcrypto.a
|
||||
z
|
||||
)
|
||||
elseif (IS_DIRECTORY /usr/local/opt/openssl AND BREW_PROGRAM)
|
||||
# brew
|
||||
set (OPENSSL_ROOT /usr/local/opt/openssl)
|
||||
|
||||
include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
|
||||
|
||||
set (OPENSSL_LIBS
|
||||
${OPENSSL_ROOT}/lib/libssl.a
|
||||
${OPENSSL_ROOT}/lib/libcrypto.a
|
||||
)
|
||||
elseif (IS_DIRECTORY /opt/homebrew/opt/openssl AND BREW_PROGRAM)
|
||||
# brew
|
||||
set (OPENSSL_ROOT /opt/homebrew/opt/openssl)
|
||||
|
||||
include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
|
||||
|
||||
set (OPENSSL_LIBS
|
||||
${OPENSSL_ROOT}/lib/libssl.a
|
||||
${OPENSSL_ROOT}/lib/libcrypto.a
|
||||
)
|
||||
endif()
|
||||
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set (OPENSSL_LIBS ssl crypto)
|
||||
else()
|
||||
find_library (lib_ssl ssl)
|
||||
find_library (lib_crypto crypto)
|
||||
if (NOT lib_ssl)
|
||||
message(FATAL_ERROR "openssl library not found")
|
||||
elseif (NOT lib_crypto)
|
||||
message(FATAL_ERROR "crypto library not found")
|
||||
endif()
|
||||
set (OPENSSL_LIBS ${lib_ssl} ${lib_crypto})
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "IRIX")
|
||||
set_target_properties(synergys PROPERTIES LINK_FLAGS "-all -woff 33 -woff 84 -woff 15")
|
||||
set_target_properties(synergyc PROPERTIES LINK_FLAGS "-all -woff 33 -woff 84 -woff 15")
|
||||
set_target_properties(synergyd PROPERTIES LINK_FLAGS "-all -woff 33 -woff 84 -woff 15")
|
||||
#
|
||||
# Configure_file... but for directories, recursively.
|
||||
#
|
||||
macro (configure_files srcDir destDir)
|
||||
message (STATUS "Configuring directory ${destDir}")
|
||||
make_directory (${destDir})
|
||||
|
||||
file (GLOB_RECURSE sourceFiles RELATIVE ${srcDir} ${srcDir}/*)
|
||||
file (GLOB_RECURSE templateFiles LIST_DIRECTORIES false RELATIVE ${srcDir} ${srcDir}/*.in)
|
||||
list (REMOVE_ITEM sourceFiles ${templateFiles})
|
||||
|
||||
foreach (sourceFile ${sourceFiles})
|
||||
set (sourceFilePath ${srcDir}/${sourceFile})
|
||||
if (IS_DIRECTORY ${sourceFilePath})
|
||||
message (STATUS "Copying directory ${sourceFile}")
|
||||
make_directory (${destDir}/${sourceFile})
|
||||
else()
|
||||
message (STATUS "Copying file ${sourceFile}")
|
||||
configure_file (${sourceFilePath} ${destDir}/${sourceFile} COPYONLY)
|
||||
endif()
|
||||
endforeach (sourceFile)
|
||||
|
||||
foreach (templateFile ${templateFiles})
|
||||
set (sourceTemplateFilePath ${srcDir}/${templateFile})
|
||||
string (REGEX REPLACE "\.in$" "" templateFile ${templateFile})
|
||||
message (STATUS "Configuring file ${templateFile}")
|
||||
configure_file (${sourceTemplateFilePath} ${destDir}/${templateFile} @ONLY)
|
||||
endforeach (templateFile)
|
||||
endmacro (configure_files)
|
||||
|
||||
if (${BARRIER_BUILD_INSTALLER})
|
||||
#
|
||||
# macOS app Bundle
|
||||
#
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set (CMAKE_INSTALL_RPATH "@loader_path/../Libraries;@loader_path/../Frameworks")
|
||||
set (BARRIER_BUNDLE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dist/macos/bundle)
|
||||
set (BARRIER_BUNDLE_DIR ${CMAKE_BINARY_DIR}/bundle)
|
||||
set (BARRIER_BUNDLE_APP_DIR ${BARRIER_BUNDLE_DIR}/Barrier.app)
|
||||
set (BARRIER_BUNDLE_BINARY_DIR ${BARRIER_BUNDLE_APP_DIR}/Contents/MacOS)
|
||||
|
||||
configure_files (${BARRIER_BUNDLE_SOURCE_DIR} ${BARRIER_BUNDLE_DIR})
|
||||
|
||||
add_custom_target(Barrier_MacOS ALL
|
||||
bash build_dist.sh
|
||||
DEPENDS barrier barriers barrierc
|
||||
WORKING_DIRECTORY ${BARRIER_BUNDLE_DIR})
|
||||
endif()
|
||||
|
||||
if (CONF_CPACK)
|
||||
message(FATAL_ERROR "CPack support has been removed.")
|
||||
#
|
||||
# Windows installer
|
||||
#
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set (BARRIER_WIX_VERSION "${BARRIER_VERSION_MAJOR}.${BARRIER_VERSION_MINOR}.${BARRIER_VERSION_PATCH}")
|
||||
message (STATUS "Configuring the wix installer")
|
||||
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/wix ${CMAKE_BINARY_DIR}/installer-wix)
|
||||
message (STATUS "Configuring the inno installer")
|
||||
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/inno ${CMAKE_BINARY_DIR}/installer-inno)
|
||||
endif()
|
||||
|
||||
if (CONF_DOXYGEN)
|
||||
|
||||
set(VERSION, "${VERSION}")
|
||||
|
||||
# For doxygen.cfg, save the results based on a template (doxygen.cfg.in).
|
||||
configure_file(${cmake_dir}/doxygen.cfg.in ${doc_dir}/doxygen.cfg)
|
||||
|
||||
#
|
||||
# Linux installation
|
||||
#
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/rpm ${CMAKE_BINARY_DIR}/rpm)
|
||||
install(FILES res/barrier.svg DESTINATION share/icons/hicolor/scalable/apps)
|
||||
if("${VERSION_MAJOR}" STREQUAL "2")
|
||||
install(FILES res/barrier2.desktop DESTINATION share/applications)
|
||||
else()
|
||||
install(FILES res/barrier.desktop DESTINATION share/applications)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else()
|
||||
message (STATUS "NOT configuring the installer")
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory (src)
|
||||
|
|
72
ChangeLog
72
ChangeLog
|
@ -1,16 +1,66 @@
|
|||
v1.9.0-rc3
|
||||
============
|
||||
Bug #4132 - Laggy mouse cursor on macOS clients
|
||||
|
||||
v1.9.0-rc2
|
||||
===========
|
||||
Bug #5901 - Stored serial key corrupted on macOS
|
||||
Bug #5757 - Failure to build against OpenSSL v1.1.0
|
||||
|
||||
v1.9.0-rc1
|
||||
==========
|
||||
Bug #5467 - Failing to automatically download and install Bonjour
|
||||
Enhancement #5389 - Ported GUI to Qt 5
|
||||
Enhancement #4978 - Windows: Added support for Visual Studio 2015
|
||||
Enhancement #5398 - Windows: Updated OpenSSL dependency to 1.0.2k
|
||||
|
||||
v1.8.8-stable
|
||||
==========
|
||||
Bug #5196 - Some keys on Korean and Japanese keyboards have the same keycode
|
||||
Bug #5578 - Pressing Hangul key results in alt+'a'
|
||||
Bug #5785 - Can't switch screens when cursor is in a corner
|
||||
Bug #3992 - macOS: Dragging is broken in Unity 3D
|
||||
Bug #5075 - macOS: Build fails on macOS 10.9 due to unknown compiler flag
|
||||
Bug #5809 - macOS: No version number is shown in the App Info dialog
|
||||
Bug #3197 - Linux: switchDoubleTap option is not working
|
||||
Bug #4477 - Linux: Mouse buttons higher than id 10 result in crash
|
||||
Bug #5832 - Linux: Screen size misdetected on multi-monitor display
|
||||
Enhancement #4504 - Improved Korean language description
|
||||
Enhancement #5525 - Added support for precise screen positioning in config file
|
||||
Enhancement #4290 - Windows: Removed annoying alt+print screen functionality
|
||||
|
||||
v1.8.7-stable
|
||||
=============
|
||||
Bug #5784 - Edition changes when reopening GUI
|
||||
|
||||
v1.8.6-stable
|
||||
=============
|
||||
Bug #5592 - Some keys don't work for macOS Sierra clients
|
||||
Bug #5186 - Cursor stuck on client when using multi-DPI server
|
||||
Bug #5722 - Malformed serial key in registry will crash GUI on startup
|
||||
Bug #5752 - Tab order is incorrect on Settings dialog
|
||||
Enhancement #5699 - Unified installers on macOS
|
||||
Feature #4836 - macOS Sierra build
|
||||
|
||||
v1.8.5-stable
|
||||
=============
|
||||
Bug #5680 - Server crashes when disconnecting SSL clients
|
||||
Bug #5626 - Build fails using Xcode 8 and macOS SDK 10.12
|
||||
Feature #5657 - Trial version support
|
||||
Feature #5707 - User upgrade statistics
|
||||
|
||||
v1.8.4-stable
|
||||
=============
|
||||
|
||||
Bug #4041 UHD/4K DPI scaling broken on Windows servers
|
||||
Bug #4420 When XRandR adds a screen, it is inaccessible
|
||||
Bug #5603 Activation notification depends on existence of /etc/os-release
|
||||
Bug #5624 Update notification sometimes requests a downgrade
|
||||
Bug #5329 Current date is shown for build date in the about dialog
|
||||
Bug #5640 Synergy branding is inconsistent across platforms
|
||||
Enhancement #5617 Remove redundant plugin infrastructure
|
||||
Enhancement #5627 Move SSL certificate generation to main window
|
||||
Enhancement #5628 Move SSL implementation into core binary
|
||||
Enhancement #5629 Move activation from wizard into new dialog window
|
||||
Bug #5183 - Slowly moving the cursor has no effect on high DPI clients
|
||||
Bug #4041 - UHD/4K DPI scaling broken on Windows servers
|
||||
Bug #4420 - When XRandR adds a screen, it is inaccessible
|
||||
Bug #5603 - Activation notification depends on existence of /etc/os-release
|
||||
Bug #5624 - Update notification sometimes requests a downgrade
|
||||
Bug #5329 - Current date is shown for build date in the about dialog
|
||||
Enhancement #5617 - Remove redundant plugin infrastructure
|
||||
Enhancement #5627 - Move SSL certificate generation to main window
|
||||
Enhancement #5628 - Move SSL implementation into core binary
|
||||
Enhancement #5629 - Move activation from wizard into new dialog window
|
||||
|
||||
v1.8.3-stable
|
||||
=============
|
||||
|
|
2
INSTALL
2
INSTALL
|
@ -1,2 +0,0 @@
|
|||
Help: http://symless.com/help/
|
||||
Wiki: https://github.com/symless/synergy/wiki/
|
63
LICENSE
63
LICENSE
|
@ -1,9 +1,9 @@
|
|||
synergy -- mouse and keyboard sharing utility
|
||||
Copyright (C) 2018 Debauchee Open Source Group
|
||||
Copyright (C) 2012-2016 Symless Ltd.
|
||||
Copyright (C) 2008-2014 Nick Bolton
|
||||
Copyright (C) 2002-2014 Chris Schoeneman
|
||||
|
||||
This program is released under the GPL with the additional exemption
|
||||
This program is released under the GPL with the additional exemption
|
||||
that compiling, linking, and/or using OpenSSL is allowed.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
@ -286,3 +286,62 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
|
16
README
16
README
|
@ -1,16 +0,0 @@
|
|||
Synergy
|
||||
=======
|
||||
|
||||
Share one mouse and keyboard between multiple computers.
|
||||
|
||||
Synergy is free and open source (free as in free speech),
|
||||
meaning you are free to run it and redistribute it with
|
||||
or without changes.
|
||||
|
||||
Just use "hm conf" and "hm build" to compile (./hm.sh on
|
||||
Linux and Mac).
|
||||
|
||||
For detailed compile instructions:
|
||||
https://github.com/symless/synergy/wiki/Compiling
|
||||
|
||||
Happy hacking!
|
|
@ -0,0 +1,148 @@
|
|||
# Barrier
|
||||
|
||||
Eliminate the barrier between your machines.
|
||||
Find [releases for windows and macOS here](https://github.com/debauchee/barrier/releases).
|
||||
Your distro probably already has barrier packaged for it, see [distro specific packages](#distro-specific-packages)
|
||||
below for a list. Alternatively, we also provide a [flatpak](https://github.com/flathub/com.github.debauchee.barrier)
|
||||
and a [snap](https://snapcraft.io/barrier).
|
||||
|
||||
### Contact info:
|
||||
|
||||
- `#barrier` on LiberaChat IRC network
|
||||
|
||||
#### CI Build Status
|
||||
|
||||
Master branch overall build status: [](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)
|
||||
|
||||
|Platform |Build Status|
|
||||
| --:|:-- |
|
||||
|Linux |[](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|
||||
|Mac |[](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|
||||
|Windows Debug |[](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|
||||
|Windows Release|[](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|
||||
|Snap |[](https://build.snapcraft.io/user/debauchee/barrier)|
|
||||
|
||||
Our CI Builds are provided by Microsoft Azure Pipelines, Flathub, and Canonical.
|
||||
|
||||
### What is it?
|
||||
|
||||
Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you're controlling at any given moment. Barrier does this in software, allowing you to tell it which machine to control by moving your mouse to the edge of the screen, or by using a keypress to switch focus to a different system.
|
||||
|
||||
Barrier was forked from Symless's Synergy 1.9 codebase. Synergy was a commercialized reimplementation of the original CosmoSynergy written by Chris Schoeneman.
|
||||
|
||||
At the moment, barrier is not compatible with synergy. Barrier needs to be installed on all machines that will share keyboard and mouse.
|
||||
|
||||
### What's different?
|
||||
|
||||
Whereas Synergy has moved beyond its goals from the 1.x era, Barrier aims to maintain that simplicity.
|
||||
Barrier will let you use your keyboard and mouse from one computer to control one or more other computers.
|
||||
Clipboard sharing is supported.
|
||||
That's it.
|
||||
|
||||
### Project goals
|
||||
|
||||
Hassle-free reliability. We are users, too. Barrier was created so that we could solve the issues we had with synergy and then share these fixes with other users.
|
||||
|
||||
Compatibility. We use more than one operating system and you probably do, too. Windows, OSX, Linux, FreeBSD... Barrier should "just work". We will also have our eye on Wayland when the time comes.
|
||||
|
||||
Communication. Everything we do is in the open. Our issue tracker will let you see if others are having the same problem you're having and will allow you to add additional information. You will also be able to see when progress is made and how the issue gets resolved.
|
||||
|
||||
### Usage
|
||||
|
||||
Install and run barrier on each machine that will be sharing.
|
||||
On the machine with the keyboard and mouse, make it the server.
|
||||
|
||||
Click the "Configure server" button and drag a new screen onto the grid for each client machine.
|
||||
Ensure the "screen name" matches exactly (case-sensitive) for each configured screen -- the clients' barrier windows will tell you their screen names (just above the server IP).
|
||||
|
||||
On the client(s), put in the server machine's IP address (or use Bonjour/auto configuration when prompted) and "start" them.
|
||||
You should see `Barrier is running` on both server and clients.
|
||||
You should now be able to move the mouse between all the screens as if they were the same machine.
|
||||
|
||||
Note that if the keyboard's Scroll Lock is active then this will prevent the mouse from switching screens.
|
||||
|
||||
### Contact & support
|
||||
|
||||
Please be aware that the *only* way to draw our attention to a bug is to create a new issue in [the issue tracker](https://github.com/debauchee/barrier/issues). Write a clear, concise, detailed report and you will get a clear, concise, detailed response. Priority is always given to issues that affect a wider range of users.
|
||||
|
||||
For short and simple questions or to just say hello find us on the LiberaChat IRC network in the #barrier channel.
|
||||
|
||||
### Contributions
|
||||
|
||||
At this time we are looking for developers to help fix the issues found in the issue tracker.
|
||||
Submit pull requests once you've polished up your patch and we'll review and possibly merge it.
|
||||
|
||||
Most pull requests will need to include a release note.
|
||||
See docs/newsfragments/README.md for documentation of how to do that.
|
||||
|
||||
## Distro specific packages
|
||||
|
||||
While not a comprehensive list, repology provides a decent list of distro
|
||||
specific packages.
|
||||
|
||||
[](https://repology.org/project/barrier/versions)
|
||||
|
||||
## FAQ - Frequently Asked Questions
|
||||
|
||||
**Q: Does drag and drop work on linux?**
|
||||
|
||||
> A: No *(see [#855](https://github.com/debauchee/barrier/issues/855) if you'd like to change that)*
|
||||
|
||||
|
||||
**Q: What OSes are supported?**
|
||||
|
||||
> A: The [most recent release](https://github.com/debauchee/barrier/releases/latest) of Barrier is known to work on:
|
||||
> - Windows 7, 8, 8.1, 10, and 11
|
||||
> - macOS *(previously known as OS X or Mac OS X)*
|
||||
> - _The current GUI does **not** work on OS versions prior to macOS 10.12 Sierra (but see the related answer below)_
|
||||
> - Linux
|
||||
> - FreeBSD
|
||||
> - OpenBSD
|
||||
|
||||
|
||||
**Q: Are 32-bit versions of Windows supported?**
|
||||
|
||||
> A: No
|
||||
|
||||
|
||||
__Q: Is it possible to use Barrier on Mac OS X / OS X versions prior to 10.12?__
|
||||
|
||||
> A: Not officially.
|
||||
> - For OS X 10.10 Yosemite and later:
|
||||
> - [Barrier v2.1.0](https://github.com/debauchee/barrier/releases/tag/v2.1.0) or earlier _may_ work.
|
||||
> - For Mac OS X 10.9 Mavericks _(and perhaps earlier)_:
|
||||
> 1. the command-line portions of the [current release](https://github.com/debauchee/barrier/releases/latest) _should_ run fine.
|
||||
> 2. The GUI will _not_ run, as that OS version does not include Apple's *Metal* framework.
|
||||
> - _(For a GUI workaround for Mac OS X 10.9, see the [discussion at issue #544](https://github.com/debauchee/barrier/issues/544))_
|
||||
|
||||
> Note: Only versions [v2.3.4](https://github.com/debauchee/barrier/releases/tag/v2.3.4) and [later](https://github.com/debauchee/barrier/releases/latest) of Barrier can be supported by this project.
|
||||
> - Anyone using an earlier version is advised to upgrade due to recently-addressed security vulnerabilities *(and other bug fixes)*.
|
||||
> - This is especially important for computers accessible from the public Internet *(or from other shared/untrusted networks, such as when using shared WiFi)*.
|
||||
|
||||
|
||||
**Q: How do I load my configuration on startup?**
|
||||
|
||||
> A: Start the binary with the argument `--config <path_to_saved_configuration>`
|
||||
|
||||
|
||||
**Q: After loading my configuration on the client the field 'Server IP' is still empty!**
|
||||
|
||||
> A: Edit your configuration to include the server's ip address manually with
|
||||
>
|
||||
>```
|
||||
>(...)
|
||||
>
|
||||
>section: options
|
||||
> serverhostname=<AAA.BBB.CCC.DDD>
|
||||
>```
|
||||
|
||||
**Q: Are there any other significant limitations with the current version of Barrier?**
|
||||
|
||||
> A: Currently:
|
||||
> - Barrier currently has limited UTF-8 support; issues have been reported with processing various languages.
|
||||
> - *(see [#860](https://github.com/debauchee/barrier/issues/860))*
|
||||
> - There is interest in future support for the Wayland compositor/display server protocol *([official site](https://wayland.freedesktop.org/) | [Wikipedia article](https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)))* on Linux.
|
||||
> - As of late 2021, there is no expected completion date for *Wayland* support.
|
||||
> - *(see [#109](https://github.com/debauchee/barrier/issues/109) and [#1251](https://github.com/debauchee/barrier/issues/1251) for status or to volunteer your talents)*
|
||||
>
|
||||
> The complete list of open issues can be found in the ['Issues' tab on GitHub](https://github.com/debauchee/barrier/issues?q=is%3Aissue+is%3Aopen). Help is always appreciated.
|
|
@ -0,0 +1,76 @@
|
|||
Creating a release
|
||||
==================
|
||||
|
||||
This document is documentation intednded for maintainers of Barrier.
|
||||
It documents the release process of Barrier.
|
||||
|
||||
Step 1: Setup environment variables
|
||||
-----------------------------------
|
||||
|
||||
Setup the following environment variable that will be used throughout the rest of the steps.
|
||||
|
||||
export VERSION=X.Y.Z
|
||||
|
||||
Step 2: Release notes PR
|
||||
------------------------
|
||||
|
||||
Open a new branch (e.g. `release`) and run the following:
|
||||
|
||||
towncrier --version ${VERSION} --date `date -u +%F`
|
||||
|
||||
This collects the release notes using the `towncrier` tool. Please commit the collected release
|
||||
notes afterwards.
|
||||
|
||||
Certain file names are not properly supported by the `towncrier` tool and it ignores them.
|
||||
Check `newsfragments` directory for any forgotten release notes
|
||||
|
||||
Step 3: Merge the release notes PR
|
||||
----------------------------------
|
||||
|
||||
Step 4: Bump the version number
|
||||
-------------------------------
|
||||
|
||||
Pull the merge commit created on the `master` branch during the step 2.
|
||||
|
||||
Edit the following files and update the version numbers:
|
||||
|
||||
- `Build.properties`
|
||||
- `cmake/Version.cmake`
|
||||
- `doc/barrierc.1`
|
||||
- `doc/barriers.1`
|
||||
- `.github/ISSUE_TEMPLATE/bug_report.yml`
|
||||
|
||||
Commit to the release branch with the following message `Barrier x.y.z`.
|
||||
|
||||
Push the commit:
|
||||
|
||||
git push origin master
|
||||
|
||||
Step 5: Push git tag
|
||||
--------------------
|
||||
|
||||
Create a tag:
|
||||
|
||||
git tag -s v${VERSION} -m v${VERSION}
|
||||
|
||||
Push the tag:
|
||||
|
||||
git push origin master --tags
|
||||
|
||||
|
||||
Step 6: Draft a new release on Github
|
||||
-------------------------------------
|
||||
|
||||
Go to https://github.com/buildbot/buildbot/releases and draft a new release.
|
||||
|
||||
Use git tag as the title of the release: `vX.Y.Z`.
|
||||
|
||||
Use the release notes generated by the `towncrier` tool as the description of the releases.
|
||||
|
||||
Upload the artifacts created by Azure pipelines as the binaries of the release. The following
|
||||
artifacts should be uploaded to Github:
|
||||
|
||||
- the Barrier-X.Y.Z-release.dmg created by the newest Mac OS task (artifact name is
|
||||
"Mac Release Disk Image and App XYZ").
|
||||
|
||||
- the BarrierSetup-X.Y.Z-release.exe (artifact name is Windows Release Installer).
|
|
@ -0,0 +1 @@
|
|||
theme: jekyll-theme-slate
|
|
@ -0,0 +1,117 @@
|
|||
trigger:
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
branches:
|
||||
include:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
- job: WinBuild
|
||||
displayName: Windows Build
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
strategy:
|
||||
matrix:
|
||||
Debug:
|
||||
CI_ENV_BUILD_TYPE: Debug
|
||||
Release with Release Installer:
|
||||
CI_ENV_BUILD_TYPE: Release
|
||||
steps:
|
||||
# Gather Dependencies
|
||||
- task: PowerShell@2
|
||||
displayName: Download Bonjour SDK-like
|
||||
inputs:
|
||||
filePath: azure-pipelines/download_install_bonjour_sdk_like.ps1
|
||||
- task: UsePythonVersion@0
|
||||
displayName: Selecting Python Installer for QLI Installer
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
- task: PowerShell@2
|
||||
displayName: Installing QT
|
||||
condition: ne(variables['CacheRestored'], 'true')
|
||||
inputs:
|
||||
filePath: azure-pipelines/download_install_qt.ps1
|
||||
# Build time!
|
||||
- powershell: Copy-Item azure-pipelines\build_env_tmpl.bat build_env.bat
|
||||
displayName: Layering Azure Pipeline's build_env.bat
|
||||
- script: |
|
||||
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\vsdevcmd" -arch=x64 && clean_build.bat
|
||||
displayName: Clean Build
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive Completed Build Directory
|
||||
inputs:
|
||||
rootFolderOrFile: build\bin\$(CI_ENV_BUILD_TYPE)\
|
||||
includeRootFolder: true
|
||||
archiveFile: $(Build.ArtifactStagingDirectory)\$(CI_ENV_BUILD_TYPE).zip
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Completed Build Directory Archive Build Artifact
|
||||
inputs:
|
||||
pathtoPublish: $(Build.ArtifactStagingDirectory)\$(CI_ENV_BUILD_TYPE).zip
|
||||
artifactName: Windows $(CI_ENV_BUILD_TYPE)
|
||||
- script: choco install innosetup --version 5.6.1.20190126 --allow-downgrade
|
||||
displayName: Ensure desired version of Inno Setup is installed.
|
||||
condition: eq(variables['CI_ENV_BUILD_TYPE'], 'Release')
|
||||
- script: build_installer.bat
|
||||
displayName: Build Installer
|
||||
condition: eq(variables['CI_ENV_BUILD_TYPE'], 'Release')
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Release Installer
|
||||
condition: eq(variables['CI_ENV_BUILD_TYPE'], 'Release')
|
||||
inputs:
|
||||
pathtoPublish: build\installer-inno\bin
|
||||
artifactName: Windows Release Installer
|
||||
|
||||
- job: LinuxBuild
|
||||
strategy:
|
||||
matrix:
|
||||
ubuntu-18.04:
|
||||
imageName: 'ubuntu-18.04'
|
||||
ubuntu-20.04:
|
||||
imageName: 'ubuntu-20.04'
|
||||
displayName: Linux Build
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
steps:
|
||||
- script: sudo apt-get update -y
|
||||
- script: sudo apt-get install -y libxtst-dev qtdeclarative5-dev libavahi-compat-libdnssd-dev libcurl4-openssl-dev
|
||||
displayName: Install Dependencies
|
||||
- script: sh -x ./clean_build.sh
|
||||
displayName: Clean Build
|
||||
|
||||
- job: MacBuild
|
||||
displayName: Mac Build
|
||||
strategy:
|
||||
matrix:
|
||||
big-sur-Release:
|
||||
imageName: "macOS-11"
|
||||
B_BUILD_TYPE: Release
|
||||
BARRIER_VERSION_STAGE: Release
|
||||
catalina-Release:
|
||||
imageName: "macOS-10.15"
|
||||
B_BUILD_TYPE: Release
|
||||
BARRIER_VERSION_STAGE: Release
|
||||
mojave-Release:
|
||||
imageName: "macOS-10.14"
|
||||
B_BUILD_TYPE: Release
|
||||
BARRIER_VERSION_STAGE: Release
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
variables:
|
||||
VERBOSE: 1
|
||||
TERM: xterm-256color
|
||||
steps:
|
||||
- script: rm -rf /usr/local/opt/openssl
|
||||
displayName: Remove incompatible OpenSSL 1.0.2t from macOS-10.14 vmImage
|
||||
- script: brew reinstall openssl
|
||||
displayName: Installed newer OpenSSL 1.1.x
|
||||
- script: brew install pkg-config qt5
|
||||
displayName: Install Qt5 and pkg-config prereqs
|
||||
- script: sh -x ./clean_build.sh
|
||||
displayName: Clean Build
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Release DMG
|
||||
condition: eq(variables['B_BUILD_TYPE'], 'Release')
|
||||
inputs:
|
||||
pathtoPublish: build/bundle
|
||||
artifactName: Mac Release Disk Image and App $(imageName)
|
|
@ -0,0 +1,6 @@
|
|||
set B_BUILD_TYPE=%CI_ENV_BUILD_TYPE%
|
||||
set B_QT_ROOT=%cd%\deps\Qt
|
||||
set B_QT_VER=Qt5.13.0\5.13.0
|
||||
set B_QT_MSVC=msvc2017_64
|
||||
set B_BONJOUR=%cd%\deps\BonjourSDKLike
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
New-Item -Force -ItemType Directory -Path ".\deps\"
|
||||
Invoke-WebRequest 'https://github.com/nelsonjchen/mDNSResponder/releases/download/v2019.05.08.1/x64_RelWithDebInfo.zip' -OutFile 'deps\BonjourSDKLike.zip' ;
|
||||
Write-Output 'Downloaded BonjourSDKLike Zip'
|
||||
Write-Output 'Unzipping BonjourSDKLike Zip'
|
||||
Remove-Item -Recurse -Force -ErrorAction Ignore .\deps\BonjourSDKLike
|
||||
Expand-Archive .\deps\BonjourSDKLike.zip -DestinationPath .\deps\BonjourSDKLike
|
||||
Write-Output 'Installed BonjourSDKLike Zip'
|
||||
Remove-Item deps\BonjourSDKLike.zip
|
||||
Write-Output 'Deleted BonjourSDKLike Zip'
|
|
@ -0,0 +1,25 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$qli_install_version = '2019.05.26.1'
|
||||
$qt_version = '5.13.0'
|
||||
|
||||
New-Item -Force -ItemType Directory -Path ".\deps\"
|
||||
|
||||
Write-Output 'Downloading QLI Installer'
|
||||
Invoke-WebRequest "https://github.com/nelsonjchen/qli-installer/archive/v$qli_install_version.zip" -OutFile '.\deps\qli-installer.zip' ;
|
||||
Write-Output 'Downloaded QLI Installer'
|
||||
|
||||
Write-Output 'Extracting QLI Installer'
|
||||
Expand-Archive deps\qli-installer.zip deps\
|
||||
Move-Item .\deps\qli-installer-$qli_install_version\ .\deps\qli-installer
|
||||
Write-Output 'Extracted QLI Installer'
|
||||
|
||||
Write-Output 'Installing QLI Installer Dependencies'
|
||||
pip install -r .\deps\qli-installer\requirements.txt
|
||||
Write-Output 'Installed QLI Installer Dependencies'
|
||||
|
||||
Write-Output 'Starting QT Installer'
|
||||
$Env:QLI_OUT_DIR = ".\deps\Qt\Qt$qt_version"
|
||||
$Env:QLI_BASE_URL = "https://download.qt.io/online/qtsdkrepository/"
|
||||
python .\deps\qli-installer\qli-installer.py $qt_version windows desktop win64_msvc2017_64
|
||||
Write-Output 'Installed QT Installer'
|
|
@ -0,0 +1,34 @@
|
|||
@echo off
|
||||
set INNO_ROOT=C:\Program Files (x86)\Inno Setup 5
|
||||
|
||||
set savedir=%cd%
|
||||
cd /d %~dp0
|
||||
|
||||
if not exist build\bin\Release goto buildproject
|
||||
|
||||
echo Building 64-bit Windows installer...
|
||||
|
||||
cd build\installer-inno
|
||||
if ERRORLEVEL 1 goto buildproject
|
||||
"%INNO_ROOT%\ISCC.exe" /Qp barrier.iss
|
||||
if ERRORLEVEL 1 goto failed
|
||||
|
||||
echo Build completed successfully
|
||||
goto done
|
||||
|
||||
:buildproject
|
||||
echo To build a 64-bit Windows installer:
|
||||
echo - set B_BUILD_TYPE=Release in build_env.bat
|
||||
echo - also set other environmental overrides necessary for your build environment
|
||||
echo - run clean_build.bat to build Barrier and verify that it succeeds
|
||||
echo - re-run this script to create the installation package
|
||||
goto done
|
||||
|
||||
:failed
|
||||
echo Build failed
|
||||
|
||||
:done
|
||||
set INNO_ROOT=
|
||||
|
||||
cd /d %savedir%
|
||||
set savedir=
|
|
@ -0,0 +1,91 @@
|
|||
@echo off
|
||||
|
||||
REM defaults - override them by creating a build_env.bat file
|
||||
set B_BUILD_TYPE=Debug
|
||||
set B_QT_ROOT=C:\Qt
|
||||
set B_QT_VER=5.11.1
|
||||
set B_QT_MSVC=msvc2017_64
|
||||
set B_BONJOUR=C:\Program Files\Bonjour SDK
|
||||
|
||||
set savedir=%cd%
|
||||
cd /d %~dp0
|
||||
|
||||
REM cmake generator name for the target build system
|
||||
if "%VisualStudioVersion%"=="15.0" (
|
||||
set cmake_gen=Visual Studio 15 2017
|
||||
) else if "%VisualStudioVersion%"=="16.0" (
|
||||
set cmake_gen=Visual Studio 16 2019
|
||||
) else (
|
||||
echo Visual Studio version was not detected.
|
||||
echo Did you forget to run inside a VS developer prompt?
|
||||
echo Using the default cmake generator.
|
||||
set cmake_gen=Visual Studio 16 2019
|
||||
)
|
||||
|
||||
if exist build_env.bat call build_env.bat
|
||||
|
||||
REM needed by cmake to set bonjour include dir
|
||||
set BONJOUR_SDK_HOME=%B_BONJOUR%
|
||||
|
||||
REM full path to Qt stuff we need
|
||||
set B_QT_FULLPATH=%B_QT_ROOT%\%B_QT_VER%\%B_QT_MSVC%
|
||||
|
||||
echo Bonjour: %BONJOUR_SDK_HOME%
|
||||
echo Qt: %B_QT_FULLPATH%
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
rmdir /q /s build
|
||||
mkdir build
|
||||
if ERRORLEVEL 1 goto failed
|
||||
cd build
|
||||
cmake -G "%cmake_gen%" -A x64 -D CMAKE_BUILD_TYPE=%B_BUILD_TYPE% -D CMAKE_PREFIX_PATH="%B_QT_FULLPATH%" -D DNSSD_LIB="%B_BONJOUR%\Lib\x64\dnssd.lib" -D QT_VERSION=%B_QT_VER% ..
|
||||
if ERRORLEVEL 1 goto failed
|
||||
cmake --build . --config %B_BUILD_TYPE%
|
||||
if ERRORLEVEL 1 goto failed
|
||||
if exist bin\Debug (
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Cored.dll bin\Debug\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Guid.dll bin\Debug\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Networkd.dll bin\Debug\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Widgetsd.dll bin\Debug\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Cored.dll bin\Debug\ > NUL
|
||||
copy ..\ext\openssl\windows\x64\bin\* bin\Debug\ > NUL
|
||||
copy ..\res\openssl\barrier.conf bin\Debug\ > NUL
|
||||
mkdir bin\Debug\platforms
|
||||
copy %B_QT_FULLPATH%\plugins\platforms\qwindowsd.dll bin\Debug\platforms\ > NUL
|
||||
) else if exist bin\Release (
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Core.dll bin\Release\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Gui.dll bin\Release\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Network.dll bin\Release\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Widgets.dll bin\Release\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Core.dll bin\Release\ > NUL
|
||||
copy ..\ext\openssl\windows\x64\bin\* bin\Release\ > NUL
|
||||
copy ..\res\openssl\barrier.conf bin\Release\ > NUL
|
||||
mkdir bin\Release\platforms
|
||||
copy %B_QT_FULLPATH%\plugins\platforms\qwindows.dll bin\Release\platforms\ > NUL
|
||||
) else (
|
||||
echo Remember to copy supporting binaries and configuration files!
|
||||
)
|
||||
|
||||
echo Build completed successfully
|
||||
set BUILD_FAILED=0
|
||||
goto done
|
||||
|
||||
:failed
|
||||
set BUILD_FAILED=%ERRORLEVEL%
|
||||
echo Build failed
|
||||
|
||||
:done
|
||||
cd /d %savedir%
|
||||
|
||||
set B_BUILD_TYPE=
|
||||
set B_QT_ROOT=
|
||||
set B_QT_VER=
|
||||
set B_QT_MSVC=
|
||||
set B_BONJOUR=
|
||||
set BONJOUR_SDK_HOME=
|
||||
set B_QT_FULLPATH=
|
||||
set savedir=
|
||||
set cmake_gen=
|
||||
|
||||
EXIT /B %BUILD_FAILED%
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
# some environments have cmake v2 as 'cmake' and v3 as 'cmake3'
|
||||
# check for cmake3 first then fallback to just cmake
|
||||
B_CMAKE=`type cmake3 2>/dev/null`
|
||||
if [ $? -eq 0 ]; then
|
||||
B_CMAKE=`echo "$B_CMAKE" | cut -d' ' -f3`
|
||||
else
|
||||
B_CMAKE=cmake
|
||||
fi
|
||||
# default build configuration
|
||||
B_BUILD_TYPE=${B_BUILD_TYPE:-Debug}
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
# OSX needs a lot of extra help, poor thing
|
||||
# run the osx_environment.sh script to fix paths
|
||||
. ./osx_environment.sh
|
||||
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $B_CMAKE_FLAGS"
|
||||
fi
|
||||
# allow local customizations to build environment
|
||||
[ -r ./build_env.sh ] && . ./build_env.sh
|
||||
|
||||
# Initialise Git submodules
|
||||
git submodule update --init --recursive
|
||||
|
||||
B_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$B_BUILD_TYPE $B_CMAKE_FLAGS"
|
||||
rm -rf build
|
||||
mkdir build || exit 1
|
||||
cd build || exit 1
|
||||
echo "Starting Barrier $B_BUILD_TYPE build..."
|
||||
$B_CMAKE $B_CMAKE_FLAGS .. || exit 1
|
||||
make || exit 1
|
||||
echo "Build completed successfully"
|
|
@ -0,0 +1,9 @@
|
|||
if (UNIX)
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR ${BARRIER_VERSION_MAJOR})
|
||||
set (CPACK_PACKAGE_VERSION_MINOR ${BARRIER_VERSION_MINOR})
|
||||
set (CPACK_PACKAGE_VERSION_PATCH ${BARRIER_VERSION_PATCH})
|
||||
set (CPACK_GENERATOR "TBZ2")
|
||||
set (CPACK_SOURCE_GENERATOR "TXZ")
|
||||
set (CPACK_SOURCE_IGNORE_FILES "/build/;\.gitignore$;/\.git/;/.github/;\.swp$;build_env\.*")
|
||||
include (CPack)
|
||||
endif()
|
|
@ -0,0 +1,98 @@
|
|||
cmake_minimum_required (VERSION 3.4)
|
||||
|
||||
set (BARRIER_VERSION_MAJOR 2)
|
||||
set (BARRIER_VERSION_MINOR 4)
|
||||
set (BARRIER_VERSION_PATCH 0)
|
||||
set (BARRIER_VERSION_STAGE "release")
|
||||
|
||||
#
|
||||
# Barrier Version
|
||||
#
|
||||
if (NOT DEFINED BARRIER_VERSION_MAJOR)
|
||||
if (DEFINED ENV{BARRIER_VERSION_MAJOR})
|
||||
set (BARRIER_VERSION_MAJOR $ENV{BARRIER_VERSION_MAJOR})
|
||||
else()
|
||||
set (BARRIER_VERSION_MAJOR 2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED BARRIER_VERSION_MINOR)
|
||||
if (DEFINED ENV{BARRIER_VERSION_MINOR})
|
||||
set (BARRIER_VERSION_MINOR $ENV{BARRIER_VERSION_MINOR})
|
||||
else()
|
||||
set (BARRIER_VERSION_MINOR 3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED BARRIER_VERSION_PATCH)
|
||||
if (DEFINED ENV{BARRIER_VERSION_PATCH})
|
||||
set (BARRIER_VERSION_PATCH $ENV{BARRIER_VERSION_PATCH})
|
||||
else()
|
||||
set (BARRIER_VERSION_PATCH 2)
|
||||
message (WARNING "Barrier version wasn't set. Set to ${BARRIER_VERSION_MAJOR}.${BARRIER_VERSION_MINOR}.${BARRIER_VERSION_PATCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED BARRIER_VERSION_STAGE)
|
||||
if (DEFINED ENV{BARRIER_VERSION_STAGE})
|
||||
set (BARRIER_VERSION_STAGE $ENV{BARRIER_VERSION_STAGE})
|
||||
else()
|
||||
set (BARRIER_VERSION_STAGE "snapshot")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED BARRIER_REVISION)
|
||||
if (DEFINED ENV{GIT_COMMIT})
|
||||
string (SUBSTRING $ENV{GIT_COMMIT} 0 8 BARRIER_REVISION)
|
||||
else()
|
||||
find_program (GIT_BINARY git)
|
||||
if (NOT GIT_BINARY STREQUAL "GIT_BINARY-NOTFOUND")
|
||||
execute_process (
|
||||
COMMAND git rev-parse --short=8 HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE BARRIER_REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(LENGTH "${BARRIER_REVISION}" BARRIER_REVISION_LENGTH)
|
||||
if (NOT BARRIER_REVISION_LENGTH EQUAL 8 OR NOT BARRIER_REVISION MATCHES "^[a-f0-9]+")
|
||||
set (BARRIER_REVISION "00000000")
|
||||
message (WARNING "revision not found. setting to ${BARRIER_REVISION}")
|
||||
endif()
|
||||
unset (BARRIER_REVISION_LENGTH)
|
||||
|
||||
if (DEFINED ENV{BUILD_NUMBER})
|
||||
set (BARRIER_BUILD_NUMBER $ENV{BUILD_NUMBER})
|
||||
else()
|
||||
set (BARRIER_BUILD_NUMBER 1)
|
||||
endif()
|
||||
|
||||
string (TIMESTAMP BARRIER_BUILD_DATE "%Y%m%d" UTC)
|
||||
set (BARRIER_SNAPSHOT_INFO ".${BARRIER_VERSION_STAGE}.${BARRIER_REVISION}")
|
||||
|
||||
if (BARRIER_VERSION_STAGE STREQUAL "snapshot")
|
||||
set (BARRIER_VERSION_TAG "${BARRIER_VERSION_STAGE}.b${BARRIER_BUILD_NUMBER}-${BARRIER_REVISION}")
|
||||
else()
|
||||
set (BARRIER_VERSION_TAG "${BARRIER_VERSION_STAGE}")
|
||||
endif()
|
||||
|
||||
set (BARRIER_VERSION "${BARRIER_VERSION_MAJOR}.${BARRIER_VERSION_MINOR}.${BARRIER_VERSION_PATCH}-${BARRIER_VERSION_STAGE}")
|
||||
set (BARRIER_VERSION_STRING "${BARRIER_VERSION}-${BARRIER_VERSION_TAG}")
|
||||
message (STATUS "Full Barrier version string is '" ${BARRIER_VERSION_STRING} "'")
|
||||
|
||||
add_definitions (-DBARRIER_VERSION="${BARRIER_VERSION}")
|
||||
add_definitions (-DBARRIER_VERSION_STRING="${BARRIER_VERSION_STRING}")
|
||||
add_definitions (-DBARRIER_VERSION_MAJOR=${BARRIER_VERSION_MAJOR})
|
||||
add_definitions (-DBARRIER_VERSION_MINOR=${BARRIER_VERSION_MINOR})
|
||||
add_definitions (-DBARRIER_VERSION_PATCH=${BARRIER_VERSION_PATCH})
|
||||
add_definitions (-DBARRIER_REVISION="${BARRIER_REVISION}")
|
||||
add_definitions (-DBARRIER_BUILD_DATE="${BARRIER_BUILD_DATE}")
|
||||
add_definitions (-DBARRIER_BUILD_NUMBER=${BARRIER_BUILD_NUMBER})
|
||||
|
||||
if (BARRIER_DEVELOPER_MODE)
|
||||
add_definitions (-DBARRIER_DEVELOPER_MODE=1)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
# barrier -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2012-2016 Symless Ltd.
|
||||
# Copyright (C) 2011 Nick Bolton
|
||||
#
|
||||
# This package is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# found in the file LICENSE that should have accompanied this file.
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if (BARRIER_USE_EXTERNAL_GTEST)
|
||||
include (FindPkgConfig)
|
||||
find_package(GTest REQUIRED)
|
||||
pkg_check_modules(GMOCK REQUIRED gmock)
|
||||
include_directories(
|
||||
${GTEST_INCLUDE_DIRS}
|
||||
${GMOCK_INCLUDE_DIRS}
|
||||
)
|
||||
else()
|
||||
include_directories(
|
||||
../ext/gtest
|
||||
../ext/gtest/include
|
||||
../ext/gmock
|
||||
../ext/gmock/include
|
||||
)
|
||||
|
||||
add_library(gtest STATIC ../ext/gtest/src/gtest-all.cc)
|
||||
add_library(gmock STATIC ../ext/gmock/src/gmock-all.cc)
|
||||
|
||||
set(GTEST_LIBRARIES gtest)
|
||||
set(GMOCK_LIBRARIES gmock)
|
||||
|
||||
if (UNIX)
|
||||
# ignore warnings in gtest and gmock
|
||||
set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
|
||||
set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w")
|
||||
endif()
|
||||
endif()
|
|
@ -1,2 +0,0 @@
|
|||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .
|
||||
|
|
@ -0,0 +1,412 @@
|
|||
barrier (2.3.3) UNRELEASED; urgency=medium
|
||||
|
||||
[ Aaron Bieber ]
|
||||
* tell build system about openbsd
|
||||
|
||||
[ Tetja Rediske ]
|
||||
* make non-gui variants build without avahi
|
||||
|
||||
[ Erik Nordstrøm ]
|
||||
* Replace hard-coded names of build directory in build_installer.sh script for macOS with looking at the location of the script by the script itself when it is run. This makes it possible to have differently named build dirs for debug and release builds, and without restricting what each of those directories must be named.
|
||||
* Remove shell script that changes directory and then executes barrier on macOS, and execute barrier directly instead.
|
||||
* Add settings in the Info.plist file that enable high-DPI support on macOS.
|
||||
|
||||
[ Daniel Seither ]
|
||||
* Remove unused variables
|
||||
* IpcLogOutputter: Put member initializers in execution order
|
||||
* OSXDragView: Get rid of uninitialized variable warning
|
||||
* Add override specifiers
|
||||
* Let tray image blend into macOS menu bar
|
||||
|
||||
[ Vasily Galkin ]
|
||||
* Man page: fix incorrect name of user conf file in barriers.1
|
||||
|
||||
[ Keegan Quinn ]
|
||||
* Cast values to fix build errors on OS X 10.11.
|
||||
|
||||
[ Maximiliano Bertacchini ]
|
||||
* Update readme with mention of the snap package.
|
||||
|
||||
[ Javier Candeira ]
|
||||
* Fix #503 - Clarify on README how to report issues
|
||||
|
||||
[ Micael Jarniac ]
|
||||
* Build status badges added to a table
|
||||
|
||||
[ Maximiliano Bertacchini ]
|
||||
* Add build-essential to the snap's build deps.
|
||||
* Explicitly disable wayland support in the snap.
|
||||
* Add comment on snap env var
|
||||
|
||||
[ Vasily Galkin ]
|
||||
* Fix infinite loop on fast TCP disconnection
|
||||
|
||||
[ Dom Rodriguez ]
|
||||
* README: Add OpenBSD to list of supported OSes
|
||||
|
||||
[ Åke Engelbrektson ]
|
||||
* Update gui_sv.ts
|
||||
|
||||
[ the-wes ]
|
||||
* Add more detailed description of what Barrier does
|
||||
|
||||
[ James Le Cuirot ]
|
||||
* Use -pthread flag and simplify pthread build logic
|
||||
* Only require Qt5 when building the GUI
|
||||
|
||||
[ Tomáš Chvátal ]
|
||||
* Fix desktop file Categories to match standard
|
||||
|
||||
[ Chris Simons ]
|
||||
* Add script that uses macdeployqt instead of `reref_dylibs.sh` shell script to create the `.app` bundle
|
||||
* Use `build_dist.sh` in CMake instead of `build_installer.sh` Have CMake always build a bundle, the `build_dist.sh` script will only build a dmg if the build type is "Release"
|
||||
* Add warnings for users manually running `build_installer.sh` and `reref_dylibs.sh` manually
|
||||
* Homebrew (Ruby) throws an error when it gets `SIGPIPE` from the `--max-count` on `grep`.
|
||||
* added barrierc and barriers to macdeployqt targets
|
||||
* Change MacOS Build Steps
|
||||
* Fix TIS/TSM in logs
|
||||
* Elevate XSocketAddressInUse to ERROR
|
||||
* Allow selecting Fingerprint Qlabel
|
||||
* replace tabs with spaces
|
||||
* Change log level on several status messages (Fixes #652, Fixes #516)
|
||||
|
||||
[ Ben Plessinger ]
|
||||
* A few more log cleanups
|
||||
|
||||
[ Vasily Galkin ]
|
||||
* Remove unused IEventQueue::isEmpty() method to simplify code understanding
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* XWindowsEventQueueBuffer: Fix delays when waiting for new events
|
||||
|
||||
[ Jonathan Martens ]
|
||||
* Fix Auto config missing hostname prompt #704
|
||||
|
||||
[ Vasily Galkin ]
|
||||
* Windows 8+: make waiting for messages correspond to emptiness check
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* gui: Use enum class to scope enum values
|
||||
* lib/client: Use std::string directly instead of String typedef
|
||||
* lib/arch: Use std::string directly instead of String typedef
|
||||
* lib/net: Use std::string directly instead of String typedef
|
||||
* lib/server: Use std::string directly instead of String typedef
|
||||
* lib/base: Use std::string directly instead of String typedef
|
||||
* lib/ipc: Use std::string directly instead of String typedef
|
||||
* lib/net: Add missing include
|
||||
* lib/platform: Use std::string directly instead of String typedef
|
||||
* test: Enable building of tests
|
||||
* test: Reduce the number of implicit include directories
|
||||
* test: Remove unresolved merge conflict markers
|
||||
* test: Fix referenced library name
|
||||
* test: Update to new APIs
|
||||
* tests: Fix crash in XWindowsKeyStateTests
|
||||
* test: Fix undefined behavior of deleting incomplete type
|
||||
* tests: Disable test that depends on external state
|
||||
* Use noexcept instead of exception specifications
|
||||
* lib/common: Remove no longer used stdexcept.h
|
||||
|
||||
[ Jonathan Martens ]
|
||||
* Make connection message a NOTE for consistency
|
||||
|
||||
[ zhexiwang ]
|
||||
* Added toggleScreen function, using hot key to loop through all screens. Comparing to switchToScreen, it is more handy since the user only need to hit one hotkey.
|
||||
|
||||
[ GeorgH93 ]
|
||||
* Fix build on Windows
|
||||
* Keep errorlevel
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* Revert "Make connection message a NOTE for consistency"
|
||||
|
||||
[ Chris Simons ]
|
||||
* add comments explaining the use of CLOG_PRINT
|
||||
|
||||
[ Dom Rodriguez ]
|
||||
* Remove ext/gtest, ext/gmock to replace with Git submodule
|
||||
* Add gtest/gmock framework, locked at 1.6.0
|
||||
* Fix CI infrastructure (.bat/.sh) to initialise Git submodules before build
|
||||
|
||||
[ Maximiliano Bertacchini ]
|
||||
* Fix snap build failing to initialize submodules.
|
||||
|
||||
[ Niklas Hambüchen ]
|
||||
* ui: Settings: Explain what "double tap" means
|
||||
|
||||
[ Dom Rodriguez ]
|
||||
* Prepare for v2.3.3 release
|
||||
|
||||
[ Maximiliano Bertacchini ]
|
||||
* Shorten snap version on tagged revisions
|
||||
|
||||
[ Tomoya Tanjo ]
|
||||
* Add Eisu_toggle and Muhenkan keys
|
||||
|
||||
[ Michael Zimmermann ]
|
||||
* add support for keyboard backlight media keys
|
||||
|
||||
[ Dom Rodriguez ]
|
||||
* [Build]: Bump Build.properties
|
||||
|
||||
-- root <root@873b8d543aab> Fri, 07 Aug 2020 16:25:54 +0000
|
||||
|
||||
barrier (2.3.2) disco; urgency=medium
|
||||
|
||||
[ walker0643 ]
|
||||
* remove (wrong) version line from .desktop file
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* Improve precision of grabbed scroll events on OSX server
|
||||
* Accumulate scrolls less than supported scroll on XWindows
|
||||
* Add fake changelog so that debian package may be built
|
||||
|
||||
[ walker0643 ]
|
||||
* non-GUI build should not require bonjour headers
|
||||
* add patch from Gentoo packager to fix cmake issue (reported on Arch, too). ref #49
|
||||
* fix email in debian changelog
|
||||
* screen settings dialog handles internationalized default name better (ref #71)
|
||||
* rephrase language in README.md
|
||||
|
||||
[ sidneys ]
|
||||
* fix(macos-build): use standard methods for detecting default XCode installation and default macOS platform SDK
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* OSX: Add support for building on macports
|
||||
* OSX: Prefer Macports over Homebrew if available
|
||||
* travis: Rewrite the CI config to use platform matrix
|
||||
* travis: Add macports-based OSX script
|
||||
* travis: Add homebrew-based OSX script
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* [Travis] use container builds for linux (#85)
|
||||
* Merge pkgconfig branch into master (#86)
|
||||
|
||||
[ walker0643 ]
|
||||
* fix formatting in last merge
|
||||
|
||||
[ coypu ]
|
||||
* Also add curl include directories.
|
||||
* have all other OSes handled in the else case.
|
||||
* Use ${CMAKE_DL_LIBS} rather than listing OSes.
|
||||
|
||||
[ walker0643 ]
|
||||
* bump version to 2.2
|
||||
* bump qt/vs versions on windows
|
||||
|
||||
[ Pawel Bogut ]
|
||||
* Fix config file name in server help message
|
||||
|
||||
[ Josh Stone ]
|
||||
* Fix data indexes in Unicode::fromUTF8
|
||||
|
||||
[ walker0643 ]
|
||||
* bump ssl cert key size up to 2048 from 1024. fixes #126
|
||||
* enable high-dps awareness for barriers/barrierc. fixes screen geometry calculations for screens with >100% scaling
|
||||
* rename field Interface to Address in GUI settings dialog
|
||||
* add firewall rule for default port on installation (windows)
|
||||
* Update README.md
|
||||
|
||||
[ Epakai ]
|
||||
* Update openssl key size in barrier.conf (#150)
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* add pre-build script for building barrier on windows from SSH (#152)
|
||||
|
||||
[ Christopher N. Hesse ]
|
||||
* gui: Fix auto hide behavior (#140)
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* Build full installer via clean_build.sh (#157)
|
||||
* OSX: Explain why the app needs to go into /Applications (#158)
|
||||
|
||||
[ Monika Kairaityte ]
|
||||
* x11: Wrap platform functions in an interface that can be mocked later
|
||||
* x11: Wrap platform functions in XWindowsScreenSaver class
|
||||
* x11: Wrap platform functions in XWindowsClipboard class
|
||||
* x11: Wrap platform functions in XWindowsKeyState class
|
||||
* x11: Wrap platform functions in XWindowsEventQueueBuffer class
|
||||
* Fix tests wrapper
|
||||
|
||||
[ Chris Simons ]
|
||||
* Added preserveFocus fix (#178)
|
||||
|
||||
[ Dayne Broderson ]
|
||||
* add debug notes to help identify where trusted fingerprints file is
|
||||
* fix spelling of matches
|
||||
* fixing style to be consistent per @p12tic
|
||||
|
||||
[ Robert Sandell ]
|
||||
* Spelling correction (#209)
|
||||
|
||||
[ Moron ]
|
||||
* Fix #204 modifier keys not working in remote desktop on MacOS
|
||||
|
||||
[ jwestfall ]
|
||||
* Properly deal with a socket that is readable and writable at the same time
|
||||
|
||||
[ Miroslav Lences ]
|
||||
* Fix macos build issues
|
||||
|
||||
[ Jim Westfall ]
|
||||
* Fix OSX builds for macports
|
||||
|
||||
[ Girts Folkmanis ]
|
||||
* add checks to osx_environment.sh
|
||||
|
||||
[ Thomas A. F. Thorne ]
|
||||
* Reduce Sysmtem Tray Retry Attempts
|
||||
* Do Not Warn About Missing System Tray
|
||||
|
||||
[ jwestfall ]
|
||||
* OSX: let build_installer.sh create a working Barrier.app on debug builds
|
||||
|
||||
[ Szymon Szeląg ]
|
||||
* Screen change script argument
|
||||
* Use std::system
|
||||
* Start script via execl
|
||||
* Fire screen switch event on client disconnect
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* Fix memory leak during socket shutdown
|
||||
|
||||
[ PayouZon MagIT ]
|
||||
* Update snapcraft.yaml
|
||||
* Update snapcraft.yaml
|
||||
* Barrier Snappy
|
||||
|
||||
[ Wendall Cada ]
|
||||
* Working spec file for Fedora
|
||||
|
||||
[ noisyshape ]
|
||||
* Update Windows build script for VS2019
|
||||
* Add support for multiple VS versions
|
||||
* Normalize cmake generator strings
|
||||
* Correct path and instructions
|
||||
* Create version number for wix
|
||||
* Remove hardcoded paths
|
||||
* Fix XML
|
||||
|
||||
[ Mike Salvatore ]
|
||||
* Fix #278 "Enable Clipboard Sharing" always reset after restart
|
||||
* Rename the "Apply" button to "Reload"
|
||||
|
||||
[ noisyshape ]
|
||||
* Replace Wix with Inno Setup
|
||||
|
||||
[ Matthijs Wensveen ]
|
||||
* Add dpiAwareness: PerMonitor to manifest to better handle multiple monitors with different DPI settings.
|
||||
|
||||
[ Nelson Chen ]
|
||||
* Initial Azure Pipelines
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* :pencil: add release link and contact info
|
||||
|
||||
[ pack ]
|
||||
* typo fix (#311)
|
||||
|
||||
[ Nelson Chen ]
|
||||
* Update Apt on Linux before installing dependencies on Azure Pipelines (#321)
|
||||
* Prefix Windows artifact names with 'Windows' on Azure Pipelines (#319)
|
||||
* Install Pinned Qt and OpenSSL on Mac
|
||||
* Build Release version of Barrier on Mac
|
||||
* Publish Mac Artifacts
|
||||
* Upgrade QLI Installer and use Cal's Qt Mirror
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* fix #163
|
||||
* Add a quick Q/A about what OSes are supported
|
||||
* Add Q/A about 32-bit windows
|
||||
|
||||
[ Chun Wang ]
|
||||
* Fix #232 MACOS serious config file errors - hotkeys totally broken
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* [README] Add FaQ to the bottom
|
||||
* [Release] Bump up to a new release version
|
||||
* [Cmake] bump version to 2.3.0
|
||||
|
||||
[ Nelson Chen ]
|
||||
* Ensure Inno Setup 5 is installed in Azure Pipelines
|
||||
|
||||
[ Patrizio Tufarolo ]
|
||||
* Fixed quote key on US International keyboard
|
||||
|
||||
[ Maximiliano Bertacchini ]
|
||||
* Use version from git tag.
|
||||
* Fix interface plugs.
|
||||
* Add commands: `barrier`, `barrierc`, `barriers`.
|
||||
* Drop custom qt5, use distro provided one.
|
||||
* Update build-packages and stage-packages.
|
||||
* Add desktop entry with an app icon.
|
||||
* Set snap icon and license.
|
||||
* Use appstream metadata from flathub.
|
||||
* Fix snap version-control script for local lxd builds.
|
||||
|
||||
[ Dom Rodriguez ]
|
||||
* Feature: CMake now generates compile_commands.json
|
||||
|
||||
[ Thomas Thorne ]
|
||||
* Reference Only Microsoft Azue Pipelines In Readme.md
|
||||
* Delete .travis.yml As We Switch To Azure Pipelines
|
||||
|
||||
[ Evan Maddock ]
|
||||
* Reimplement patch for horizontal scrolling and extra mouse buttons
|
||||
* Used the wrong key button by accident
|
||||
* Use Windows helper function to check for Windows version
|
||||
|
||||
[ walker0643 ]
|
||||
* Drop Travis CI
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* [Version] bump to 2.3.1 for new release
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* Make ownership of SocketMultiplexer explicit
|
||||
* Make ownership of SocketMultiplexerJob explicit
|
||||
* Use std::mutex instead of ArchMutex in ArchMultithreadPosix
|
||||
* Use std::mutex instead of ArchMutex in EventQueue
|
||||
* Use std::mutex instead of ArchMutex in Log
|
||||
* Use std::mutex instead of ArchMutex in IpcServer
|
||||
* Use std::mutex instead of ArchMutex in IpcClientProxy
|
||||
* Use std::mutex instead of ArchMutex in IpcLogOutputter
|
||||
* Fix race condition in IArchString
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* [Build[ update pre-build script to call VS2019
|
||||
|
||||
[ Dom Rodriguez ]
|
||||
* Snap: Change CMake builds to be of Release type
|
||||
* Fix: CMake now checks for required Qt5 libraries
|
||||
* Tidy up and fix lint errors in build scripts
|
||||
* Interim fix for failed macOS builds
|
||||
|
||||
[ Povilas Kanapickas ]
|
||||
* Fix retry timer not being unregistered properly
|
||||
|
||||
[ Maximiliano Bertacchini ]
|
||||
* Rename the snap as `barrier`.
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* Revert "Tidy up and fix lint errors in build scripts"
|
||||
* [CMake] properly declare FPIC
|
||||
* [Azure Pipelines] use QT 5.13.0 (#418)
|
||||
* Add snap build status
|
||||
* [README] update README with info about packages
|
||||
|
||||
[ Casey Barton ]
|
||||
* Merged mouse drift fix from synergy-core
|
||||
|
||||
[ mirh ]
|
||||
* Fix debug build launch
|
||||
|
||||
[ Adrian Lucrèce Céleste ]
|
||||
* [Version] bump to 2.3.2, stable
|
||||
|
||||
-- Pablo Catalina <pablo.catalina@gmail.com> Wed, 09 Oct 2019 12:52:10 +0200
|
||||
|
||||
barrier (2.1-1) unstable; urgency=low
|
||||
|
||||
* Initial release (Closes: #123456)
|
||||
|
||||
-- Debauchee Open Source Group <debauchee.oss@gmail.com> Sat, 01 Apr 2018 00:00:00 +0000
|
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,17 @@
|
|||
Source: barrier
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Standards-Version: 3.9.7
|
||||
Homepage: https://github.com/debauchee/barrier/
|
||||
Maintainer: Debauchee Open Source Group <todo@mail.com>
|
||||
|
||||
Package: barrier
|
||||
Architecture: amd64
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends}
|
||||
Description: Keyboard and mouse sharing solution
|
||||
Barrier allows you to share one mouse and keyboard between multiple computers.
|
||||
Work seamlessly across Windows, macOS and Linux.
|
||||
Homepage: https://github.com/debauchee/barrier/
|
|
@ -0,0 +1,5 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Barrier
|
||||
Source: https://github.com/debauchee/barrier/
|
||||
Disclaimer: This package is not part of the Debian project as it contains closed source proprietary components
|
||||
Copyright: Copyright (C) 2018 Debauchee Open Source Group
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --buildsystem=cmake --builddirectory=build -Pbuild/debian --parallel
|
||||
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
|
@ -0,0 +1,90 @@
|
|||
#define MyAppName "Barrier"
|
||||
#define MyAppVersion "@BARRIER_VERSION_MAJOR@.@BARRIER_VERSION_MINOR@.@BARRIER_VERSION_PATCH@.@BARRIER_BUILD_NUMBER@"
|
||||
#define MyAppTextVersion "@BARRIER_VERSION@"
|
||||
#define MyAppPublisher "Debauchee Open Source Group"
|
||||
#define MyAppURL "https://github.com/debauchee/barrier/wiki"
|
||||
#define MyAppCopyright "Copyright (C) 2018 Debauchee Open Source Group"
|
||||
#define MyAppExeName "barrier.exe"
|
||||
#define MyAppServiceName "Barrier"
|
||||
#define MyAppServiceExe "barrierd.exe"
|
||||
#define MyAppServiceDesc "Manages the Barrier background processes."
|
||||
#define MyAppListenerDesc "Barrier Listener"
|
||||
|
||||
[Setup]
|
||||
AppId={{41036EA6-3F7A-4803-8AE0-469E5E91EFCC}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppTextVersion}
|
||||
AppVerName={#MyAppName} {#MyAppTextVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={pf}\{#MyAppName}
|
||||
DisableProgramGroupPage=yes
|
||||
LicenseFile=@CMAKE_CURRENT_SOURCE_DIR@/res/License.rtf
|
||||
OutputDir=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/../installer-inno/bin
|
||||
OutputBaseFilename=BarrierSetup-{#MyAppTextVersion}
|
||||
SetupIconFile=@CMAKE_CURRENT_SOURCE_DIR@/res/barrier.ico
|
||||
VersionInfoProductTextVersion={#MyAppTextVersion}
|
||||
VersionInfoProductVersion={#MyAppVersion}
|
||||
VersionInfoTextVersion={#MyAppTextVersion}
|
||||
VersionInfoVersion={#MyAppVersion}
|
||||
VersionInfoCopyright={#MyAppCopyright}
|
||||
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
ArchitecturesInstallIn64BitMode=x64 ia64
|
||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||
|
||||
#include "scripts\lang\english.iss"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/Release/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
; there's no "check if exists" or "insert if not exists" for netsh's firewall commands
|
||||
; to avoid duplicate entries remove the existing rule (fails if it doesn't exist) before adding
|
||||
Filename: {sys}\netsh.exe; Parameters: "advfirewall firewall delete rule name=""{#MyAppListenerDesc}"""; Flags: runhidden
|
||||
Filename: {sys}\netsh.exe; Parameters: "advfirewall firewall add rule name=""{#MyAppListenerDesc}"" protocol=TCP dir=in localport=24800 action=allow"; Flags: runhidden
|
||||
Filename: {sys}\sc.exe; Parameters: "create {#MyAppServiceName} start= auto binPath= ""\""{app}\{#MyAppServiceExe}\"""""; Flags: runhidden
|
||||
Filename: {sys}\sc.exe; Parameters: "description {#MyAppServiceName} ""{#MyAppServiceDesc}"""; Flags: runhidden
|
||||
Filename: {sys}\sc.exe; Parameters: "start {#MyAppServiceName}"; Flags: runhidden
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[UninstallDelete]
|
||||
Type: filesandordirs; Name: "{commonappdata}\Barrier"
|
||||
|
||||
[UninstallRun]
|
||||
Filename: {sys}\taskkill; Parameters: "/im {#MyAppExeName} /f /t"; Flags: runhidden
|
||||
Filename: {sys}\net.exe; Parameters: "stop {#MyAppServiceName}"; Flags: runhidden
|
||||
Filename: {sys}\sc.exe; Parameters: "delete {#MyAppServiceName}"; Flags: runhidden
|
||||
Filename: {sys}\netsh.exe; Parameters: "advfirewall firewall delete rule name=""{#MyAppListenerDesc}"""; Flags: runhidden
|
||||
|
||||
[CustomMessages]
|
||||
DependenciesDir="redist"
|
||||
|
||||
; shared code for installing the products
|
||||
#include "scripts\products.iss"
|
||||
#include "scripts\products\stringversion.iss"
|
||||
#include "scripts\products\winversion.iss"
|
||||
#include "scripts\products\msiproduct.iss"
|
||||
#include "scripts\products\vcredist2017.iss"
|
||||
|
||||
[Code]
|
||||
function InitializeSetup(): boolean;
|
||||
begin
|
||||
// initialize windows version
|
||||
initwinversion();
|
||||
|
||||
vcredist2017('14'); // min allowed version is 14.0
|
||||
|
||||
Result := true;
|
||||
end;
|
|
@ -0,0 +1,49 @@
|
|||
[strings]
|
||||
; General
|
||||
100=File download
|
||||
101=Do you want to cancel the download?
|
||||
102=%1 (%2 of %3)
|
||||
103=%1 KB
|
||||
104=%1 KB of %2 KB (%3%)
|
||||
|
||||
; Status information
|
||||
110=Getting file information...
|
||||
111=Redirecting to %1
|
||||
112=Sending request...
|
||||
113=Resolving %1
|
||||
114=Connected to %1
|
||||
115=Receiving...
|
||||
116=Connecting to %1
|
||||
|
||||
; Error messages
|
||||
120=Error connecting to the internet.\n\n%1
|
||||
121=Error opening %1.\n\nThe server returned status code %2.
|
||||
122=Error reading URL.\n\n%1
|
||||
123=Error writing file %1.\n\n%2
|
||||
124=Error opening file %1.\n\n%2
|
||||
125='%1' is an invalid URL.
|
||||
126=Error opening %1.\n\n%2
|
||||
127=Error sending request.\n\n%1
|
||||
128=Unsupported protocol. Only HTTP and FTP protocols are supported.
|
||||
129=Failed to connect to %1.\n\n%2
|
||||
130=Failed to query status code.\n\n%1
|
||||
131=Error requesting file.\n\n%1
|
||||
|
||||
; Other
|
||||
144=About...
|
||||
146=Download
|
||||
147=Setup is now downloading additional files to your computer.
|
||||
|
||||
; labels
|
||||
160=File:
|
||||
161=Speed:
|
||||
162=Status:
|
||||
163=Elapsed Time:
|
||||
164=Remaining Time:
|
||||
165=Current File:
|
||||
166=Overall Progress:
|
||||
167=Cancel
|
||||
168=OK
|
||||
169=User Name and Password
|
||||
170=User Name:
|
||||
171=Password:
|
Binary file not shown.
|
@ -0,0 +1,14 @@
|
|||
[Files]
|
||||
Source: "scripts\isxdl\isxdl.dll"; Flags: dontcopy
|
||||
|
||||
[Code]
|
||||
procedure isxdl_AddFile(URL, Filename: PAnsiChar);
|
||||
external 'isxdl_AddFile@files:isxdl.dll stdcall';
|
||||
|
||||
function isxdl_DownloadFiles(hWnd: Integer): Integer;
|
||||
external 'isxdl_DownloadFiles@files:isxdl.dll stdcall';
|
||||
|
||||
function isxdl_SetOption(Option, Value: PAnsiChar): Integer;
|
||||
external 'isxdl_SetOption@files:isxdl.dll stdcall';
|
||||
|
||||
[Setup]
|
|
@ -0,0 +1,18 @@
|
|||
[Languages]
|
||||
Name: "en"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[CustomMessages]
|
||||
;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
|
||||
en.lcid=1033
|
||||
en.depdownload_msg=The following applications are required before setup can continue:%n%n%1%nDownload and install now?
|
||||
en.depdownload_memo_title=Download dependencies
|
||||
en.depinstall_memo_title=Install dependencies
|
||||
en.depinstall_title=Installing dependencies
|
||||
en.depinstall_description=Please wait while Setup installs dependencies on your computer.
|
||||
en.depinstall_status=Installing %1...
|
||||
en.depinstall_missing=%1 must be installed before setup can continue. Please install %1 and run Setup again.
|
||||
en.depinstall_error=An error occured while installing the dependencies. Please restart the computer and run the setup again or install the following dependencies manually:%n
|
||||
|
||||
en.isxdl_langfile=
|
||||
|
||||
[Files]
|
|
@ -0,0 +1,18 @@
|
|||
[Languages]
|
||||
Name: "it"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[CustomMessages]
|
||||
;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
|
||||
en.lcid=1033
|
||||
en.depdownload_msg=Le seguenti applicazioni sono necessarie per poter continuare l'installazione:%n%n%1%nScaricare ed installa ora?
|
||||
en.depdownload_memo_title=Scarica dipendenze
|
||||
en.depinstall_memo_title=Installa dipendenze
|
||||
en.depinstall_title=Installazione dipendenze
|
||||
en.depinstall_description=Attendere che l'installazione installi le dipendenze sul computer.
|
||||
en.depinstall_status=Installazione %1...
|
||||
en.depinstall_missing=%1 deve essere installato prima che l'installazione possa continuare. Installa %1 ed esegui nuovamente il programma di installazione.
|
||||
en.depinstall_error=Si è verificato un errore durante l'installazione delle dipendenze. Riavviare il computer ed eseguire nuovamente l'installazione o installare manualmente le seguenti dipendenze: %n
|
||||
|
||||
it.isxdl_langfile=
|
||||
|
||||
[Files]
|
|
@ -0,0 +1,6 @@
|
|||
#include "isxdl\isxdl.iss"
|
||||
|
||||
[Code]
|
||||
#include "products.pas"
|
||||
|
||||
[Setup]
|
|
@ -0,0 +1,329 @@
|
|||
{
|
||||
--- TYPES AND VARIABLES ---
|
||||
}
|
||||
type
|
||||
TProduct = record
|
||||
File: String;
|
||||
Title: String;
|
||||
Parameters: String;
|
||||
ForceSuccess : boolean;
|
||||
InstallClean : boolean;
|
||||
MustRebootAfter : boolean;
|
||||
end;
|
||||
|
||||
InstallResult = (InstallSuccessful, InstallRebootRequired, InstallError);
|
||||
|
||||
var
|
||||
installMemo, downloadMessage: string;
|
||||
products: array of TProduct;
|
||||
delayedReboot, isForcedX86: boolean;
|
||||
DependencyPage: TOutputProgressWizardPage;
|
||||
|
||||
procedure AddProduct(filename, parameters, title, size, url: string; forceSuccess, installClean, mustRebootAfter : boolean);
|
||||
{
|
||||
Adds a product to the list of products to download.
|
||||
Parameters:
|
||||
filename: the file name under which to save the file
|
||||
parameters: the parameters with which to run the file
|
||||
title: the product title
|
||||
size: the file size
|
||||
url: the URL to download from
|
||||
forceSuccess: whether to continue in case of setup failure
|
||||
installClean: whether the product needs a reboot before installing
|
||||
mustRebootAfter: whether the product needs a reboot after installing
|
||||
}
|
||||
var
|
||||
path: string;
|
||||
i: Integer;
|
||||
begin
|
||||
installMemo := installMemo + '%1' + title + #13;
|
||||
|
||||
path := ExpandConstant('{src}{\}') + CustomMessage('DependenciesDir') + '\' + filename;
|
||||
if not FileExists(path) then begin
|
||||
path := ExpandConstant('{tmp}{\}') + filename;
|
||||
|
||||
if not FileExists(path) then begin
|
||||
isxdl_AddFile(url, path);
|
||||
|
||||
downloadMessage := downloadMessage + '%1' + title + ' (' + size + ')' + #13;
|
||||
end;
|
||||
end;
|
||||
|
||||
i := GetArrayLength(products);
|
||||
SetArrayLength(products, i + 1);
|
||||
products[i].File := path;
|
||||
products[i].Title := title;
|
||||
products[i].Parameters := parameters;
|
||||
products[i].ForceSuccess := forceSuccess;
|
||||
products[i].InstallClean := installClean;
|
||||
products[i].MustRebootAfter := mustRebootAfter;
|
||||
end;
|
||||
|
||||
function SmartExec(product : TProduct; var resultcode : Integer): boolean;
|
||||
{
|
||||
Executes a product and returns the exit code.
|
||||
Parameters:
|
||||
product: the product to install
|
||||
resultcode: the exit code
|
||||
}
|
||||
begin
|
||||
if (LowerCase(Copy(product.File, Length(product.File) - 2, 3)) = 'exe') then begin
|
||||
Result := Exec(product.File, product.Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, resultcode);
|
||||
end else begin
|
||||
Result := ShellExec('', product.File, product.Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, resultcode);
|
||||
end;
|
||||
end;
|
||||
|
||||
function PendingReboot: boolean;
|
||||
{
|
||||
Checks whether the machine has a pending reboot.
|
||||
}
|
||||
var names: String;
|
||||
begin
|
||||
if (RegQueryMultiStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager', 'PendingFileRenameOperations', names)) then begin
|
||||
Result := true;
|
||||
end else if ((RegQueryMultiStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager', 'SetupExecute', names)) and (names <> '')) then begin
|
||||
Result := true;
|
||||
end else begin
|
||||
Result := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
function InstallProducts: InstallResult;
|
||||
{
|
||||
Installs the downloaded products
|
||||
}
|
||||
var
|
||||
resultCode, i, productCount, finishCount: Integer;
|
||||
begin
|
||||
Result := InstallSuccessful;
|
||||
productCount := GetArrayLength(products);
|
||||
|
||||
if productCount > 0 then begin
|
||||
DependencyPage := CreateOutputProgressPage(CustomMessage('depinstall_title'), CustomMessage('depinstall_description'));
|
||||
DependencyPage.Show;
|
||||
|
||||
for i := 0 to productCount - 1 do begin
|
||||
if (products[i].InstallClean and (delayedReboot or PendingReboot())) then begin
|
||||
Result := InstallRebootRequired;
|
||||
break;
|
||||
end;
|
||||
|
||||
DependencyPage.SetText(FmtMessage(CustomMessage('depinstall_status'), [products[i].Title]), '');
|
||||
DependencyPage.SetProgress(i, productCount);
|
||||
|
||||
while true do begin
|
||||
// set 0 as used code for shown error if SmartExec fails
|
||||
resultCode := 0;
|
||||
if SmartExec(products[i], resultCode) then begin
|
||||
// setup executed; resultCode contains the exit code
|
||||
if (products[i].MustRebootAfter) then begin
|
||||
// delay reboot after install if we installed the last dependency anyways
|
||||
if (i = productCount - 1) then begin
|
||||
delayedReboot := true;
|
||||
end else begin
|
||||
Result := InstallRebootRequired;
|
||||
end;
|
||||
break;
|
||||
end else if (resultCode = 0) or (products[i].ForceSuccess) then begin
|
||||
finishCount := finishCount + 1;
|
||||
break;
|
||||
end else if (resultCode = 3010) then begin
|
||||
// Windows Installer resultCode 3010: ERROR_SUCCESS_REBOOT_REQUIRED
|
||||
delayedReboot := true;
|
||||
finishCount := finishCount + 1;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
||||
case MsgBox(FmtMessage(SetupMessage(msgErrorFunctionFailed), [products[i].Title, IntToStr(resultCode)]), mbError, MB_ABORTRETRYIGNORE) of
|
||||
IDABORT: begin
|
||||
Result := InstallError;
|
||||
break;
|
||||
end;
|
||||
IDIGNORE: begin
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if Result <> InstallSuccessful then begin
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
||||
// only leave not installed products for error message
|
||||
for i := 0 to productCount - finishCount - 1 do begin
|
||||
products[i] := products[i+finishCount];
|
||||
end;
|
||||
SetArrayLength(products, productCount - finishCount);
|
||||
|
||||
DependencyPage.Hide;
|
||||
end;
|
||||
end;
|
||||
|
||||
{
|
||||
--------------------
|
||||
INNO EVENT FUNCTIONS
|
||||
--------------------
|
||||
}
|
||||
|
||||
function PrepareToInstall(var NeedsRestart: boolean): String;
|
||||
{
|
||||
Before the "preparing to install" page.
|
||||
See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
|
||||
}
|
||||
var
|
||||
i: Integer;
|
||||
s: string;
|
||||
begin
|
||||
delayedReboot := false;
|
||||
|
||||
case InstallProducts() of
|
||||
InstallError: begin
|
||||
s := CustomMessage('depinstall_error');
|
||||
|
||||
for i := 0 to GetArrayLength(products) - 1 do begin
|
||||
s := s + #13 + ' ' + products[i].Title;
|
||||
end;
|
||||
|
||||
Result := s;
|
||||
end;
|
||||
InstallRebootRequired: begin
|
||||
Result := products[0].Title;
|
||||
NeedsRestart := true;
|
||||
|
||||
// write into the registry that the installer needs to be executed again after restart
|
||||
RegWriteStringValue(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce', 'InstallBootstrap', ExpandConstant('{srcexe}'));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function NeedRestart : boolean;
|
||||
{
|
||||
Checks whether a restart is needed at the end of install
|
||||
See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
|
||||
}
|
||||
begin
|
||||
Result := delayedReboot;
|
||||
end;
|
||||
|
||||
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
|
||||
{
|
||||
Just before the "ready" page.
|
||||
See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
|
||||
}
|
||||
var
|
||||
s: string;
|
||||
begin
|
||||
if downloadMessage <> '' then
|
||||
s := s + CustomMessage('depdownload_memo_title') + ':' + NewLine + FmtMessage(downloadMessage, [Space]) + NewLine;
|
||||
if installMemo <> '' then
|
||||
s := s + CustomMessage('depinstall_memo_title') + ':' + NewLine + FmtMessage(installMemo, [Space]) + NewLine;
|
||||
|
||||
if MemoDirInfo <> '' then
|
||||
s := s + MemoDirInfo + NewLine + NewLine;
|
||||
if MemoGroupInfo <> '' then
|
||||
s := s + MemoGroupInfo + NewLine + NewLine;
|
||||
if MemoTasksInfo <> '' then
|
||||
s := s + MemoTasksInfo;
|
||||
|
||||
Result := s
|
||||
end;
|
||||
|
||||
function NextButtonClick(CurPageID: Integer): boolean;
|
||||
{
|
||||
At each "next" button click
|
||||
See: http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
|
||||
}
|
||||
begin
|
||||
Result := true;
|
||||
|
||||
if CurPageID = wpReady then begin
|
||||
if downloadMessage <> '' then begin
|
||||
// change isxdl language only if it is not english because isxdl default language is already english
|
||||
if (ActiveLanguage() <> 'en') then begin
|
||||
ExtractTemporaryFile(CustomMessage('isxdl_langfile'));
|
||||
isxdl_SetOption('language', ExpandConstant('{tmp}{\}') + CustomMessage('isxdl_langfile'));
|
||||
end;
|
||||
//isxdl_SetOption('title', FmtMessage(SetupMessage(msgSetupWindowTitle), [CustomMessage('appname')]));
|
||||
|
||||
//if SuppressibleMsgBox(FmtMessage(CustomMessage('depdownload_msg'), [FmtMessage(downloadMessage, [''])]), mbConfirmation, MB_YESNO, IDYES) = IDNO then
|
||||
// Result := false
|
||||
//else if
|
||||
if isxdl_DownloadFiles(StrToInt(ExpandConstant('{wizardhwnd}'))) = 0 then
|
||||
Result := false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{
|
||||
-----------------------------
|
||||
ARCHITECTURE HELPER FUNCTIONS
|
||||
-----------------------------
|
||||
}
|
||||
|
||||
function IsX86: boolean;
|
||||
{
|
||||
Gets whether the computer is x86 (32 bits).
|
||||
}
|
||||
begin
|
||||
Result := isForcedX86 or (ProcessorArchitecture = paX86) or (ProcessorArchitecture = paUnknown);
|
||||
end;
|
||||
|
||||
function IsX64: boolean;
|
||||
{
|
||||
Gets whether the computer is x64 (64 bits).
|
||||
}
|
||||
begin
|
||||
Result := (not isForcedX86) and Is64BitInstallMode and (ProcessorArchitecture = paX64);
|
||||
end;
|
||||
|
||||
function IsIA64: boolean;
|
||||
{
|
||||
Gets whether the computer is IA64 (Itanium 64 bits).
|
||||
}
|
||||
begin
|
||||
Result := (not isForcedX86) and Is64BitInstallMode and (ProcessorArchitecture = paIA64);
|
||||
end;
|
||||
|
||||
function GetString(x86, x64, ia64: String): String;
|
||||
{
|
||||
Gets a string depending on the computer architecture.
|
||||
Parameters:
|
||||
x86: the string if the computer is x86
|
||||
x64: the string if the computer is x64
|
||||
ia64: the string if the computer is IA64
|
||||
}
|
||||
begin
|
||||
if IsX64() and (x64 <> '') then begin
|
||||
Result := x64;
|
||||
end else if IsIA64() and (ia64 <> '') then begin
|
||||
Result := ia64;
|
||||
end else begin
|
||||
Result := x86;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetArchitectureString(): String;
|
||||
{
|
||||
Gets the "standard" architecture suffix string.
|
||||
Returns either _x64, _ia64 or nothing.
|
||||
}
|
||||
begin
|
||||
if IsX64() then begin
|
||||
Result := '_x64';
|
||||
end else if IsIA64() then begin
|
||||
Result := '_ia64';
|
||||
end else begin
|
||||
Result := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SetForceX86(value: boolean);
|
||||
{
|
||||
Forces the setup to use X86 products
|
||||
}
|
||||
begin
|
||||
isForcedX86 := value;
|
||||
end;
|
|
@ -0,0 +1,49 @@
|
|||
[Code]
|
||||
#ifdef UNICODE
|
||||
#define AW "W"
|
||||
#else
|
||||
#define AW "A"
|
||||
#endif
|
||||
|
||||
type
|
||||
INSTALLSTATE = Longint;
|
||||
const
|
||||
INSTALLSTATE_INVALIDARG = -2; // An invalid parameter was passed to the function.
|
||||
INSTALLSTATE_UNKNOWN = -1; // The product is neither advertised or installed.
|
||||
INSTALLSTATE_ADVERTISED = 1; // The product is advertised but not installed.
|
||||
INSTALLSTATE_ABSENT = 2; // The product is installed for a different user.
|
||||
INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user.
|
||||
|
||||
function MsiQueryProductState(szProduct: string): INSTALLSTATE;
|
||||
external 'MsiQueryProductState{#AW}@msi.dll stdcall';
|
||||
|
||||
function MsiEnumRelatedProducts(szUpgradeCode: string; nReserved: dword; nIndex: dword; szProductCode: string): integer;
|
||||
external 'MsiEnumRelatedProducts{#AW}@msi.dll stdcall';
|
||||
|
||||
function MsiGetProductInfo(szProductCode: string; szProperty: string; szValue: string; var nvalueSize: dword): integer;
|
||||
external 'MsiGetProductInfo{#AW}@msi.dll stdcall';
|
||||
|
||||
function msiproduct(productID: string): boolean;
|
||||
begin
|
||||
Result := MsiQueryProductState(productID) = INSTALLSTATE_DEFAULT;
|
||||
end;
|
||||
|
||||
function msiproductupgrade(upgradeCode: string; minVersion: string): boolean;
|
||||
var
|
||||
productCode, version: string;
|
||||
valueSize: dword;
|
||||
begin
|
||||
SetLength(productCode, 39);
|
||||
Result := false;
|
||||
|
||||
if (MsiEnumRelatedProducts(upgradeCode, 0, 0, productCode) = 0) then begin
|
||||
SetLength(version, 39);
|
||||
valueSize := Length(version);
|
||||
|
||||
if (MsiGetProductInfo(productCode, 'VersionString', version, valueSize) = 0) then begin
|
||||
Result := compareversion(version, minVersion) >= 0;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
[Setup]
|
|
@ -0,0 +1,62 @@
|
|||
[Code]
|
||||
function stringtoversion(var temp: String): Integer;
|
||||
var
|
||||
part: String;
|
||||
pos1: Integer;
|
||||
|
||||
begin
|
||||
if (Length(temp) = 0) then begin
|
||||
Result := -1;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
pos1 := Pos('.', temp);
|
||||
if (pos1 = 0) then begin
|
||||
Result := StrToInt(temp);
|
||||
temp := '';
|
||||
end else begin
|
||||
part := Copy(temp, 1, pos1 - 1);
|
||||
temp := Copy(temp, pos1 + 1, Length(temp));
|
||||
Result := StrToInt(part);
|
||||
end;
|
||||
end;
|
||||
|
||||
function compareinnerversion(var x, y: String): Integer;
|
||||
var
|
||||
num1, num2: Integer;
|
||||
|
||||
begin
|
||||
num1 := stringtoversion(x);
|
||||
num2 := stringtoversion(y);
|
||||
if (num1 = -1) and (num2 = -1) then begin
|
||||
Result := 0;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if (num1 < 0) then begin
|
||||
num1 := 0;
|
||||
end;
|
||||
if (num2 < 0) then begin
|
||||
num2 := 0;
|
||||
end;
|
||||
|
||||
if (num1 < num2) then begin
|
||||
Result := -1;
|
||||
end else if (num1 > num2) then begin
|
||||
Result := 1;
|
||||
end else begin
|
||||
Result := compareinnerversion(x, y);
|
||||
end;
|
||||
end;
|
||||
|
||||
function compareversion(versionA, versionB: String): Integer;
|
||||
var
|
||||
temp1, temp2: String;
|
||||
|
||||
begin
|
||||
temp1 := versionA;
|
||||
temp2 := versionB;
|
||||
Result := compareinnerversion(temp1, temp2);
|
||||
end;
|
||||
|
||||
[Setup]
|
|
@ -0,0 +1,32 @@
|
|||
; requires Windows 10, Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003 Service Pack 2, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP Service Pack 3
|
||||
; http://www.visualstudio.com/en-us/downloads/
|
||||
|
||||
[CustomMessages]
|
||||
vcredist2017_title=Visual C++ 2017 Redistributable
|
||||
vcredist2017_title_x64=Visual C++ 2017 64-Bit Redistributable
|
||||
|
||||
vcredist2017_size=13.7 MB
|
||||
vcredist2017_size_x64=14.5 MB
|
||||
|
||||
[Code]
|
||||
const
|
||||
vcredist2017_url = 'http://download.microsoft.com/download/1/f/e/1febbdb2-aded-4e14-9063-39fb17e88444/vc_redist.x86.exe';
|
||||
vcredist2017_url_x64 = 'http://download.microsoft.com/download/3/b/f/3bf6e759-c555-4595-8973-86b7b4312927/vc_redist.x64.exe';
|
||||
|
||||
vcredist2017_upgradecode = '{65E5BD06-6392-3027-8C26-853107D3CF1A}';
|
||||
vcredist2017_upgradecode_x64 = '{36F68A90-239C-34DF-B58C-64B30153CE35}';
|
||||
|
||||
procedure vcredist2017(minVersion: string);
|
||||
begin
|
||||
if (not IsIA64()) then begin
|
||||
if (not msiproductupgrade(GetString(vcredist2017_upgradecode, vcredist2017_upgradecode_x64, ''), minVersion)) then
|
||||
AddProduct('vcredist2017' + GetArchitectureString() + '.exe',
|
||||
'/passive /norestart',
|
||||
CustomMessage('vcredist2017_title' + GetArchitectureString()),
|
||||
CustomMessage('vcredist2017_size' + GetArchitectureString()),
|
||||
GetString(vcredist2017_url, vcredist2017_url_x64, ''),
|
||||
false, false, false);
|
||||
end;
|
||||
end;
|
||||
|
||||
[Setup]
|
|
@ -0,0 +1,49 @@
|
|||
[Code]
|
||||
var
|
||||
WindowsVersion: TWindowsVersion;
|
||||
|
||||
procedure initwinversion();
|
||||
begin
|
||||
GetWindowsVersionEx(WindowsVersion);
|
||||
end;
|
||||
|
||||
function exactwinversion(MajorVersion, MinorVersion: integer): boolean;
|
||||
begin
|
||||
Result := (WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor = MinorVersion);
|
||||
end;
|
||||
|
||||
function minwinversion(MajorVersion, MinorVersion: integer): boolean;
|
||||
begin
|
||||
Result := (WindowsVersion.Major > MajorVersion) or ((WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor >= MinorVersion));
|
||||
end;
|
||||
|
||||
function maxwinversion(MajorVersion, MinorVersion: integer): boolean;
|
||||
begin
|
||||
Result := (WindowsVersion.Major < MajorVersion) or ((WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor <= MinorVersion));
|
||||
end;
|
||||
|
||||
function exactwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
|
||||
begin
|
||||
if exactwinversion(MajorVersion, MinorVersion) then
|
||||
Result := WindowsVersion.ServicePackMajor = SpVersion
|
||||
else
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
function minwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
|
||||
begin
|
||||
if exactwinversion(MajorVersion, MinorVersion) then
|
||||
Result := WindowsVersion.ServicePackMajor >= SpVersion
|
||||
else
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
function maxwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
|
||||
begin
|
||||
if exactwinversion(MajorVersion, MinorVersion) then
|
||||
Result := WindowsVersion.ServicePackMajor <= SpVersion
|
||||
else
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
[Setup]
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Barrier</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>barrier</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Barrier.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>barrier</string>
|
||||
<!-- TODO: Fix this in v2.0 //-->
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Barrier</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SYN1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@BARRIER_VERSION@</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@BARRIER_VERSION@</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>© 2018 Debauchee Open Source Group</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.12.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
APPLSYN1
|
Binary file not shown.
|
@ -0,0 +1,73 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Use the same verbose variable as CMake
|
||||
[ "$VERBOSE" = "1" ] && set -x
|
||||
|
||||
# Exit on unset variables or pipe errors
|
||||
set -uo pipefail
|
||||
|
||||
B_MACOS="Barrier.app/Contents/MacOS"
|
||||
B_VERSION="@BARRIER_VERSION@"
|
||||
B_BINDIR="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
|
||||
B_BUILDTYPE="@CMAKE_BUILD_TYPE@"
|
||||
B_BARRIERC="Barrier.app/Contents/MacOS/barrierc"
|
||||
B_BARRIERS="Barrier.app/Contents/MacOS/barriers"
|
||||
|
||||
# Colorized output
|
||||
info() { tput bold; echo "$@"; tput sgr0 ; }
|
||||
error() { tput bold; tput setaf 1; echo "$@"; tput sgr0 ; }
|
||||
success() { tput bold; tput setaf 2; echo "$@"; tput sgr0 ; }
|
||||
warn() { tput bold; tput setaf 3; echo "$@"; tput sgr0 ; }
|
||||
|
||||
info "Checking for bundle contents"
|
||||
if [ ! -d "Barrier.app/Contents" ]; then
|
||||
error "Please make sure that the build completed successfully"
|
||||
error "before trying to create the installer."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$B_MACOS" ]; then
|
||||
info "Removing old binaries from bundle"
|
||||
rm -r "$B_MACOS"
|
||||
fi
|
||||
|
||||
info "Copying binaries into bundle"
|
||||
# Copy the folder instead of globbing unquoted path
|
||||
cp -r "$B_BINDIR" "$B_MACOS" || exit 1
|
||||
|
||||
# Check for macdeployqt on MacPorts
|
||||
if which -s port ; then
|
||||
info "MacPorts found, searching for macdeployqt"
|
||||
DEPLOYQT="$(port contents qt5-qttools | grep --only --max-count 1 '/.*macdeployqt')"
|
||||
if [ ! -x "$DEPLOYQT" ]; then
|
||||
error "Please install package qt5-qttools"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for macdeployqt on Homebrew
|
||||
if which -s brew ; then
|
||||
info "Homebrew found, searching for macdeployqt"
|
||||
DEPLOYQT="$(brew list qt@5 | grep --only '/.*macdeployqt' | head -1)"
|
||||
if [ ! -x "$DEPLOYQT" ]; then
|
||||
error "Please install package qt"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use macdeployqt to include libraries and create dmg
|
||||
if [ "$B_BUILDTYPE" = "Release" ]; then
|
||||
info "Building Release disk image (dmg)"
|
||||
"$DEPLOYQT" Barrier.app -dmg \
|
||||
-executable="$B_BARRIERC" \
|
||||
-executable="$B_BARRIERS" || exit 1
|
||||
mv "Barrier.dmg" "Barrier-$B_VERSION.dmg" || exit 1
|
||||
success "Created Barrier-$B_VERSION.dmg"
|
||||
else
|
||||
warn "Disk image (dmg) only created for Release builds"
|
||||
info "Building debug bundle"
|
||||
"$DEPLOYQT" Barrier.app -no-strip \
|
||||
-executable="$B_BARRIERC" \
|
||||
-executable="$B_BARRIERS" || exit 1
|
||||
success "Bundle created successfully"
|
||||
fi
|
|
@ -0,0 +1,83 @@
|
|||
#!/bin/sh
|
||||
|
||||
# add warning for users running manually
|
||||
warn() { tput bold; tput setaf 3; echo "$@"; tput sgr0 ; }
|
||||
warn "The scripts build_installer.sh and reref_dylibs.sh have been deprecated."
|
||||
warn "Please use build_dist.sh instead to deploy using macdeployqt"
|
||||
|
||||
# change this to rename the installer package
|
||||
B_DMG="Barrier-@BARRIER_VERSION@.dmg"
|
||||
|
||||
cd "$( dirname "$0" )"
|
||||
OWNDIR="$( pwd )"
|
||||
|
||||
B_REREF_SCRIPT="$OWNDIR/reref_dylibs.sh"
|
||||
if [ ! -x "$B_REREF_SCRIPT" ]; then
|
||||
echo "Missing script: $B_REREF_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove any old copies so there's no confusion about whether this
|
||||
# process completes successfully or not
|
||||
rm -rf temp.dmg "$B_DMG"
|
||||
|
||||
cd Barrier.app/Contents 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Please make sure that the build completed successfully"
|
||||
echo "before trying to create the installer."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# MacOS folder holds the executables, non-system libraries,
|
||||
# and the startup script
|
||||
rm -rf MacOS
|
||||
mkdir MacOS || exit 1
|
||||
cd MacOS || exit 1
|
||||
|
||||
# copy all executables
|
||||
cp @CMAKE_RUNTIME_OUTPUT_DIRECTORY@/* . || exit 1
|
||||
|
||||
# copy the qt platform plugin
|
||||
# TODO: this is hacky and will probably break if there is more than one qt
|
||||
# version installed. need a better way to find this library
|
||||
B_COCOA=$(find /usr/local/Cellar/qt -type f -name libqcocoa.dylib | head -1)
|
||||
if [ "x$B_COCOA" = "x" ]; then
|
||||
B_COCOA=$(find /opt/local/libexec/qt5/plugins -type f -name libqcocoa.dylib | head -1)
|
||||
fi
|
||||
if [ "x$B_COCOA" = "x" ]; then
|
||||
echo "Could not find cocoa platform plugin"
|
||||
exit 1
|
||||
fi
|
||||
mkdir platforms
|
||||
cp $B_COCOA platforms/ || exit 1
|
||||
|
||||
# make sure we can r/w all these binaries
|
||||
chmod -R u+rw * || exit 1
|
||||
|
||||
# only one executable (barrier) needs non-system libraries although it's
|
||||
# libraries can call each other. use a recursive script to handle the
|
||||
# re-referencing
|
||||
$B_REREF_SCRIPT barrier || exit 1
|
||||
# the cocoa platform plugin also needs to know where to find the qt libraries.
|
||||
# because it exists in a subdirectory we append ../ to the relative path of the
|
||||
# libraries in its metadata
|
||||
$B_REREF_SCRIPT platforms/libqcocoa.dylib ../ || exit 1
|
||||
|
||||
echo "Barrier.app created successfully"
|
||||
|
||||
# sanity check so we don't distribute a dmg with debug symbols
|
||||
if [ "@CMAKE_BUILD_TYPE@" != "Release" ]; then
|
||||
echo "dmg only created for Release builds"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create the DMG to be distributed in build/bundle
|
||||
cd ../../..
|
||||
hdiutil create -size 64m -fs HFS+ -volname "Barrier" temp.dmg || exit 1
|
||||
hdiutil attach temp.dmg -mountpoint mnt || exit 1
|
||||
cp -r Barrier.app mnt/ || exit 1
|
||||
hdiutil detach mnt || exit 1
|
||||
hdiutil convert temp.dmg -format UDZO -o "$B_DMG" || exit 1
|
||||
rm temp.dmg
|
||||
|
||||
echo "dmg $B_DMG created successfully"
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $1 = binary (program or dylib)
|
||||
B_TARGET=$1
|
||||
if [ "x$B_TARGET" = "x" ]; then
|
||||
|
||||
# add warning for users running manually
|
||||
warn() { tput bold; tput setaf 3; echo "$@"; tput sgr0 ; }
|
||||
warn "The scripts build_installer.sh and reref_dylibs.sh have been deprecated."
|
||||
warn "Please use build_dist.sh instead to deploy using macdeployqt"
|
||||
|
||||
echo "Which binary needs to be re-referenced?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$(dirname "$B_TARGET")" || exit 1
|
||||
|
||||
# where to find non-system libraries relative to target's directory.
|
||||
# the vast majority of the time this should be empty
|
||||
B_REL_PATH=$2
|
||||
|
||||
# we're in target's directory now. trim off the path
|
||||
B_TARGET=$(basename "$B_TARGET")
|
||||
|
||||
# get a list of non-system libraries and make local copies
|
||||
B_LIBS=$(otool -XL "$B_TARGET" | awk '{ print $1 }' | grep -Ev '^(/usr/lib|/System)')
|
||||
[ $? -ne 0 ] && exit 1
|
||||
for B_LIB in $B_LIBS; do
|
||||
B_LIB_NAME=$(basename "$B_LIB")
|
||||
# otool reports barrier as "barrier:" which fails self-reference test below
|
||||
B_LIB_NAME=${B_LIB_NAME//:}
|
||||
|
||||
# ignore self-references
|
||||
[ "$B_TARGET" = "$B_LIB_NAME" ] && continue
|
||||
|
||||
B_DST=${B_REL_PATH}${B_LIB_NAME}
|
||||
if [ ! -e "$B_DST" ]; then
|
||||
cp "$B_LIB" "$B_DST" || exit 1
|
||||
chmod u+rw "$B_DST" || exit 1
|
||||
# recursively call this script on libraries purposefully not passing
|
||||
# $B_REL_PATH so that it is only used explicitly
|
||||
$0 "$B_DST"
|
||||
fi
|
||||
|
||||
# adjust the target's metadata to point to the local copy
|
||||
# rather than the system-wide copy which would only exist on
|
||||
# a development machine
|
||||
install_name_tool -change "$B_LIB" "@loader_path/$B_DST" "$B_TARGET" || exit 1
|
||||
done
|
|
@ -0,0 +1,105 @@
|
|||
%global barrier_revision @BARRIER_REVISION@
|
||||
Summary: Keyboard and mouse sharing solution
|
||||
Name: barrier
|
||||
Version: @BARRIER_VERSION@
|
||||
Release: @BARRIER_BUILD_NUMBER@%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
URL: https://github.com/debauchee/barrier
|
||||
Source0: https://github.com/debauchee/barrier/archive/v%{version}.tar.gz
|
||||
|
||||
BuildRequires: cmake3
|
||||
BuildRequires: avahi-compat-libdns_sd-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXtst-devel
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: libcurl-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: openssl-devel
|
||||
|
||||
%description
|
||||
Barrier allows you to share one mouse and keyboard between multiple computers.
|
||||
Work seamlessly across Windows, macOS and Linux.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
%{cmake3} -DSYNERGY_VERSION_STAGE:STRING=@BARRIER_VERSION_STAGE@ -DSYNERGY_REVISION:STRING=%{barrier_revision} .
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
install -D -p -m 0755 bin/barrier %{buildroot}%{_bindir}/barrier
|
||||
install -D -p -m 0755 bin/barrierc %{buildroot}%{_bindir}/barrierc
|
||||
install -D -p -m 0755 bin/barriers %{buildroot}%{_bindir}/barriers
|
||||
install -D -p -m 0644 doc/barrierc.1 %{buildroot}%{_mandir}/man1/barrierc.1
|
||||
install -D -p -m 0644 doc/barriers.1 %{buildroot}%{_mandir}/man1/barriers.1
|
||||
install -D -p -m 0644 res/barrier.desktop %{buildroot}%{_datadir}/applications/barrier.desktop
|
||||
install -D -p -m 0644 res/barrier.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/barrier.svg
|
||||
|
||||
cd %{buildroot}%{_bindir}
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/metainfo
|
||||
## Write AppStream
|
||||
cat <<END> %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2018 Ding-Yi Chen <dchen@redhat.com> -->
|
||||
<component type="desktop-application">
|
||||
<id>%{name}</id>
|
||||
<metadata_license>FSFAP</metadata_license>
|
||||
<project_license>GPLv2</project_license>
|
||||
<name>barrier</name>
|
||||
<summary>Share mouse and keyboard between multiple computers over the network</summary>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
Barrier allows you to share one mouse and keyboard between multiple computers.
|
||||
Work seamlessly across Windows, macOS and Linux.
|
||||
</p>
|
||||
</description>
|
||||
|
||||
<launchable type="desktop-id">%{name}.desktop</launchable>
|
||||
|
||||
<url type="homepage">https://github.com/debauchee/barrier</url>
|
||||
|
||||
<provides>
|
||||
<binary>barrier</binary>
|
||||
<binary>barrierc</binary>
|
||||
<binary>barriers</binary>
|
||||
</provides>
|
||||
|
||||
<releases>
|
||||
<release version="%{version}" date="2019-03-21" />
|
||||
</releases>
|
||||
</component>
|
||||
END
|
||||
|
||||
desktop-file-install --delete-original \
|
||||
--dir %{buildroot}%{_datadir}/applications \
|
||||
--set-icon=%{_datadir}/icons/hicolor/scalable/apps/barrier.svg \
|
||||
%{buildroot}%{_datadir}/applications/barrier.desktop
|
||||
|
||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/barrier.desktop
|
||||
|
||||
%files
|
||||
# None of the documentation files are actually useful here, they all point to
|
||||
# the online website, so include just one, the README
|
||||
%doc LICENSE ChangeLog res/Readme.txt doc/barrier.conf.example*
|
||||
%{_bindir}/barrier
|
||||
%{_bindir}/barrierc
|
||||
%{_bindir}/barriers
|
||||
%{_datadir}/icons/hicolor/scalable/apps/barrier.svg
|
||||
%{_datadir}/applications/barrier.desktop
|
||||
%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
%{_mandir}/man1/barrierc.1*
|
||||
%{_mandir}/man1/barriers.1*
|
||||
|
||||
%changelog
|
||||
* Thu Mar 21 2019 wendall911 <wendallc@83864.com>
|
||||
- Actual working spec file for Fedora
|
||||
|
||||
* Sat Jan 27 2018 Debauchee <todo@mail.com>
|
||||
- Initial version of the package
|
||||
|
|
@ -1,14 +1,15 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "synergy", "synergy.wixproj", "{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}"
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Barrier", "Barrier.wixproj", "{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x86 = Release|x86
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x86.ActiveCfg = Debug|x86
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProductVersion>3.10</ProductVersion>
|
||||
<ProjectGuid>{d4ba9f39-6a35-4c8f-9cb2-67fcbe5cab17}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>Barrier</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>wix\obj\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<WixExtension Include="WixFirewallExtension">
|
||||
<HintPath>$(WixExtDir)\WixFirewallExtension.dll</HintPath>
|
||||
<Name>WixFirewallExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixUtilExtension">
|
||||
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
||||
<Name>WixUtilExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixUIExtension">
|
||||
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
||||
<Name>WixUIExtension</Name>
|
||||
</WixExtension>
|
||||
<Compile Include="Product.wxs"/>
|
||||
<Content Include="Include.wxi"/>
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)"/>
|
||||
</Project>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Include>
|
||||
<?define Name="Barrier" ?>
|
||||
<?define Version="@BARRIER_WIX_VERSION@" ?>
|
||||
<?define QtVersion="@QT_VERSION@" ?>
|
||||
<?define Author="Debauchee Open Source Group" ?>
|
||||
<?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?>
|
||||
<?define ResPath="@CMAKE_CURRENT_SOURCE_DIR@/res" ?>
|
||||
<?define ExtPath="@CMAKE_CURRENT_SOURCE_DIR@/ext" ?>
|
||||
<?if $(var.Platform) = "x64" ?>
|
||||
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
|
||||
<?define PlatformSimpleName="64-bit" ?>
|
||||
<?define UpgradeGuid="E8A4FA54-14B9-4FD1-8E00-7BC46555FDA0" ?>
|
||||
<?define QtPath="@CMAKE_PREFIX_PATH@" ?>
|
||||
<?else ?>
|
||||
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
|
||||
<?define PlatformSimpleName="32-bit" ?>
|
||||
<?define UpgradeGuid="BE0B9FD8-45E2-4A8E-A0D8-1F774D074A78" ?>
|
||||
<?define QtPath="@CMAKE_PREFIX_PATH@" ?>
|
||||
<?endif ?>
|
||||
<?define QtBinPath="$(var.QtPath)\bin" ?>
|
||||
<?define QtPlatformPath="$(var.QtPath)\plugins\platforms" ?>
|
||||
<?define OpenSSLPath="$(var.ExtPath)\openssl\windows\$(var.Platform)" ?>
|
||||
<?define OpenSSLBinPath="$(var.OpenSSLPath)\bin" ?>
|
||||
</Include>
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||
<?include Include.wxi?>
|
||||
<Product Id="*" Language="1033" Manufacturer="$(var.Author)" Name="$(var.Name) ($(var.PlatformSimpleName))" UpgradeCode="$(var.UpgradeGuid)" Version="$(var.Version)">
|
||||
<Package Compressed="yes" InstallScope="perMachine" InstallerVersion="301"/>
|
||||
<MajorUpgrade DowngradeErrorMessage="A newer version of $(var.Name) is already installed."/>
|
||||
<MediaTemplate EmbedCab="yes"/>
|
||||
<UIRef Id="WixUI_InstallDir"/>
|
||||
<!-- causes ICE61 warning, but stops user from installing many instances from nightly builds. -->
|
||||
<Upgrade Id="$(var.UpgradeGuid)">
|
||||
<UpgradeVersion Minimum="0.0.0.0" Property="UPGRADE"/>
|
||||
</Upgrade>
|
||||
<Feature Id="ProductFeature" Title="$(var.Name)">
|
||||
<ComponentGroupRef Id="ProductComponents"/>
|
||||
<ComponentGroupRef Id="ProductQtPluginComponents"/>
|
||||
<ComponentRef Id="RegistryEntries"/>
|
||||
</Feature>
|
||||
<DirectoryRef Id="TARGETDIR">
|
||||
<Component Guid="7CF3564D-1F8E-4D3D-9781-E1EE22D5BD67" Id="RegistryEntries">
|
||||
<RegistryKey ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" Root="HKLM">
|
||||
<RegistryValue Name="[INSTALLFOLDER]barriers.exe" Type="string" Value="~ HIGHDPIAWARE WIN7RTM"/>
|
||||
</RegistryKey>
|
||||
<!-- Windows 8 and later only -->
|
||||
<Condition><![CDATA[Installed OR (VersionNT >= 602)]]></Condition>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<Icon Id="barrier.ico" SourceFile="$(var.ResPath)/barrier.ico"/>
|
||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.ResPath)\License.rtf"/>
|
||||
<WixVariable Id="WixUIBannerBmp" Value="$(var.ResPath)\banner.bmp"/>
|
||||
<WixVariable Id="WixUIDialogBmp" Value="$(var.ResPath)\dialog.bmp"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="barrier.ico"/>
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
|
||||
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/>
|
||||
<CustomAction ExeCommand="" FileKey="GuiProgram" Id="StartGui" Return="asyncNoWait"/>
|
||||
<UI>
|
||||
<Publish Control="Finish" Dialog="ExitDialog" Event="DoAction" Value="StartGui">NOT Installed</Publish>
|
||||
</UI>
|
||||
</Product>
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="$(var.ProgramFilesFolder)">
|
||||
<Directory Id="INSTALLFOLDER" Name="$(var.Name)">
|
||||
<Directory Id="OpenSSLDir" Name="OpenSSL"/>
|
||||
<Directory Id="PlatformsDir" Name="Platforms"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder"/>
|
||||
</Directory>
|
||||
</Fragment>
|
||||
<Fragment>
|
||||
<ComponentGroup Directory="INSTALLFOLDER" Id="ProductComponents">
|
||||
<Component Guid="EC9AD3B0-277C-4157-B5C8-5FD5B6A5F4AD" Id="Core">
|
||||
<File KeyPath="yes" Source="$(var.BinPath)/barrierd.exe"/>
|
||||
<ServiceInstall Description="Controls the $(var.Name) foreground processes." DisplayName="$(var.Name)" ErrorControl="normal" Id="ServiceInstall" Name="Barrier" Start="auto" Type="ownProcess">
|
||||
<util:ServiceConfig FirstFailureActionType="restart" ResetPeriodInDays="1" RestartServiceDelayInSeconds="1" SecondFailureActionType="restart" ThirdFailureActionType="restart"/>
|
||||
</ServiceInstall>
|
||||
<ServiceControl Id="ServiceControl" Name="Barrier" Remove="uninstall" Start="install" Stop="both"/>
|
||||
<File Source="$(var.BinPath)/barriers.exe">
|
||||
<fire:FirewallException Id="ServerFirewallException" IgnoreFailure="yes" Name="$(var.Name)" Scope="any"/>
|
||||
</File>
|
||||
<File Source="$(var.BinPath)/barrierc.exe"/>
|
||||
<File Source="$(var.OpenSSLBinPath)/libeay32.dll"/>
|
||||
<File Source="$(var.OpenSSLBinPath)/ssleay32.dll"/>
|
||||
<File Source="$(var.OpenSSLBinPath)/openssl.exe"/>
|
||||
<File Source="$(var.ResPath)/openssl/barrier.conf"/>
|
||||
</Component>
|
||||
<Component Guid="BAC8149B-6287-45BF-9C27-43D71ED40214" Id="Gui">
|
||||
<File Id="GuiProgram" KeyPath="yes" Source="$(var.BinPath)/barrier.exe">
|
||||
<Shortcut Advertise="yes" Directory="ProgramMenuFolder" Icon="barrier.ico" Id="GuiShortcut" Name="$(var.Name)"/>
|
||||
<fire:FirewallException Id="GuiFirewallException" IgnoreFailure="yes" Name="$(var.Name)" Scope="any"/>
|
||||
</File>
|
||||
<?if $(var.Configuration) = "Debug" ?>
|
||||
<File Source="$(var.QtBinPath)\Qt5Cored.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Guid.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Networkd.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Svgd.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Widgetsd.dll"/>
|
||||
<File Source="$(var.QtBinPath)\libGLESv2d.dll"/>
|
||||
<File Source="$(var.QtBinPath)\libEGLd.dll"/>
|
||||
<!-- Hacky -->
|
||||
<File Source="C:\Program Files (x86)\Windows Kits\10\bin\$(var.Platform)\ucrt\ucrtbased.dll"/>
|
||||
<?else ?>
|
||||
<File Source="$(var.QtBinPath)\Qt5Core.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Gui.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Network.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Svg.dll"/>
|
||||
<File Source="$(var.QtBinPath)\Qt5Widgets.dll"/>
|
||||
<File Source="$(var.QtBinPath)\libGLESv2.dll"/>
|
||||
<File Source="$(var.QtBinPath)\libEGL.dll"/>
|
||||
<?endif ?>
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
<ComponentGroup Directory="PlatformsDir" Id="ProductQtPluginComponents">
|
||||
<Component Guid="684EFA14-856B-440E-A5E6-E90E04E36B41" Id="QtPlatformPlugin">
|
||||
<?if $(var.Configuration) = "Debug" ?>
|
||||
<File Source="$(var.QtPlatformPath)\qwindowsd.dll"/>
|
||||
<?else ?>
|
||||
<File Source="$(var.QtPlatformPath)\qwindows.dll"/>
|
||||
<?endif ?>
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
|
@ -5,14 +5,11 @@ To install on Mac OS X with the .zip distribution (first seen in 1.3.6) you must
|
|||
|
||||
1. Extract the zip file to any location (usually double click will do this)
|
||||
2. Open Terminal, and cd to the extracted directory (e.g. /Users/my-name/Downloads/extracted-dir/)
|
||||
3. Change to super user (use the su command)
|
||||
4. Copy the binaries to /usr/bin using: cp synergy* /usr/bin
|
||||
3. Copy the binaries to /usr/bin using: sudo cp barrier* /usr/bin
|
||||
4. Correct the permissions and ownership: sudo chown root:wheel /usr/bin/barrier*; sudo chmod 555 /usr/bin/barrier*
|
||||
|
||||
How to enable the root user in Mac OS X:
|
||||
Alternatively, you can copy the binaries as root. How to enable the root user in Mac OS X:
|
||||
http://support.apple.com/en-us/ht1528
|
||||
|
||||
Once the binaries have been copied to /usr/bin, you should follow the configuration guide:
|
||||
http://synergy2.sourceforge.net/configuration.html
|
||||
|
||||
If you have any problems, see the [[Support]] page:
|
||||
http://symless.com/help/
|
||||
|
|
|
@ -1,234 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorCodeStyle>
|
||||
<!-- Written by QtCreator 3.0.1, 2014-02-14T09:50:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>CodeStyleData</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="AlignAssignments">false</value>
|
||||
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="BindStarToIdentifier">true</value>
|
||||
<value type="bool" key="BindStarToLeftSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToRightSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToTypeName">false</value>
|
||||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
|
||||
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
||||
<value type="bool" key="IndentBlockBody">true</value>
|
||||
<value type="bool" key="IndentBlockBraces">false</value>
|
||||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
||||
<value type="bool" key="IndentClassBraces">false</value>
|
||||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
||||
<value type="bool" key="IndentEnumBraces">false</value>
|
||||
<value type="bool" key="IndentFunctionBody">true</value>
|
||||
<value type="bool" key="IndentFunctionBraces">false</value>
|
||||
<value type="bool" key="IndentNamespaceBody">false</value>
|
||||
<value type="bool" key="IndentNamespaceBraces">false</value>
|
||||
<value type="int" key="IndentSize">4</value>
|
||||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentSwitchLabels">false</value>
|
||||
<value type="int" key="PaddingMode">2</value>
|
||||
<value type="bool" key="SpacesForTabs">false</value>
|
||||
<value type="int" key="TabSize">4</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>DisplayName</variable>
|
||||
<value type="QString">Synergy</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorCodeStyle>
|
||||
<!-- Written by QtCreator 3.0.1, 2014-02-14T09:50:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>CodeStyleData</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="AlignAssignments">false</value>
|
||||
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="BindStarToIdentifier">true</value>
|
||||
<value type="bool" key="BindStarToLeftSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToRightSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToTypeName">false</value>
|
||||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
|
||||
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
||||
<value type="bool" key="IndentBlockBody">true</value>
|
||||
<value type="bool" key="IndentBlockBraces">false</value>
|
||||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
||||
<value type="bool" key="IndentClassBraces">false</value>
|
||||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
||||
<value type="bool" key="IndentEnumBraces">false</value>
|
||||
<value type="bool" key="IndentFunctionBody">true</value>
|
||||
<value type="bool" key="IndentFunctionBraces">false</value>
|
||||
<value type="bool" key="IndentNamespaceBody">false</value>
|
||||
<value type="bool" key="IndentNamespaceBraces">false</value>
|
||||
<value type="int" key="IndentSize">4</value>
|
||||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentSwitchLabels">false</value>
|
||||
<value type="int" key="PaddingMode">2</value>
|
||||
<value type="bool" key="SpacesForTabs">false</value>
|
||||
<value type="int" key="TabSize">4</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>DisplayName</variable>
|
||||
<value type="QString">Synergy</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorCodeStyle>
|
||||
<!-- Written by QtCreator 3.0.1, 2014-02-14T09:50:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>CodeStyleData</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="AlignAssignments">false</value>
|
||||
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="BindStarToIdentifier">true</value>
|
||||
<value type="bool" key="BindStarToLeftSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToRightSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToTypeName">false</value>
|
||||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
|
||||
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
||||
<value type="bool" key="IndentBlockBody">true</value>
|
||||
<value type="bool" key="IndentBlockBraces">false</value>
|
||||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
||||
<value type="bool" key="IndentClassBraces">false</value>
|
||||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
||||
<value type="bool" key="IndentEnumBraces">false</value>
|
||||
<value type="bool" key="IndentFunctionBody">true</value>
|
||||
<value type="bool" key="IndentFunctionBraces">false</value>
|
||||
<value type="bool" key="IndentNamespaceBody">false</value>
|
||||
<value type="bool" key="IndentNamespaceBraces">false</value>
|
||||
<value type="int" key="IndentSize">4</value>
|
||||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentSwitchLabels">false</value>
|
||||
<value type="int" key="PaddingMode">2</value>
|
||||
<value type="bool" key="SpacesForTabs">false</value>
|
||||
<value type="int" key="TabSize">4</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>DisplayName</variable>
|
||||
<value type="QString">Synergy</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorCodeStyle>
|
||||
<!-- Written by QtCreator 3.0.1, 2014-02-14T09:50:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>CodeStyleData</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="AlignAssignments">false</value>
|
||||
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="BindStarToIdentifier">true</value>
|
||||
<value type="bool" key="BindStarToLeftSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToRightSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToTypeName">false</value>
|
||||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
|
||||
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
||||
<value type="bool" key="IndentBlockBody">true</value>
|
||||
<value type="bool" key="IndentBlockBraces">false</value>
|
||||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
||||
<value type="bool" key="IndentClassBraces">false</value>
|
||||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
||||
<value type="bool" key="IndentEnumBraces">false</value>
|
||||
<value type="bool" key="IndentFunctionBody">true</value>
|
||||
<value type="bool" key="IndentFunctionBraces">false</value>
|
||||
<value type="bool" key="IndentNamespaceBody">false</value>
|
||||
<value type="bool" key="IndentNamespaceBraces">false</value>
|
||||
<value type="int" key="IndentSize">4</value>
|
||||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentSwitchLabels">false</value>
|
||||
<value type="int" key="PaddingMode">2</value>
|
||||
<value type="bool" key="SpacesForTabs">false</value>
|
||||
<value type="int" key="TabSize">4</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>DisplayName</variable>
|
||||
<value type="QString">Synergy</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorCodeStyle>
|
||||
<!-- Written by QtCreator 3.0.1, 2014-02-14T09:50:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>CodeStyleData</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="AlignAssignments">false</value>
|
||||
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="BindStarToIdentifier">true</value>
|
||||
<value type="bool" key="BindStarToLeftSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToRightSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToTypeName">false</value>
|
||||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
|
||||
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
||||
<value type="bool" key="IndentBlockBody">true</value>
|
||||
<value type="bool" key="IndentBlockBraces">false</value>
|
||||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
||||
<value type="bool" key="IndentClassBraces">false</value>
|
||||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
||||
<value type="bool" key="IndentEnumBraces">false</value>
|
||||
<value type="bool" key="IndentFunctionBody">true</value>
|
||||
<value type="bool" key="IndentFunctionBraces">false</value>
|
||||
<value type="bool" key="IndentNamespaceBody">false</value>
|
||||
<value type="bool" key="IndentNamespaceBraces">false</value>
|
||||
<value type="int" key="IndentSize">4</value>
|
||||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentSwitchLabels">false</value>
|
||||
<value type="int" key="PaddingMode">2</value>
|
||||
<value type="bool" key="SpacesForTabs">false</value>
|
||||
<value type="int" key="TabSize">4</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>DisplayName</variable>
|
||||
<value type="QString">Synergy</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorCodeStyle>
|
||||
<!-- Written by QtCreator 3.0.1, 2014-02-14T09:50:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>CodeStyleData</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="AlignAssignments">false</value>
|
||||
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="BindStarToIdentifier">true</value>
|
||||
<value type="bool" key="BindStarToLeftSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToRightSpecifier">false</value>
|
||||
<value type="bool" key="BindStarToTypeName">false</value>
|
||||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
|
||||
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
||||
<value type="bool" key="IndentBlockBody">true</value>
|
||||
<value type="bool" key="IndentBlockBraces">false</value>
|
||||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
||||
<value type="bool" key="IndentClassBraces">false</value>
|
||||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
||||
<value type="bool" key="IndentEnumBraces">false</value>
|
||||
<value type="bool" key="IndentFunctionBody">true</value>
|
||||
<value type="bool" key="IndentFunctionBraces">false</value>
|
||||
<value type="bool" key="IndentNamespaceBody">false</value>
|
||||
<value type="bool" key="IndentNamespaceBraces">false</value>
|
||||
<value type="int" key="IndentSize">4</value>
|
||||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
||||
<value type="bool" key="IndentSwitchLabels">false</value>
|
||||
<value type="int" key="PaddingMode">2</value>
|
||||
<value type="bool" key="SpacesForTabs">false</value>
|
||||
<value type="int" key="TabSize">4</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>DisplayName</variable>
|
||||
<value type="QString">Synergy</value>
|
||||
</data>
|
||||
</qtcreator>
|
|
@ -0,0 +1,10 @@
|
|||
To recreate the generated part of barrierc manpage use a command like:
|
||||
help2man -N --output=barrierc.1 --name='Barrier Keyboard/Mouse Client' /path/to/barrierc
|
||||
|
||||
And for barriers:
|
||||
help2man -N --output=barriers.1 --name='Barrier Keyboard/Mouse Server' /path/to/barriers
|
||||
|
||||
After that manually fixup:
|
||||
* replace your home directory with $HOME in barriers.1
|
||||
* revert formatting of FILES and COPYRIGHT sections to match formatting of existing version.
|
||||
* add note referencing this file for instructions to the first line.
|
|
@ -1,4 +1,4 @@
|
|||
# sample synergy configuration file
|
||||
# sample barrier configuration file
|
||||
#
|
||||
# comments begin with the # character and continue to the end of
|
||||
# line. comments may appear anywhere the syntax permits.
|
|
@ -1,4 +1,4 @@
|
|||
# sample synergy configuration file
|
||||
# sample barrier configuration file
|
||||
#
|
||||
# comments begin with the # character and continue to the end of
|
||||
# line. comments may appear anywhere the syntax permits.
|
||||
|
@ -47,9 +47,9 @@ section: links
|
|||
end
|
||||
|
||||
# The aliases section is to map the full names of the computers to their logical names used in the screens section
|
||||
# One way to find the actual name of a comptuer is to run hostname from a command window
|
||||
# One way to find the actual name of a computer is to run hostname from a command window
|
||||
section: aliases
|
||||
# Laptop is actually known as John-Smiths-MacBook-3.local
|
||||
desktop2:
|
||||
John-Smiths-MacBook-3.local
|
||||
John-Smiths-MacBook-3.local:
|
||||
desktop2
|
||||
end
|
|
@ -0,0 +1,17 @@
|
|||
# barebones barrier.conf example
|
||||
# for two computers side by side
|
||||
# replace screen.name.server and screen.name.client with your screen names from gui
|
||||
# there's a 50/50 chance you'll want to swap left and right
|
||||
# save this as barrier.conf in your home folder and "Use existing configuration" on server
|
||||
|
||||
section: screens
|
||||
screen.name.server:
|
||||
screen.name.client:
|
||||
end
|
||||
|
||||
section: links
|
||||
screen.name.server:
|
||||
left = screen.name.client
|
||||
screen.name.client:
|
||||
right = screen.name.server
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
# sample synergy configuration file
|
||||
# sample barrier configuration file
|
||||
#
|
||||
# comments begin with the # character and continue to the end of
|
||||
# line. comments may appear anywhere the syntax permits.
|
||||
|
@ -34,6 +34,6 @@ end
|
|||
|
||||
section: aliases
|
||||
# The "real" name of iMac is John-Smiths-iMac-3.local. If we wanted we could remove this alias and instead use John-Smiths-iMac-3.local everywhere iMac is above. Hopefully it should be easy to see why using an alias is nicer
|
||||
iMac:
|
||||
John-Smiths-iMac-3.local
|
||||
John-Smiths-iMac-3.local:
|
||||
iMac
|
||||
end
|
|
@ -0,0 +1,73 @@
|
|||
.\" See UpdateManpages.txt about modification of this file. Most of it was generated by help2man 1.47.8.
|
||||
.TH BARRIERC "1" "November 2019" "barrierc 2.4.0-release" "User Commands"
|
||||
.SH NAME
|
||||
barrierc \- Barrier Keyboard/Mouse Client
|
||||
.SH SYNOPSIS
|
||||
.B barrierc
|
||||
[\fI\,--yscroll <delta>\/\fR] [\fI\,--display <display>\/\fR] [\fI\,--no-xinitthreads\/\fR] [\fI\,--daemon|--no-daemon\/\fR] [\fI\,--name <screen-name>\/\fR] [\fI\,--restart|--no-restart\/\fR] [\fI\,--debug <level>\/\fR] \fI\,<server-address>\/\fR
|
||||
.SH DESCRIPTION
|
||||
Start the barrier client and connect to a remote server component.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-debug\fR <level>
|
||||
filter out log messages with priority below level.
|
||||
level may be: FATAL, ERROR, WARNING, NOTE, INFO,
|
||||
DEBUG, DEBUG1, DEBUG2.
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-name\fR <screen\-name> use screen\-name instead the hostname to identify
|
||||
this screen in the configuration.
|
||||
.TP
|
||||
\fB\-1\fR, \fB\-\-no\-restart\fR
|
||||
do not try to restart on failure.
|
||||
.TP
|
||||
\fB\-\-restart\fR
|
||||
restart the server automatically if it fails. (*)
|
||||
.TP
|
||||
\fB\-l\fR \fB\-\-log\fR <file>
|
||||
write log messages to file.
|
||||
.TP
|
||||
\fB\-\-no\-tray\fR
|
||||
disable the system tray icon.
|
||||
.TP
|
||||
\fB\-\-enable\-drag\-drop\fR
|
||||
enable file drag & drop.
|
||||
.TP
|
||||
\fB\-\-enable\-crypto\fR
|
||||
enable the crypto (ssl) plugin.
|
||||
.TP
|
||||
\fB\-\-display\fR <display>
|
||||
connect to the X server at <display>
|
||||
.TP
|
||||
\fB\-\-no\-xinitthreads\fR
|
||||
do not call XInitThreads()
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-no\-daemon\fR
|
||||
run in the foreground.
|
||||
.TP
|
||||
\fB\-\-daemon\fR
|
||||
run as a daemon. (*)
|
||||
.TP
|
||||
\fB\-\-yscroll\fR <delta>
|
||||
defines the vertical scrolling delta, which is
|
||||
120 by default.
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
display this help and exit.
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
display version information and exit.
|
||||
.PP
|
||||
Default options are marked with a *
|
||||
.PP
|
||||
The server address is of the form: [<hostname>][:<port>]. The hostname
|
||||
must be the address or hostname of the server. Placing brackets around
|
||||
an IPv6 address is required when also specifying a port number and
|
||||
optional otherwise. The default port number is 24800.
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2018 Debauchee Open Source Group
|
||||
.br
|
||||
Copyright \(co 2012\-2016 Symless Ltd.
|
||||
.br
|
||||
Copyright \(co 2008\-2014 Nick Bolton
|
||||
.br
|
||||
Copyright \(co 2002\-2014 Chris Schoeneman
|
|
@ -0,0 +1,87 @@
|
|||
.\" See UpdateManpages.txt about modification of this file. Most of it was generated by help2man 1.47.8.
|
||||
.TH BARRIERS "1" "November 2019" "barriers 2.4.0-release" "User Commands"
|
||||
.SH NAME
|
||||
barriers \- Barrier Keyboard/Mouse Server
|
||||
.SH SYNOPSIS
|
||||
.B barriers
|
||||
[\fI\,--address <address>\/\fR] [\fI\,--config <pathname>\/\fR] [\fI\,--display <display>\/\fR] [\fI\,--no-xinitthreads\/\fR] [\fI\,--daemon|--no-daemon\/\fR] [\fI\,--name <screen-name>\/\fR] [\fI\,--restart|--no-restart\/\fR] [\fI\,--debug <level>\/\fR]
|
||||
.SH DESCRIPTION
|
||||
Start the barrier server component.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-a\fR, \fB\-\-address\fR <address>
|
||||
listen for clients on the given address.
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-config\fR <pathname>
|
||||
use the named configuration file instead.
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-debug\fR <level>
|
||||
filter out log messages with priority below level.
|
||||
level may be: FATAL, ERROR, WARNING, NOTE, INFO,
|
||||
DEBUG, DEBUG1, DEBUG2.
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-name\fR <screen\-name> use screen\-name instead the hostname to identify
|
||||
this screen in the configuration.
|
||||
.TP
|
||||
\fB\-1\fR, \fB\-\-no\-restart\fR
|
||||
do not try to restart on failure.
|
||||
.TP
|
||||
\fB\-\-restart\fR
|
||||
restart the server automatically if it fails. (*)
|
||||
.TP
|
||||
\fB\-l\fR \fB\-\-log\fR <file>
|
||||
write log messages to file.
|
||||
.TP
|
||||
\fB\-\-no\-tray\fR
|
||||
disable the system tray icon.
|
||||
.TP
|
||||
\fB\-\-enable\-drag\-drop\fR
|
||||
enable file drag & drop.
|
||||
.TP
|
||||
\fB\-\-enable\-crypto\fR
|
||||
enable the crypto (ssl) plugin.
|
||||
.TP
|
||||
\fB\-\-display\fR <display>
|
||||
connect to the X server at <display>
|
||||
.TP
|
||||
\fB\-\-no\-xinitthreads\fR
|
||||
do not call XInitThreads()
|
||||
.TP
|
||||
\fB\-\-screen\-change\-script\fR <path>
|
||||
full path to script to run on screen change
|
||||
first argument is the new screen name
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-no\-daemon\fR
|
||||
run in the foreground.
|
||||
.TP
|
||||
\fB\-\-daemon\fR
|
||||
run as a daemon. (*)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
display this help and exit.
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
display version information and exit.
|
||||
.PP
|
||||
Default options are marked with a *
|
||||
.PP
|
||||
The argument for \fB\-\-address\fR is of the form: [<hostname>][:<port>]. The
|
||||
hostname must be the address or hostname of an interface on the system.
|
||||
Placing brackets around an IPv6 address is required when also specifying
|
||||
a port number and optional otherwise. The default is to listen on all
|
||||
interfaces using port number 24800.
|
||||
.SH FILES
|
||||
If no configuration file pathname is provided then the first of the
|
||||
following to load successfully sets the configuration:
|
||||
.IP
|
||||
.I $HOME/.local/share/barrier/.barrier.conf
|
||||
.br
|
||||
.I /etc/barrier.conf
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2018 Debauchee Open Source Group
|
||||
.br
|
||||
Copyright \(co 2012\-2016 Symless Ltd.
|
||||
.br
|
||||
Copyright \(co 2008\-2014 Nick Bolton
|
||||
.br
|
||||
Copyright \(co 2002\-2014 Chris Schoeneman
|
|
@ -0,0 +1 @@
|
|||
Corrected macOS packaging to provide a better error message when a user attempts to launch Barrier on an incompatible macOS version. (https://github.com/debauchee/barrier/issues/1260).
|
|
@ -0,0 +1 @@
|
|||
Updated FAQs in project README.md with more detail on OS support and links to issues for infrequent users. (https://github.com/debauchee/barrier/issues/1260).
|
|
@ -0,0 +1,13 @@
|
|||
This is the directory for release note fragments processed by
|
||||
[towncrier](https://github.com/hawkowl/towncrier).
|
||||
|
||||
When making a user-visible change create a file in this directory and it will be automatically be
|
||||
included into the release note document when the next release is published.
|
||||
|
||||
The file extension specifies the type of a change. The following are currently supported:
|
||||
|
||||
- .feature: a new feature.
|
||||
- .bugfix: a bug fix.
|
||||
- .security: a fix for security issue.
|
||||
- .doc: a documentation improvement.
|
||||
- .removal: a deprecation or removal of functionality.
|
|
@ -0,0 +1,2 @@
|
|||
Fix wrong encoding for text copied between Linux and Windows
|
||||
(https://github.com/debauchee/barrier/issues/1037, https://github.com/debauchee/barrier/issues/1137).
|
|
@ -0,0 +1 @@
|
|||
Fixed build on GCC 11.2 (https://github.com/debauchee/barrier/issues/1366).
|
|
@ -0,0 +1,2 @@
|
|||
Updated Japanese translation.
|
||||
Add and translate strings that are not in gui.ts. Minor string adjustment, Fix wrong or duplicate shortcut keys.
|
|
@ -0,0 +1 @@
|
|||
Fixed FAQ link to Linux drag and drop issue.
|
|
@ -0,0 +1 @@
|
|||
Fixed a regression in 2.4.0 that caused Barrier to not support scaling other than 100% (https://github.com/debauchee/barrier/issues/1462).
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<!-- Mac OSX only: Copy this plist file into [~]/Library/LaunchAgents to start barrier client automatically. Make sure you change the IP below. -->
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.debauchee.com.barrierc.plist</string>
|
||||
<key>OnDemand</key>
|
||||
<false/>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/bin/barrierc</string>
|
||||
<!-- Replace this IP with the IP of your barriers server -->
|
||||
<string>192.168.0.2</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -2,19 +2,19 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<!-- Mac OSX only: Copy this plist file into [~]/Library/LaunchAgents to start synergy server automatically. Make sure you change configuration file below -->
|
||||
<!-- Mac OSX only: Copy this plist file into [~]/Library/LaunchAgents to start barrier server automatically. Make sure you change configuration file below -->
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.symless.com.synergys.plist</string>
|
||||
<key>OnDemand</key>
|
||||
<false/>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/bin/synergys</string>
|
||||
<key>Label</key>
|
||||
<string>org.debauchee.com.barriers.plist</string>
|
||||
<key>OnDemand</key>
|
||||
<false/>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/bin/barriers</string>
|
||||
<string>--no-daemon</string>
|
||||
<string>--config</string>
|
||||
<!-- Replace this path with the path to your synergy configuration -->
|
||||
<string>/Users/snorp/.synergy.conf</string>
|
||||
<!-- Replace this path with the path to your barrier configuration -->
|
||||
<string>/Users/snorp/.barrier.conf</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<!-- Mac OSX only: Copy this plist file into [~]/Library/LaunchAgents to start synergy client automatically. Make sure you change the IP below. -->
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.symless.com.synergyc.plist</string>
|
||||
<key>OnDemand</key>
|
||||
<false/>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/bin/synergyc</string>
|
||||
<!-- Replace this IP with the IP of your synergys server -->
|
||||
<string>192.168.0.2</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,98 @@
|
|||
Release notes
|
||||
=============
|
||||
|
||||
[comment]: <> (towncrier release notes start)
|
||||
|
||||
Barrier `2.4.0` ( `2021-11-01` )
|
||||
================================
|
||||
|
||||
Security fixes
|
||||
--------------
|
||||
|
||||
- Barrier now supports client identity verification (fixes CVE-2021-42072, CVE-2021-42073).
|
||||
|
||||
Previously a malicious client could connect to Barrier server without any authentication and
|
||||
send application-level messages. This made the attack surface of Barrier significantly larger.
|
||||
Additionally, in case the malicious client got possession of a valid screen name by brute forcing
|
||||
or other means it could modify the clipboard contents of the server.
|
||||
|
||||
To support seamless upgrades from older versions of Barrier this is currently disabled by default.
|
||||
The feature can be enabled in the settings dialog. If enabled, older clients of Barrier will be
|
||||
rejected.
|
||||
|
||||
- Barrier now uses SHA256 fingerprints for establishing security of encrypted SSL connections.
|
||||
After upgrading client to new version the existing server fingerprint will need to be approved
|
||||
again. Client and server will show both SHA1 and SHA256 server fingerprints to allow
|
||||
interoperability with older versions of Barrier.
|
||||
|
||||
All of the above security issues have been reported by Matthias Gerstner who was really helpful
|
||||
resolving them.
|
||||
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
- Fixed build failure on mips*el and riscv64 architecture.
|
||||
- Fixed reading of configuration on Windows when the paths contain non-ASCII characters
|
||||
(https://github.com/debauchee/barrier/issues/976, https://github.com/debauchee/barrier/issues/974,
|
||||
https://github.com/debauchee/barrier/issues/444).
|
||||
- Barrier no longer uses openssl CLI tool for any operations and hooks into the openssl library directly.
|
||||
- More X11 clipboard MIME types have been mapped to corresponding converters (https://github.com/debauchee/barrier/issues/344).
|
||||
- Fixed setup of multiple actions associated with a hotkey.
|
||||
- Fixed setup of hotkeys with special characters such as comma and semicolon
|
||||
(https://github.com/debauchee/barrier/issues/778).
|
||||
- Fixed transfer of non-ASCII characters coming from a Windows server in certain cases
|
||||
(https://github.com/debauchee/barrier/issues/527).
|
||||
- Barrier will now regenerate server certificate if it's invalid instead of failing to launch
|
||||
(https://github.com/debauchee/barrier/issues/802)
|
||||
- Added support for additional keys on Sun Microsystems USB keyboards
|
||||
(https://github.com/debauchee/barrier/issues/784).
|
||||
- Updated Chinese translation.
|
||||
- Updated Slovak translation.
|
||||
- Theme icons are now preferred to icons distributed together with Barrier
|
||||
(https://github.com/debauchee/barrier/issues/471).
|
||||
- Fixed incorrect setup of Barrier service path on Windows.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- Added `--drop-target` option that improves drag and drop support on Windows when Barrier is
|
||||
being run as a portable app.
|
||||
- The `--enable-crypto` command line option has been made the default to reduce chances of
|
||||
accidental security mishaps when configuring Barrier from command line.
|
||||
A new `--disable-crypto` command line option has been added to explicitly disable encryption.
|
||||
- Added support for randomart images for easier comparison of SSL certificate fingerprints.
|
||||
The algorithm is identical to what OpenSSH uses.
|
||||
- Implemented a configuration option for Server GUI auto-start.
|
||||
- Made it possible to use keyboard instead of mouse to modify screen layout.
|
||||
- Added support for keyboard backlight media keys
|
||||
- Added support for Eisu_toggle and Muhenkan keys
|
||||
- Added `--profile-dir` option that allows to select custom profile directory.
|
||||
|
||||
Barrier `2.3.4` ( `2021-11-01` )
|
||||
================================
|
||||
|
||||
Security fixes
|
||||
--------------
|
||||
|
||||
- Barrier will now correctly close connections when the app-level handshake fails (fixes CVE-2021-42075).
|
||||
|
||||
Previously repeated failing connections would leak file descriptors leading to Barrier being unable
|
||||
to receive new connections from clients.
|
||||
|
||||
- Barrier will now enforce a maximum length of input messages (fixes CVE-2021-42076).
|
||||
|
||||
Previously it was possible for a malicious client or server to send excessive length messages
|
||||
leading to denial of service by resource exhaustion.
|
||||
|
||||
- Fixed a bug which caused Barrier to crash when disconnecting a TCP session just after sending
|
||||
Hello message (fixes CVE-2021-42074).
|
||||
This bug allowed an unauthenticated attacker to crash Barrier with only network access.
|
||||
|
||||
All of the above security issues have been reported by Matthias Gerstner who was really helpful
|
||||
resolving them.
|
||||
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
- Fixed a bug in SSL implementation that caused invalid data occasionally being sent to clients
|
||||
under heavy load.
|
|
@ -0,0 +1,37 @@
|
|||
{% for section, _ in sections|dictsort(by='key') %}
|
||||
{% set underline = "-" %}
|
||||
{% if section %}
|
||||
{{section}}
|
||||
{{ underline * section|length }}{% set underline = "-" %}
|
||||
|
||||
{% endif %}
|
||||
{% if sections[section] %}
|
||||
{% for category, val in definitions|dictsort if category in sections[section]%}
|
||||
|
||||
{{ definitions[category]['name'] }}
|
||||
{{ underline * definitions[category]['name']|length }}
|
||||
|
||||
{% if definitions[category]['showcontent'] %}
|
||||
{% for text, values in sections[section][category]|dictsort(by='value') %}
|
||||
- {{ text }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
- {{ sections[section][category]['']|sort|join(', ') }}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if sections[section][category]|length == 0 %}
|
||||
|
||||
No significant changes.
|
||||
|
||||
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
No significant changes.
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -1,47 +0,0 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
|
||||
.TH SYNERGYC "1" "June 2010" "synergyc 1.5.0, protocol version 1.3" "User Commands"
|
||||
.SH NAME
|
||||
synergyc \- manual page for synergyc 1.5.0, protocol version 1.3
|
||||
.SH SYNOPSIS
|
||||
.B synergyc
|
||||
[\fI--yscroll <delta>\fR] [\fI--daemon|--no-daemon\fR] [\fI--name <screen-name>\fR] [\fI--restart|--no-restart\fR] [\fI--debug <level>\fR] \fI<server-address>\fR
|
||||
.SH DESCRIPTION
|
||||
Connect to a synergy mouse/keyboard sharing server.
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-debug\fR <level>
|
||||
filter out log messages with priority below level.
|
||||
level may be: FATAL, ERROR, WARNING, NOTE, INFO,
|
||||
DEBUG, DEBUGn (1\-5).
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-name\fR <screen\-name> use screen\-name instead the hostname to identify
|
||||
this screen in the configuration.
|
||||
.TP
|
||||
\fB\-1\fR, \fB\-\-no\-restart\fR
|
||||
do not try to restart on failure.
|
||||
.PP
|
||||
* \fB\-\-restart\fR restart the server automatically if it fails.
|
||||
.TP
|
||||
\fB\-l\fR \fB\-\-log\fR <file>
|
||||
write log messages to file.
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-no\-daemon\fR
|
||||
run in the foreground.
|
||||
.PP
|
||||
* \fB\-\-daemon\fR run as a daemon.
|
||||
.TP
|
||||
\fB\-\-yscroll\fR <delta>
|
||||
defines the vertical scrolling delta, which is
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
display this help and exit.
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
display version information and exit.
|
||||
.PP
|
||||
* marks defaults.
|
||||
.PP
|
||||
The server address is of the form: [<hostname>][:<port>]. The hostname
|
||||
must be the address or hostname of the server. The port overrides the
|
||||
default port, 24800.
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2010 Chris Schoeneman, Nick Bolton, Sorin Sbarnea
|
|
@ -1,57 +0,0 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
|
||||
.TH SYNERGYS "1" "June 2010" "synergys 1.5.0, protocol version 1.3" "User Commands"
|
||||
.SH NAME
|
||||
synergys \- manual page for synergys 1.5.0, protocol version 1.3
|
||||
.SH SYNOPSIS
|
||||
.B synergys
|
||||
[\fI--address <address>\fR] [\fI--config <pathname>\fR] [\fI--daemon|--no-daemon\fR] [\fI--name <screen-name>\fR] [\fI--restart|--no-restart\fR] [\fI--debug <level>\fR]
|
||||
.SH DESCRIPTION
|
||||
Start the synergy mouse/keyboard sharing server.
|
||||
.TP
|
||||
\fB\-a\fR, \fB\-\-address\fR <address>
|
||||
listen for clients on the given address.
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-config\fR <pathname>
|
||||
use the named configuration file instead.
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-debug\fR <level>
|
||||
filter out log messages with priority below level.
|
||||
level may be: FATAL, ERROR, WARNING, NOTE, INFO,
|
||||
DEBUG, DEBUGn (1\-5).
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-name\fR <screen\-name> use screen\-name instead the hostname to identify
|
||||
this screen in the configuration.
|
||||
.TP
|
||||
\fB\-1\fR, \fB\-\-no\-restart\fR
|
||||
do not try to restart on failure.
|
||||
.PP
|
||||
* \fB\-\-restart\fR restart the server automatically if it fails.
|
||||
.TP
|
||||
\fB\-l\fR \fB\-\-log\fR <file>
|
||||
write log messages to file.
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-no\-daemon\fR
|
||||
run in the foreground.
|
||||
.PP
|
||||
* \fB\-\-daemon\fR run as a daemon.
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
display this help and exit.
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
display version information and exit.
|
||||
.PP
|
||||
* marks defaults.
|
||||
.PP
|
||||
The argument for \fB\-\-address\fR is of the form: [<hostname>][:<port>]. The
|
||||
hostname must be the address or hostname of an interface on the system.
|
||||
The default is to listen on all interfaces. The port overrides the
|
||||
default port, 24800.
|
||||
.PP
|
||||
If no configuration file pathname is provided then the first of the
|
||||
following to load successfully sets the configuration:
|
||||
.IP
|
||||
$HOME/.synergy.conf
|
||||
/etc/synergy.conf
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2010 Chris Schoeneman, Nick Bolton, Sorin Sbarnea
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
Subproject commit 7d33fee11ec480beae4c28ad09ca56d974140a72
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
Subproject commit 800f5422ac9d9e0ad59cd860a2ef3a679588acb4
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
Subproject commit 614bbe87b80435d87ab8791564370e0c1d13627d
|
Binary file not shown.
|
@ -1,934 +0,0 @@
|
|||
/* crypto/bn/bn.h */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@cryptsoft.com).
|
||||
* The implementation was written so as to conform with Netscapes SSL.
|
||||
*
|
||||
* This library is free for commercial and non-commercial use as long as
|
||||
* the following conditions are aheared to. The following conditions
|
||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
* included with this distribution is covered by the same copyright terms
|
||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
* the code are not to be removed.
|
||||
* If this package is used in a product, Eric Young should be given attribution
|
||||
* as the author of the parts of the library used.
|
||||
* This can be in the form of a textual message at program startup or
|
||||
* in documentation (online or textual) provided with the package.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* "This product includes cryptographic software written by
|
||||
* Eric Young (eay@cryptsoft.com)"
|
||||
* The word 'cryptographic' can be left out if the rouines from the library
|
||||
* being used are not cryptographic related :-).
|
||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
* the apps directory (application code) you must include an acknowledgement:
|
||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* The licence and distribution terms for any publically available version or
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
||||
*
|
||||
* Portions of the attached software ("Contribution") are developed by
|
||||
* SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
|
||||
*
|
||||
* The Contribution is licensed pursuant to the Eric Young open source
|
||||
* license provided above.
|
||||
*
|
||||
* The binary polynomial arithmetic software is originally written by
|
||||
* Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HEADER_BN_H
|
||||
# define HEADER_BN_H
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
# ifndef OPENSSL_NO_FP_API
|
||||
# include <stdio.h> /* FILE */
|
||||
# endif
|
||||
# include <openssl/ossl_typ.h>
|
||||
# include <openssl/crypto.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These preprocessor symbols control various aspects of the bignum headers
|
||||
* and library code. They're not defined by any "normal" configuration, as
|
||||
* they are intended for development and testing purposes. NB: defining all
|
||||
* three can be useful for debugging application code as well as openssl
|
||||
* itself. BN_DEBUG - turn on various debugging alterations to the bignum
|
||||
* code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
|
||||
* mismanagement of bignum internals. You must also define BN_DEBUG.
|
||||
*/
|
||||
/* #define BN_DEBUG */
|
||||
/* #define BN_DEBUG_RAND */
|
||||
|
||||
# ifndef OPENSSL_SMALL_FOOTPRINT
|
||||
# define BN_MUL_COMBA
|
||||
# define BN_SQR_COMBA
|
||||
# define BN_RECURSION
|
||||
# endif
|
||||
|
||||
/*
|
||||
* This next option uses the C libraries (2 word)/(1 word) function. If it is
|
||||
* not defined, I use my C version (which is slower). The reason for this
|
||||
* flag is that when the particular C compiler library routine is used, and
|
||||
* the library is linked with a different compiler, the library is missing.
|
||||
* This mostly happens when the library is built with gcc and then linked
|
||||
* using normal cc. This would be a common occurrence because gcc normally
|
||||
* produces code that is 2 times faster than system compilers for the big
|
||||
* number stuff. For machines with only one compiler (or shared libraries),
|
||||
* this should be on. Again this in only really a problem on machines using
|
||||
* "long long's", are 32bit, and are not using my assembler code.
|
||||
*/
|
||||
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \
|
||||
defined(OPENSSL_SYS_WIN32) || defined(linux)
|
||||
# ifndef BN_DIV2W
|
||||
# define BN_DIV2W
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* assuming long is 64bit - this is the DEC Alpha unsigned long long is only
|
||||
* 64 bits :-(, don't define BN_LLONG for the DEC Alpha
|
||||
*/
|
||||
# ifdef SIXTY_FOUR_BIT_LONG
|
||||
# define BN_ULLONG unsigned long long
|
||||
# define BN_ULONG unsigned long
|
||||
# define BN_LONG long
|
||||
# define BN_BITS 128
|
||||
# define BN_BYTES 8
|
||||
# define BN_BITS2 64
|
||||
# define BN_BITS4 32
|
||||
# define BN_MASK (0xffffffffffffffffffffffffffffffffLL)
|
||||
# define BN_MASK2 (0xffffffffffffffffL)
|
||||
# define BN_MASK2l (0xffffffffL)
|
||||
# define BN_MASK2h (0xffffffff00000000L)
|
||||
# define BN_MASK2h1 (0xffffffff80000000L)
|
||||
# define BN_TBIT (0x8000000000000000L)
|
||||
# define BN_DEC_CONV (10000000000000000000UL)
|
||||
# define BN_DEC_FMT1 "%lu"
|
||||
# define BN_DEC_FMT2 "%019lu"
|
||||
# define BN_DEC_NUM 19
|
||||
# define BN_HEX_FMT1 "%lX"
|
||||
# define BN_HEX_FMT2 "%016lX"
|
||||
# endif
|
||||
|
||||
/*
|
||||
* This is where the long long data type is 64 bits, but long is 32. For
|
||||
* machines where there are 64bit registers, this is the mode to use. IRIX,
|
||||
* on R4000 and above should use this mode, along with the relevant assembler
|
||||
* code :-). Do NOT define BN_LLONG.
|
||||
*/
|
||||
# ifdef SIXTY_FOUR_BIT
|
||||
# undef BN_LLONG
|
||||
# undef BN_ULLONG
|
||||
# define BN_ULONG unsigned long long
|
||||
# define BN_LONG long long
|
||||
# define BN_BITS 128
|
||||
# define BN_BYTES 8
|
||||
# define BN_BITS2 64
|
||||
# define BN_BITS4 32
|
||||
# define BN_MASK2 (0xffffffffffffffffLL)
|
||||
# define BN_MASK2l (0xffffffffL)
|
||||
# define BN_MASK2h (0xffffffff00000000LL)
|
||||
# define BN_MASK2h1 (0xffffffff80000000LL)
|
||||
# define BN_TBIT (0x8000000000000000LL)
|
||||
# define BN_DEC_CONV (10000000000000000000ULL)
|
||||
# define BN_DEC_FMT1 "%llu"
|
||||
# define BN_DEC_FMT2 "%019llu"
|
||||
# define BN_DEC_NUM 19
|
||||
# define BN_HEX_FMT1 "%llX"
|
||||
# define BN_HEX_FMT2 "%016llX"
|
||||
# endif
|
||||
|
||||
# ifdef THIRTY_TWO_BIT
|
||||
# ifdef BN_LLONG
|
||||
# if defined(_WIN32) && !defined(__GNUC__)
|
||||
# define BN_ULLONG unsigned __int64
|
||||
# define BN_MASK (0xffffffffffffffffI64)
|
||||
# else
|
||||
# define BN_ULLONG unsigned long long
|
||||
# define BN_MASK (0xffffffffffffffffLL)
|
||||
# endif
|
||||
# endif
|
||||
# define BN_ULONG unsigned int
|
||||
# define BN_LONG int
|
||||
# define BN_BITS 64
|
||||
# define BN_BYTES 4
|
||||
# define BN_BITS2 32
|
||||
# define BN_BITS4 16
|
||||
# define BN_MASK2 (0xffffffffL)
|
||||
# define BN_MASK2l (0xffff)
|
||||
# define BN_MASK2h1 (0xffff8000L)
|
||||
# define BN_MASK2h (0xffff0000L)
|
||||
# define BN_TBIT (0x80000000L)
|
||||
# define BN_DEC_CONV (1000000000L)
|
||||
# define BN_DEC_FMT1 "%u"
|
||||
# define BN_DEC_FMT2 "%09u"
|
||||
# define BN_DEC_NUM 9
|
||||
# define BN_HEX_FMT1 "%X"
|
||||
# define BN_HEX_FMT2 "%08X"
|
||||
# endif
|
||||
|
||||
# define BN_DEFAULT_BITS 1280
|
||||
|
||||
# define BN_FLG_MALLOCED 0x01
|
||||
# define BN_FLG_STATIC_DATA 0x02
|
||||
|
||||
/*
|
||||
* avoid leaking exponent information through timing,
|
||||
* BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
|
||||
* BN_div() will call BN_div_no_branch,
|
||||
* BN_mod_inverse() will call BN_mod_inverse_no_branch.
|
||||
*/
|
||||
# define BN_FLG_CONSTTIME 0x04
|
||||
|
||||
# ifdef OPENSSL_NO_DEPRECATED
|
||||
/* deprecated name for the flag */
|
||||
# define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
|
||||
/*
|
||||
* avoid leaking exponent information through timings
|
||||
* (BN_mod_exp_mont() will call BN_mod_exp_mont_consttime)
|
||||
*/
|
||||
# endif
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define BN_FLG_FREE 0x8000
|
||||
/* used for debuging */
|
||||
# endif
|
||||
# define BN_set_flags(b,n) ((b)->flags|=(n))
|
||||
# define BN_get_flags(b,n) ((b)->flags&(n))
|
||||
|
||||
/*
|
||||
* get a clone of a BIGNUM with changed flags, for *temporary* use only (the
|
||||
* two BIGNUMs cannot not be used in parallel!)
|
||||
*/
|
||||
# define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \
|
||||
(dest)->top=(b)->top, \
|
||||
(dest)->dmax=(b)->dmax, \
|
||||
(dest)->neg=(b)->neg, \
|
||||
(dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \
|
||||
| ((b)->flags & ~BN_FLG_MALLOCED) \
|
||||
| BN_FLG_STATIC_DATA \
|
||||
| (n)))
|
||||
|
||||
/* Already declared in ossl_typ.h */
|
||||
# if 0
|
||||
typedef struct bignum_st BIGNUM;
|
||||
/* Used for temp variables (declaration hidden in bn_lcl.h) */
|
||||
typedef struct bignum_ctx BN_CTX;
|
||||
typedef struct bn_blinding_st BN_BLINDING;
|
||||
typedef struct bn_mont_ctx_st BN_MONT_CTX;
|
||||
typedef struct bn_recp_ctx_st BN_RECP_CTX;
|
||||
typedef struct bn_gencb_st BN_GENCB;
|
||||
# endif
|
||||
|
||||
struct bignum_st {
|
||||
BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit
|
||||
* chunks. */
|
||||
int top; /* Index of last used d +1. */
|
||||
/* The next are internal book keeping for bn_expand. */
|
||||
int dmax; /* Size of the d array. */
|
||||
int neg; /* one if the number is negative */
|
||||
int flags;
|
||||
};
|
||||
|
||||
/* Used for montgomery multiplication */
|
||||
struct bn_mont_ctx_st {
|
||||
int ri; /* number of bits in R */
|
||||
BIGNUM RR; /* used to convert to montgomery form */
|
||||
BIGNUM N; /* The modulus */
|
||||
BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
|
||||
* stored for bignum algorithm) */
|
||||
BN_ULONG n0[2]; /* least significant word(s) of Ni; (type
|
||||
* changed with 0.9.9, was "BN_ULONG n0;"
|
||||
* before) */
|
||||
int flags;
|
||||
};
|
||||
|
||||
/*
|
||||
* Used for reciprocal division/mod functions It cannot be shared between
|
||||
* threads
|
||||
*/
|
||||
struct bn_recp_ctx_st {
|
||||
BIGNUM N; /* the divisor */
|
||||
BIGNUM Nr; /* the reciprocal */
|
||||
int num_bits;
|
||||
int shift;
|
||||
int flags;
|
||||
};
|
||||
|
||||
/* Used for slow "generation" functions. */
|
||||
struct bn_gencb_st {
|
||||
unsigned int ver; /* To handle binary (in)compatibility */
|
||||
void *arg; /* callback-specific data */
|
||||
union {
|
||||
/* if(ver==1) - handles old style callbacks */
|
||||
void (*cb_1) (int, int, void *);
|
||||
/* if(ver==2) - new callback style */
|
||||
int (*cb_2) (int, int, BN_GENCB *);
|
||||
} cb;
|
||||
};
|
||||
/* Wrapper function to make using BN_GENCB easier, */
|
||||
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
|
||||
/* Macro to populate a BN_GENCB structure with an "old"-style callback */
|
||||
# define BN_GENCB_set_old(gencb, callback, cb_arg) { \
|
||||
BN_GENCB *tmp_gencb = (gencb); \
|
||||
tmp_gencb->ver = 1; \
|
||||
tmp_gencb->arg = (cb_arg); \
|
||||
tmp_gencb->cb.cb_1 = (callback); }
|
||||
/* Macro to populate a BN_GENCB structure with a "new"-style callback */
|
||||
# define BN_GENCB_set(gencb, callback, cb_arg) { \
|
||||
BN_GENCB *tmp_gencb = (gencb); \
|
||||
tmp_gencb->ver = 2; \
|
||||
tmp_gencb->arg = (cb_arg); \
|
||||
tmp_gencb->cb.cb_2 = (callback); }
|
||||
|
||||
# define BN_prime_checks 0 /* default: select number of iterations based
|
||||
* on the size of the number */
|
||||
|
||||
/*
|
||||
* number of Miller-Rabin iterations for an error rate of less than 2^-80 for
|
||||
* random 'b'-bit input, b >= 100 (taken from table 4.4 in the Handbook of
|
||||
* Applied Cryptography [Menezes, van Oorschot, Vanstone; CRC Press 1996];
|
||||
* original paper: Damgaard, Landrock, Pomerance: Average case error
|
||||
* estimates for the strong probable prime test. -- Math. Comp. 61 (1993)
|
||||
* 177-194)
|
||||
*/
|
||||
# define BN_prime_checks_for_size(b) ((b) >= 1300 ? 2 : \
|
||||
(b) >= 850 ? 3 : \
|
||||
(b) >= 650 ? 4 : \
|
||||
(b) >= 550 ? 5 : \
|
||||
(b) >= 450 ? 6 : \
|
||||
(b) >= 400 ? 7 : \
|
||||
(b) >= 350 ? 8 : \
|
||||
(b) >= 300 ? 9 : \
|
||||
(b) >= 250 ? 12 : \
|
||||
(b) >= 200 ? 15 : \
|
||||
(b) >= 150 ? 18 : \
|
||||
/* b >= 100 */ 27)
|
||||
|
||||
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
|
||||
|
||||
/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
|
||||
# define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \
|
||||
(((w) == 0) && ((a)->top == 0)))
|
||||
# define BN_is_zero(a) ((a)->top == 0)
|
||||
# define BN_is_one(a) (BN_abs_is_word((a),1) && !(a)->neg)
|
||||
# define BN_is_word(a,w) (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg))
|
||||
# define BN_is_odd(a) (((a)->top > 0) && ((a)->d[0] & 1))
|
||||
|
||||
# define BN_one(a) (BN_set_word((a),1))
|
||||
# define BN_zero_ex(a) \
|
||||
do { \
|
||||
BIGNUM *_tmp_bn = (a); \
|
||||
_tmp_bn->top = 0; \
|
||||
_tmp_bn->neg = 0; \
|
||||
} while(0)
|
||||
# ifdef OPENSSL_NO_DEPRECATED
|
||||
# define BN_zero(a) BN_zero_ex(a)
|
||||
# else
|
||||
# define BN_zero(a) (BN_set_word((a),0))
|
||||
# endif
|
||||
|
||||
const BIGNUM *BN_value_one(void);
|
||||
char *BN_options(void);
|
||||
BN_CTX *BN_CTX_new(void);
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
void BN_CTX_init(BN_CTX *c);
|
||||
# endif
|
||||
void BN_CTX_free(BN_CTX *c);
|
||||
void BN_CTX_start(BN_CTX *ctx);
|
||||
BIGNUM *BN_CTX_get(BN_CTX *ctx);
|
||||
void BN_CTX_end(BN_CTX *ctx);
|
||||
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
||||
int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
||||
int BN_num_bits(const BIGNUM *a);
|
||||
int BN_num_bits_word(BN_ULONG);
|
||||
BIGNUM *BN_new(void);
|
||||
void BN_init(BIGNUM *);
|
||||
void BN_clear_free(BIGNUM *a);
|
||||
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
|
||||
void BN_swap(BIGNUM *a, BIGNUM *b);
|
||||
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
int BN_bn2bin(const BIGNUM *a, unsigned char *to);
|
||||
BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
|
||||
int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
|
||||
/** BN_set_negative sets sign of a BIGNUM
|
||||
* \param b pointer to the BIGNUM object
|
||||
* \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
|
||||
*/
|
||||
void BN_set_negative(BIGNUM *b, int n);
|
||||
/** BN_is_negative returns 1 if the BIGNUM is negative
|
||||
* \param a pointer to the BIGNUM object
|
||||
* \return 1 if a < 0 and 0 otherwise
|
||||
*/
|
||||
# define BN_is_negative(a) ((a)->neg != 0)
|
||||
|
||||
int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
|
||||
BN_CTX *ctx);
|
||||
# define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
|
||||
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
|
||||
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *m);
|
||||
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *m);
|
||||
int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
|
||||
int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
|
||||
|
||||
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
||||
BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
|
||||
int BN_mul_word(BIGNUM *a, BN_ULONG w);
|
||||
int BN_add_word(BIGNUM *a, BN_ULONG w);
|
||||
int BN_sub_word(BIGNUM *a, BN_ULONG w);
|
||||
int BN_set_word(BIGNUM *a, BN_ULONG w);
|
||||
BN_ULONG BN_get_word(const BIGNUM *a);
|
||||
|
||||
int BN_cmp(const BIGNUM *a, const BIGNUM *b);
|
||||
void BN_free(BIGNUM *a);
|
||||
int BN_is_bit_set(const BIGNUM *a, int n);
|
||||
int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
|
||||
int BN_lshift1(BIGNUM *r, const BIGNUM *a);
|
||||
int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
|
||||
int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *in_mont);
|
||||
int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
|
||||
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
|
||||
int BN_mask_bits(BIGNUM *a, int n);
|
||||
# ifndef OPENSSL_NO_FP_API
|
||||
int BN_print_fp(FILE *fp, const BIGNUM *a);
|
||||
# endif
|
||||
# ifdef HEADER_BIO_H
|
||||
int BN_print(BIO *fp, const BIGNUM *a);
|
||||
# else
|
||||
int BN_print(void *fp, const BIGNUM *a);
|
||||
# endif
|
||||
int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
|
||||
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
|
||||
int BN_rshift1(BIGNUM *r, const BIGNUM *a);
|
||||
void BN_clear(BIGNUM *a);
|
||||
BIGNUM *BN_dup(const BIGNUM *a);
|
||||
int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
|
||||
int BN_set_bit(BIGNUM *a, int n);
|
||||
int BN_clear_bit(BIGNUM *a, int n);
|
||||
char *BN_bn2hex(const BIGNUM *a);
|
||||
char *BN_bn2dec(const BIGNUM *a);
|
||||
int BN_hex2bn(BIGNUM **a, const char *str);
|
||||
int BN_dec2bn(BIGNUM **a, const char *str);
|
||||
int BN_asc2bn(BIGNUM **a, const char *str);
|
||||
int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
|
||||
* -2 for
|
||||
* error */
|
||||
BIGNUM *BN_mod_inverse(BIGNUM *ret,
|
||||
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
||||
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
||||
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
||||
|
||||
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
||||
|
||||
/* Deprecated versions */
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
||||
const BIGNUM *add, const BIGNUM *rem,
|
||||
void (*callback) (int, int, void *), void *cb_arg);
|
||||
int BN_is_prime(const BIGNUM *p, int nchecks,
|
||||
void (*callback) (int, int, void *),
|
||||
BN_CTX *ctx, void *cb_arg);
|
||||
int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
|
||||
void (*callback) (int, int, void *), BN_CTX *ctx,
|
||||
void *cb_arg, int do_trial_division);
|
||||
# endif /* !defined(OPENSSL_NO_DEPRECATED) */
|
||||
|
||||
/* Newer versions */
|
||||
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
||||
const BIGNUM *rem, BN_GENCB *cb);
|
||||
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
||||
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
int do_trial_division, BN_GENCB *cb);
|
||||
|
||||
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
|
||||
|
||||
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
||||
const BIGNUM *Xp, const BIGNUM *Xp1,
|
||||
const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
|
||||
BN_GENCB *cb);
|
||||
int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
|
||||
BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
|
||||
BN_CTX *ctx, BN_GENCB *cb);
|
||||
|
||||
BN_MONT_CTX *BN_MONT_CTX_new(void);
|
||||
void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
|
||||
int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
BN_MONT_CTX *mont, BN_CTX *ctx);
|
||||
# define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\
|
||||
(r),(a),&((mont)->RR),(mont),(ctx))
|
||||
int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
|
||||
BN_MONT_CTX *mont, BN_CTX *ctx);
|
||||
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
||||
int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
|
||||
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
|
||||
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
|
||||
const BIGNUM *mod, BN_CTX *ctx);
|
||||
|
||||
/* BN_BLINDING flags */
|
||||
# define BN_BLINDING_NO_UPDATE 0x00000001
|
||||
# define BN_BLINDING_NO_RECREATE 0x00000002
|
||||
|
||||
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
|
||||
void BN_BLINDING_free(BN_BLINDING *b);
|
||||
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
||||
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
|
||||
BN_CTX *);
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
|
||||
# endif
|
||||
CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
|
||||
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
|
||||
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
||||
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
||||
int (*bn_mod_exp) (BIGNUM *r,
|
||||
const BIGNUM *a,
|
||||
const BIGNUM *p,
|
||||
const BIGNUM *m,
|
||||
BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx),
|
||||
BN_MONT_CTX *m_ctx);
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
void BN_set_params(int mul, int high, int low, int mont);
|
||||
int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
|
||||
# endif
|
||||
|
||||
void BN_RECP_CTX_init(BN_RECP_CTX *recp);
|
||||
BN_RECP_CTX *BN_RECP_CTX_new(void);
|
||||
void BN_RECP_CTX_free(BN_RECP_CTX *recp);
|
||||
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
|
||||
int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
|
||||
# ifndef OPENSSL_NO_EC2M
|
||||
|
||||
/*
|
||||
* Functions for arithmetic over binary polynomials represented by BIGNUMs.
|
||||
* The BIGNUM::neg property of BIGNUMs representing binary polynomials is
|
||||
* ignored. Note that input arguments are not const so that their bit arrays
|
||||
* can be expanded to the appropriate size if needed.
|
||||
*/
|
||||
|
||||
/*
|
||||
* r = a + b
|
||||
*/
|
||||
int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
# define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
|
||||
/*
|
||||
* r=a mod p
|
||||
*/
|
||||
int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
|
||||
/* r = (a * b) mod p */
|
||||
int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (a * a) mod p */
|
||||
int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (1 / b) mod p */
|
||||
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (a / b) mod p */
|
||||
int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (a ^ b) mod p */
|
||||
int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = sqrt(a) mod p */
|
||||
int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
BN_CTX *ctx);
|
||||
/* r^2 + r = a mod p */
|
||||
int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
BN_CTX *ctx);
|
||||
# define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
|
||||
/*-
|
||||
* Some functions allow for representation of the irreducible polynomials
|
||||
* as an unsigned int[], say p. The irreducible f(t) is then of the form:
|
||||
* t^p[0] + t^p[1] + ... + t^p[k]
|
||||
* where m = p[0] > p[1] > ... > p[k] = 0.
|
||||
*/
|
||||
/* r = a mod p */
|
||||
int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
|
||||
/* r = (a * b) mod p */
|
||||
int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r = (a * a) mod p */
|
||||
int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
|
||||
BN_CTX *ctx);
|
||||
/* r = (1 / b) mod p */
|
||||
int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
|
||||
BN_CTX *ctx);
|
||||
/* r = (a / b) mod p */
|
||||
int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r = (a ^ b) mod p */
|
||||
int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r = sqrt(a) mod p */
|
||||
int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r^2 + r = a mod p */
|
||||
int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
|
||||
const int p[], BN_CTX *ctx);
|
||||
int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
|
||||
int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
|
||||
|
||||
# endif
|
||||
|
||||
/*
|
||||
* faster mod functions for the 'NIST primes' 0 <= a < p^2
|
||||
*/
|
||||
int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
|
||||
const BIGNUM *BN_get0_nist_prime_192(void);
|
||||
const BIGNUM *BN_get0_nist_prime_224(void);
|
||||
const BIGNUM *BN_get0_nist_prime_256(void);
|
||||
const BIGNUM *BN_get0_nist_prime_384(void);
|
||||
const BIGNUM *BN_get0_nist_prime_521(void);
|
||||
|
||||
/* library internal functions */
|
||||
|
||||
# define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\
|
||||
(a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2))
|
||||
# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words)))
|
||||
BIGNUM *bn_expand2(BIGNUM *a, int words);
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
|
||||
# endif
|
||||
|
||||
/*-
|
||||
* Bignum consistency macros
|
||||
* There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
|
||||
* bignum data after direct manipulations on the data. There is also an
|
||||
* "internal" macro, bn_check_top(), for verifying that there are no leading
|
||||
* zeroes. Unfortunately, some auditing is required due to the fact that
|
||||
* bn_fix_top() has become an overabused duct-tape because bignum data is
|
||||
* occasionally passed around in an inconsistent state. So the following
|
||||
* changes have been made to sort this out;
|
||||
* - bn_fix_top()s implementation has been moved to bn_correct_top()
|
||||
* - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
|
||||
* bn_check_top() is as before.
|
||||
* - if BN_DEBUG *is* defined;
|
||||
* - bn_check_top() tries to pollute unused words even if the bignum 'top' is
|
||||
* consistent. (ed: only if BN_DEBUG_RAND is defined)
|
||||
* - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
|
||||
* The idea is to have debug builds flag up inconsistent bignums when they
|
||||
* occur. If that occurs in a bn_fix_top(), we examine the code in question; if
|
||||
* the use of bn_fix_top() was appropriate (ie. it follows directly after code
|
||||
* that manipulates the bignum) it is converted to bn_correct_top(), and if it
|
||||
* was not appropriate, we convert it permanently to bn_check_top() and track
|
||||
* down the cause of the bug. Eventually, no internal code should be using the
|
||||
* bn_fix_top() macro. External applications and libraries should try this with
|
||||
* their own code too, both in terms of building against the openssl headers
|
||||
* with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
|
||||
* defined. This not only improves external code, it provides more test
|
||||
* coverage for openssl's own code.
|
||||
*/
|
||||
|
||||
# ifdef BN_DEBUG
|
||||
|
||||
/* We only need assert() when debugging */
|
||||
# include <assert.h>
|
||||
|
||||
# ifdef BN_DEBUG_RAND
|
||||
/* To avoid "make update" cvs wars due to BN_DEBUG, use some tricks */
|
||||
# ifndef RAND_pseudo_bytes
|
||||
int RAND_pseudo_bytes(unsigned char *buf, int num);
|
||||
# define BN_DEBUG_TRIX
|
||||
# endif
|
||||
# define bn_pollute(a) \
|
||||
do { \
|
||||
const BIGNUM *_bnum1 = (a); \
|
||||
if(_bnum1->top < _bnum1->dmax) { \
|
||||
unsigned char _tmp_char; \
|
||||
/* We cast away const without the compiler knowing, any \
|
||||
* *genuinely* constant variables that aren't mutable \
|
||||
* wouldn't be constructed with top!=dmax. */ \
|
||||
BN_ULONG *_not_const; \
|
||||
memcpy(&_not_const, &_bnum1->d, sizeof(BN_ULONG*)); \
|
||||
RAND_pseudo_bytes(&_tmp_char, 1); \
|
||||
memset((unsigned char *)(_not_const + _bnum1->top), _tmp_char, \
|
||||
(_bnum1->dmax - _bnum1->top) * sizeof(BN_ULONG)); \
|
||||
} \
|
||||
} while(0)
|
||||
# ifdef BN_DEBUG_TRIX
|
||||
# undef RAND_pseudo_bytes
|
||||
# endif
|
||||
# else
|
||||
# define bn_pollute(a)
|
||||
# endif
|
||||
# define bn_check_top(a) \
|
||||
do { \
|
||||
const BIGNUM *_bnum2 = (a); \
|
||||
if (_bnum2 != NULL) { \
|
||||
assert((_bnum2->top == 0) || \
|
||||
(_bnum2->d[_bnum2->top - 1] != 0)); \
|
||||
bn_pollute(_bnum2); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
# define bn_fix_top(a) bn_check_top(a)
|
||||
|
||||
# define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2)
|
||||
# define bn_wcheck_size(bn, words) \
|
||||
do { \
|
||||
const BIGNUM *_bnum2 = (bn); \
|
||||
assert((words) <= (_bnum2)->dmax && (words) >= (_bnum2)->top); \
|
||||
/* avoid unused variable warning with NDEBUG */ \
|
||||
(void)(_bnum2); \
|
||||
} while(0)
|
||||
|
||||
# else /* !BN_DEBUG */
|
||||
|
||||
# define bn_pollute(a)
|
||||
# define bn_check_top(a)
|
||||
# define bn_fix_top(a) bn_correct_top(a)
|
||||
# define bn_check_size(bn, bits)
|
||||
# define bn_wcheck_size(bn, words)
|
||||
|
||||
# endif
|
||||
|
||||
# define bn_correct_top(a) \
|
||||
{ \
|
||||
BN_ULONG *ftl; \
|
||||
int tmp_top = (a)->top; \
|
||||
if (tmp_top > 0) \
|
||||
{ \
|
||||
for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \
|
||||
if (*(ftl--)) break; \
|
||||
(a)->top = tmp_top; \
|
||||
} \
|
||||
bn_pollute(a); \
|
||||
}
|
||||
|
||||
BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num,
|
||||
BN_ULONG w);
|
||||
BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w);
|
||||
void bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num);
|
||||
BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d);
|
||||
BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
|
||||
int num);
|
||||
BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
|
||||
int num);
|
||||
|
||||
/* Primes from RFC 2409 */
|
||||
BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
|
||||
BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
|
||||
|
||||
/* Primes from RFC 3526 */
|
||||
BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
|
||||
BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
|
||||
BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
|
||||
BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
|
||||
BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
|
||||
BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
|
||||
|
||||
int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/*
|
||||
* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_BN_strings(void);
|
||||
|
||||
/* Error codes for the BN functions. */
|
||||
|
||||
/* Function codes. */
|
||||
# define BN_F_BNRAND 127
|
||||
# define BN_F_BN_BLINDING_CONVERT_EX 100
|
||||
# define BN_F_BN_BLINDING_CREATE_PARAM 128
|
||||
# define BN_F_BN_BLINDING_INVERT_EX 101
|
||||
# define BN_F_BN_BLINDING_NEW 102
|
||||
# define BN_F_BN_BLINDING_UPDATE 103
|
||||
# define BN_F_BN_BN2DEC 104
|
||||
# define BN_F_BN_BN2HEX 105
|
||||
# define BN_F_BN_CTX_GET 116
|
||||
# define BN_F_BN_CTX_NEW 106
|
||||
# define BN_F_BN_CTX_START 129
|
||||
# define BN_F_BN_DIV 107
|
||||
# define BN_F_BN_DIV_NO_BRANCH 138
|
||||
# define BN_F_BN_DIV_RECP 130
|
||||
# define BN_F_BN_EXP 123
|
||||
# define BN_F_BN_EXPAND2 108
|
||||
# define BN_F_BN_EXPAND_INTERNAL 120
|
||||
# define BN_F_BN_GF2M_MOD 131
|
||||
# define BN_F_BN_GF2M_MOD_EXP 132
|
||||
# define BN_F_BN_GF2M_MOD_MUL 133
|
||||
# define BN_F_BN_GF2M_MOD_SOLVE_QUAD 134
|
||||
# define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 135
|
||||
# define BN_F_BN_GF2M_MOD_SQR 136
|
||||
# define BN_F_BN_GF2M_MOD_SQRT 137
|
||||
# define BN_F_BN_MOD_EXP2_MONT 118
|
||||
# define BN_F_BN_MOD_EXP_MONT 109
|
||||
# define BN_F_BN_MOD_EXP_MONT_CONSTTIME 124
|
||||
# define BN_F_BN_MOD_EXP_MONT_WORD 117
|
||||
# define BN_F_BN_MOD_EXP_RECP 125
|
||||
# define BN_F_BN_MOD_EXP_SIMPLE 126
|
||||
# define BN_F_BN_MOD_INVERSE 110
|
||||
# define BN_F_BN_MOD_INVERSE_NO_BRANCH 139
|
||||
# define BN_F_BN_MOD_LSHIFT_QUICK 119
|
||||
# define BN_F_BN_MOD_MUL_RECIPROCAL 111
|
||||
# define BN_F_BN_MOD_SQRT 121
|
||||
# define BN_F_BN_MPI2BN 112
|
||||
# define BN_F_BN_NEW 113
|
||||
# define BN_F_BN_RAND 114
|
||||
# define BN_F_BN_RAND_RANGE 122
|
||||
# define BN_F_BN_USUB 115
|
||||
|
||||
/* Reason codes. */
|
||||
# define BN_R_ARG2_LT_ARG3 100
|
||||
# define BN_R_BAD_RECIPROCAL 101
|
||||
# define BN_R_BIGNUM_TOO_LONG 114
|
||||
# define BN_R_CALLED_WITH_EVEN_MODULUS 102
|
||||
# define BN_R_DIV_BY_ZERO 103
|
||||
# define BN_R_ENCODING_ERROR 104
|
||||
# define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105
|
||||
# define BN_R_INPUT_NOT_REDUCED 110
|
||||
# define BN_R_INVALID_LENGTH 106
|
||||
# define BN_R_INVALID_RANGE 115
|
||||
# define BN_R_NOT_A_SQUARE 111
|
||||
# define BN_R_NOT_INITIALIZED 107
|
||||
# define BN_R_NO_INVERSE 108
|
||||
# define BN_R_NO_SOLUTION 116
|
||||
# define BN_R_P_IS_NOT_PRIME 112
|
||||
# define BN_R_TOO_MANY_ITERATIONS 113
|
||||
# define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
|
@ -1,661 +0,0 @@
|
|||
/* crypto/crypto.h */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@cryptsoft.com).
|
||||
* The implementation was written so as to conform with Netscapes SSL.
|
||||
*
|
||||
* This library is free for commercial and non-commercial use as long as
|
||||
* the following conditions are aheared to. The following conditions
|
||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
* included with this distribution is covered by the same copyright terms
|
||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
* the code are not to be removed.
|
||||
* If this package is used in a product, Eric Young should be given attribution
|
||||
* as the author of the parts of the library used.
|
||||
* This can be in the form of a textual message at program startup or
|
||||
* in documentation (online or textual) provided with the package.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* "This product includes cryptographic software written by
|
||||
* Eric Young (eay@cryptsoft.com)"
|
||||
* The word 'cryptographic' can be left out if the rouines from the library
|
||||
* being used are not cryptographic related :-).
|
||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
* the apps directory (application code) you must include an acknowledgement:
|
||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* The licence and distribution terms for any publically available version or
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
||||
* ECDH support in OpenSSL originally developed by
|
||||
* SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CRYPTO_H
|
||||
# define HEADER_CRYPTO_H
|
||||
|
||||
# include <stdlib.h>
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
# ifndef OPENSSL_NO_FP_API
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
|
||||
# include <openssl/stack.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/opensslv.h>
|
||||
# include <openssl/ossl_typ.h>
|
||||
|
||||
# ifdef CHARSET_EBCDIC
|
||||
# include <openssl/ebcdic.h>
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Resolve problems on some operating systems with symbol names that clash
|
||||
* one way or another
|
||||
*/
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Backward compatibility to SSLeay */
|
||||
/*
|
||||
* This is more to be used to check the correct DLL is being used in the MS
|
||||
* world.
|
||||
*/
|
||||
# define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
|
||||
# define SSLEAY_VERSION 0
|
||||
/* #define SSLEAY_OPTIONS 1 no longer supported */
|
||||
# define SSLEAY_CFLAGS 2
|
||||
# define SSLEAY_BUILT_ON 3
|
||||
# define SSLEAY_PLATFORM 4
|
||||
# define SSLEAY_DIR 5
|
||||
|
||||
/* Already declared in ossl_typ.h */
|
||||
# if 0
|
||||
typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
|
||||
/* Called when a new object is created */
|
||||
typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
/* Called when an object is free()ed */
|
||||
typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
/* Called when we need to dup an object */
|
||||
typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
|
||||
void *from_d, int idx, long argl, void *argp);
|
||||
# endif
|
||||
|
||||
/* A generic structure to pass assorted data in a expandable way */
|
||||
typedef struct openssl_item_st {
|
||||
int code;
|
||||
void *value; /* Not used for flag attributes */
|
||||
size_t value_size; /* Max size of value for output, length for
|
||||
* input */
|
||||
size_t *value_length; /* Returned length of value for output */
|
||||
} OPENSSL_ITEM;
|
||||
|
||||
/*
|
||||
* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
|
||||
* names in cryptlib.c
|
||||
*/
|
||||
|
||||
# define CRYPTO_LOCK_ERR 1
|
||||
# define CRYPTO_LOCK_EX_DATA 2
|
||||
# define CRYPTO_LOCK_X509 3
|
||||
# define CRYPTO_LOCK_X509_INFO 4
|
||||
# define CRYPTO_LOCK_X509_PKEY 5
|
||||
# define CRYPTO_LOCK_X509_CRL 6
|
||||
# define CRYPTO_LOCK_X509_REQ 7
|
||||
# define CRYPTO_LOCK_DSA 8
|
||||
# define CRYPTO_LOCK_RSA 9
|
||||
# define CRYPTO_LOCK_EVP_PKEY 10
|
||||
# define CRYPTO_LOCK_X509_STORE 11
|
||||
# define CRYPTO_LOCK_SSL_CTX 12
|
||||
# define CRYPTO_LOCK_SSL_CERT 13
|
||||
# define CRYPTO_LOCK_SSL_SESSION 14
|
||||
# define CRYPTO_LOCK_SSL_SESS_CERT 15
|
||||
# define CRYPTO_LOCK_SSL 16
|
||||
# define CRYPTO_LOCK_SSL_METHOD 17
|
||||
# define CRYPTO_LOCK_RAND 18
|
||||
# define CRYPTO_LOCK_RAND2 19
|
||||
# define CRYPTO_LOCK_MALLOC 20
|
||||
# define CRYPTO_LOCK_BIO 21
|
||||
# define CRYPTO_LOCK_GETHOSTBYNAME 22
|
||||
# define CRYPTO_LOCK_GETSERVBYNAME 23
|
||||
# define CRYPTO_LOCK_READDIR 24
|
||||
# define CRYPTO_LOCK_RSA_BLINDING 25
|
||||
# define CRYPTO_LOCK_DH 26
|
||||
# define CRYPTO_LOCK_MALLOC2 27
|
||||
# define CRYPTO_LOCK_DSO 28
|
||||
# define CRYPTO_LOCK_DYNLOCK 29
|
||||
# define CRYPTO_LOCK_ENGINE 30
|
||||
# define CRYPTO_LOCK_UI 31
|
||||
# define CRYPTO_LOCK_ECDSA 32
|
||||
# define CRYPTO_LOCK_EC 33
|
||||
# define CRYPTO_LOCK_ECDH 34
|
||||
# define CRYPTO_LOCK_BN 35
|
||||
# define CRYPTO_LOCK_EC_PRE_COMP 36
|
||||
# define CRYPTO_LOCK_STORE 37
|
||||
# define CRYPTO_LOCK_COMP 38
|
||||
# define CRYPTO_LOCK_FIPS 39
|
||||
# define CRYPTO_LOCK_FIPS2 40
|
||||
# define CRYPTO_NUM_LOCKS 41
|
||||
|
||||
# define CRYPTO_LOCK 1
|
||||
# define CRYPTO_UNLOCK 2
|
||||
# define CRYPTO_READ 4
|
||||
# define CRYPTO_WRITE 8
|
||||
|
||||
# ifndef OPENSSL_NO_LOCKING
|
||||
# ifndef CRYPTO_w_lock
|
||||
# define CRYPTO_w_lock(type) \
|
||||
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
|
||||
# define CRYPTO_w_unlock(type) \
|
||||
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
|
||||
# define CRYPTO_r_lock(type) \
|
||||
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)
|
||||
# define CRYPTO_r_unlock(type) \
|
||||
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)
|
||||
# define CRYPTO_add(addr,amount,type) \
|
||||
CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
|
||||
# endif
|
||||
# else
|
||||
# define CRYPTO_w_lock(a)
|
||||
# define CRYPTO_w_unlock(a)
|
||||
# define CRYPTO_r_lock(a)
|
||||
# define CRYPTO_r_unlock(a)
|
||||
# define CRYPTO_add(a,b,c) ((*(a))+=(b))
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Some applications as well as some parts of OpenSSL need to allocate and
|
||||
* deallocate locks in a dynamic fashion. The following typedef makes this
|
||||
* possible in a type-safe manner.
|
||||
*/
|
||||
/* struct CRYPTO_dynlock_value has to be defined by the application. */
|
||||
typedef struct {
|
||||
int references;
|
||||
struct CRYPTO_dynlock_value *data;
|
||||
} CRYPTO_dynlock;
|
||||
|
||||
/*
|
||||
* The following can be used to detect memory leaks in the SSLeay library. It
|
||||
* used, it turns on malloc checking
|
||||
*/
|
||||
|
||||
# define CRYPTO_MEM_CHECK_OFF 0x0/* an enume */
|
||||
# define CRYPTO_MEM_CHECK_ON 0x1/* a bit */
|
||||
# define CRYPTO_MEM_CHECK_ENABLE 0x2/* a bit */
|
||||
# define CRYPTO_MEM_CHECK_DISABLE 0x3/* an enume */
|
||||
|
||||
/*
|
||||
* The following are bit values to turn on or off options connected to the
|
||||
* malloc checking functionality
|
||||
*/
|
||||
|
||||
/* Adds time to the memory checking information */
|
||||
# define V_CRYPTO_MDEBUG_TIME 0x1/* a bit */
|
||||
/* Adds thread number to the memory checking information */
|
||||
# define V_CRYPTO_MDEBUG_THREAD 0x2/* a bit */
|
||||
|
||||
# define V_CRYPTO_MDEBUG_ALL (V_CRYPTO_MDEBUG_TIME | V_CRYPTO_MDEBUG_THREAD)
|
||||
|
||||
/* predec of the BIO type */
|
||||
typedef struct bio_st BIO_dummy;
|
||||
|
||||
struct crypto_ex_data_st {
|
||||
STACK_OF(void) *sk;
|
||||
/* gcc is screwing up this data structure :-( */
|
||||
int dummy;
|
||||
};
|
||||
DECLARE_STACK_OF(void)
|
||||
|
||||
/*
|
||||
* This stuff is basically class callback functions The current classes are
|
||||
* SSL_CTX, SSL, SSL_SESSION, and a few more
|
||||
*/
|
||||
|
||||
typedef struct crypto_ex_data_func_st {
|
||||
long argl; /* Arbitary long */
|
||||
void *argp; /* Arbitary void * */
|
||||
CRYPTO_EX_new *new_func;
|
||||
CRYPTO_EX_free *free_func;
|
||||
CRYPTO_EX_dup *dup_func;
|
||||
} CRYPTO_EX_DATA_FUNCS;
|
||||
|
||||
DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
|
||||
|
||||
/*
|
||||
* Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
|
||||
* entry.
|
||||
*/
|
||||
|
||||
# define CRYPTO_EX_INDEX_BIO 0
|
||||
# define CRYPTO_EX_INDEX_SSL 1
|
||||
# define CRYPTO_EX_INDEX_SSL_CTX 2
|
||||
# define CRYPTO_EX_INDEX_SSL_SESSION 3
|
||||
# define CRYPTO_EX_INDEX_X509_STORE 4
|
||||
# define CRYPTO_EX_INDEX_X509_STORE_CTX 5
|
||||
# define CRYPTO_EX_INDEX_RSA 6
|
||||
# define CRYPTO_EX_INDEX_DSA 7
|
||||
# define CRYPTO_EX_INDEX_DH 8
|
||||
# define CRYPTO_EX_INDEX_ENGINE 9
|
||||
# define CRYPTO_EX_INDEX_X509 10
|
||||
# define CRYPTO_EX_INDEX_UI 11
|
||||
# define CRYPTO_EX_INDEX_ECDSA 12
|
||||
# define CRYPTO_EX_INDEX_ECDH 13
|
||||
# define CRYPTO_EX_INDEX_COMP 14
|
||||
# define CRYPTO_EX_INDEX_STORE 15
|
||||
|
||||
/*
|
||||
* Dynamically assigned indexes start from this value (don't use directly,
|
||||
* use via CRYPTO_ex_data_new_class).
|
||||
*/
|
||||
# define CRYPTO_EX_INDEX_USER 100
|
||||
|
||||
/*
|
||||
* This is the default callbacks, but we can have others as well: this is
|
||||
* needed in Win32 where the application malloc and the library malloc may
|
||||
* not be the same.
|
||||
*/
|
||||
# define CRYPTO_malloc_init() CRYPTO_set_mem_functions(\
|
||||
malloc, realloc, free)
|
||||
|
||||
# if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD
|
||||
# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */
|
||||
# define CRYPTO_MDEBUG
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
|
||||
* is defined)
|
||||
*/
|
||||
# define CRYPTO_malloc_debug_init() do {\
|
||||
CRYPTO_set_mem_debug_functions(\
|
||||
CRYPTO_dbg_malloc,\
|
||||
CRYPTO_dbg_realloc,\
|
||||
CRYPTO_dbg_free,\
|
||||
CRYPTO_dbg_set_options,\
|
||||
CRYPTO_dbg_get_options);\
|
||||
} while(0)
|
||||
|
||||
int CRYPTO_mem_ctrl(int mode);
|
||||
int CRYPTO_is_mem_check_on(void);
|
||||
|
||||
/* for applications */
|
||||
# define MemCheck_start() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON)
|
||||
# define MemCheck_stop() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF)
|
||||
|
||||
/* for library-internal use */
|
||||
# define MemCheck_on() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE)
|
||||
# define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE)
|
||||
# define is_MemCheck_on() CRYPTO_is_mem_check_on()
|
||||
|
||||
# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__)
|
||||
# define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__)
|
||||
# define OPENSSL_realloc(addr,num) \
|
||||
CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
|
||||
# define OPENSSL_realloc_clean(addr,old_num,num) \
|
||||
CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)
|
||||
# define OPENSSL_remalloc(addr,num) \
|
||||
CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)
|
||||
# define OPENSSL_freeFunc CRYPTO_free
|
||||
# define OPENSSL_free(addr) CRYPTO_free(addr)
|
||||
|
||||
# define OPENSSL_malloc_locked(num) \
|
||||
CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)
|
||||
# define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)
|
||||
|
||||
const char *SSLeay_version(int type);
|
||||
unsigned long SSLeay(void);
|
||||
|
||||
int OPENSSL_issetugid(void);
|
||||
|
||||
/* An opaque type representing an implementation of "ex_data" support */
|
||||
typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
|
||||
/* Return an opaque pointer to the current "ex_data" implementation */
|
||||
const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
|
||||
/* Sets the "ex_data" implementation to be used (if it's not too late) */
|
||||
int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
|
||||
/* Get a new "ex_data" class, and return the corresponding "class_index" */
|
||||
int CRYPTO_ex_data_new_class(void);
|
||||
/* Within a given class, get/register a new index */
|
||||
int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
|
||||
CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
/*
|
||||
* Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
|
||||
* given class (invokes whatever per-class callbacks are applicable)
|
||||
*/
|
||||
int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
||||
int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
|
||||
CRYPTO_EX_DATA *from);
|
||||
void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
||||
/*
|
||||
* Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
|
||||
* index (relative to the class type involved)
|
||||
*/
|
||||
int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
|
||||
void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
||||
/*
|
||||
* This function cleans up all "ex_data" state. It mustn't be called under
|
||||
* potential race-conditions.
|
||||
*/
|
||||
void CRYPTO_cleanup_all_ex_data(void);
|
||||
|
||||
int CRYPTO_get_new_lockid(char *name);
|
||||
|
||||
int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
|
||||
void CRYPTO_lock(int mode, int type, const char *file, int line);
|
||||
void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
|
||||
const char *file, int line));
|
||||
void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
|
||||
const char *file, int line);
|
||||
void CRYPTO_set_add_lock_callback(int (*func)
|
||||
(int *num, int mount, int type,
|
||||
const char *file, int line));
|
||||
int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
|
||||
const char *file, int line);
|
||||
|
||||
/* Don't use this structure directly. */
|
||||
typedef struct crypto_threadid_st {
|
||||
void *ptr;
|
||||
unsigned long val;
|
||||
} CRYPTO_THREADID;
|
||||
/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
|
||||
void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
|
||||
void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
|
||||
int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
|
||||
void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
|
||||
void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
|
||||
int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
|
||||
void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
|
||||
unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
void CRYPTO_set_id_callback(unsigned long (*func) (void));
|
||||
unsigned long (*CRYPTO_get_id_callback(void)) (void);
|
||||
unsigned long CRYPTO_thread_id(void);
|
||||
# endif
|
||||
|
||||
const char *CRYPTO_get_lock_name(int type);
|
||||
int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
|
||||
int line);
|
||||
|
||||
int CRYPTO_get_new_dynlockid(void);
|
||||
void CRYPTO_destroy_dynlockid(int i);
|
||||
struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
|
||||
void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
|
||||
*(*dyn_create_function) (const char
|
||||
*file,
|
||||
int line));
|
||||
void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
|
||||
(int mode,
|
||||
struct CRYPTO_dynlock_value *l,
|
||||
const char *file, int line));
|
||||
void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
|
||||
(struct CRYPTO_dynlock_value *l,
|
||||
const char *file, int line));
|
||||
struct CRYPTO_dynlock_value
|
||||
*(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
|
||||
void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
|
||||
struct CRYPTO_dynlock_value
|
||||
*l, const char *file,
|
||||
int line);
|
||||
void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
|
||||
*l, const char *file,
|
||||
int line);
|
||||
|
||||
/*
|
||||
* CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
|
||||
* the latter last if you need different functions
|
||||
*/
|
||||
int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
|
||||
void (*f) (void *));
|
||||
int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
|
||||
void (*free_func) (void *));
|
||||
int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
|
||||
void *(*r) (void *, size_t, const char *,
|
||||
int), void (*f) (void *));
|
||||
int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
|
||||
void (*free_func) (void *));
|
||||
int CRYPTO_set_mem_debug_functions(void (*m)
|
||||
(void *, int, const char *, int, int),
|
||||
void (*r) (void *, void *, int,
|
||||
const char *, int, int),
|
||||
void (*f) (void *, int), void (*so) (long),
|
||||
long (*go) (void));
|
||||
void CRYPTO_get_mem_functions(void *(**m) (size_t),
|
||||
void *(**r) (void *, size_t),
|
||||
void (**f) (void *));
|
||||
void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
|
||||
void (**f) (void *));
|
||||
void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
|
||||
void *(**r) (void *, size_t, const char *,
|
||||
int), void (**f) (void *));
|
||||
void CRYPTO_get_locked_mem_ex_functions(void
|
||||
*(**m) (size_t, const char *, int),
|
||||
void (**f) (void *));
|
||||
void CRYPTO_get_mem_debug_functions(void (**m)
|
||||
(void *, int, const char *, int, int),
|
||||
void (**r) (void *, void *, int,
|
||||
const char *, int, int),
|
||||
void (**f) (void *, int),
|
||||
void (**so) (long), long (**go) (void));
|
||||
|
||||
void *CRYPTO_malloc_locked(int num, const char *file, int line);
|
||||
void CRYPTO_free_locked(void *ptr);
|
||||
void *CRYPTO_malloc(int num, const char *file, int line);
|
||||
char *CRYPTO_strdup(const char *str, const char *file, int line);
|
||||
void CRYPTO_free(void *ptr);
|
||||
void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
|
||||
void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
|
||||
int line);
|
||||
void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
|
||||
|
||||
void OPENSSL_cleanse(void *ptr, size_t len);
|
||||
|
||||
void CRYPTO_set_mem_debug_options(long bits);
|
||||
long CRYPTO_get_mem_debug_options(void);
|
||||
|
||||
# define CRYPTO_push_info(info) \
|
||||
CRYPTO_push_info_(info, __FILE__, __LINE__);
|
||||
int CRYPTO_push_info_(const char *info, const char *file, int line);
|
||||
int CRYPTO_pop_info(void);
|
||||
int CRYPTO_remove_all_info(void);
|
||||
|
||||
/*
|
||||
* Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
|
||||
* used as default in CRYPTO_MDEBUG compilations):
|
||||
*/
|
||||
/*-
|
||||
* The last argument has the following significance:
|
||||
*
|
||||
* 0: called before the actual memory allocation has taken place
|
||||
* 1: called after the actual memory allocation has taken place
|
||||
*/
|
||||
void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
|
||||
int before_p);
|
||||
void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
|
||||
int line, int before_p);
|
||||
void CRYPTO_dbg_free(void *addr, int before_p);
|
||||
/*-
|
||||
* Tell the debugging code about options. By default, the following values
|
||||
* apply:
|
||||
*
|
||||
* 0: Clear all options.
|
||||
* V_CRYPTO_MDEBUG_TIME (1): Set the "Show Time" option.
|
||||
* V_CRYPTO_MDEBUG_THREAD (2): Set the "Show Thread Number" option.
|
||||
* V_CRYPTO_MDEBUG_ALL (3): 1 + 2
|
||||
*/
|
||||
void CRYPTO_dbg_set_options(long bits);
|
||||
long CRYPTO_dbg_get_options(void);
|
||||
|
||||
# ifndef OPENSSL_NO_FP_API
|
||||
void CRYPTO_mem_leaks_fp(FILE *);
|
||||
# endif
|
||||
void CRYPTO_mem_leaks(struct bio_st *bio);
|
||||
/* unsigned long order, char *file, int line, int num_bytes, char *addr */
|
||||
typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
|
||||
void *);
|
||||
void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
|
||||
|
||||
/* die if we have to */
|
||||
void OpenSSLDie(const char *file, int line, const char *assertion);
|
||||
# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))
|
||||
|
||||
unsigned long *OPENSSL_ia32cap_loc(void);
|
||||
# define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))
|
||||
int OPENSSL_isservice(void);
|
||||
|
||||
int FIPS_mode(void);
|
||||
int FIPS_mode_set(int r);
|
||||
|
||||
void OPENSSL_init(void);
|
||||
|
||||
# define fips_md_init(alg) fips_md_init_ctx(alg, alg)
|
||||
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define fips_md_init_ctx(alg, cx) \
|
||||
int alg##_Init(cx##_CTX *c) \
|
||||
{ \
|
||||
if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \
|
||||
"Low level API call to digest " #alg " forbidden in FIPS mode!"); \
|
||||
return private_##alg##_Init(c); \
|
||||
} \
|
||||
int private_##alg##_Init(cx##_CTX *c)
|
||||
|
||||
# define fips_cipher_abort(alg) \
|
||||
if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \
|
||||
"Low level API call to cipher " #alg " forbidden in FIPS mode!")
|
||||
|
||||
# else
|
||||
# define fips_md_init_ctx(alg, cx) \
|
||||
int alg##_Init(cx##_CTX *c)
|
||||
# define fips_cipher_abort(alg) while(0)
|
||||
# endif
|
||||
|
||||
/*
|
||||
* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
|
||||
* It takes an amount of time dependent on |len|, but independent of the
|
||||
* contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
|
||||
* into a defined order as the return value when a != b is undefined, other
|
||||
* than to be non-zero.
|
||||
*/
|
||||
int CRYPTO_memcmp(const void *a, const void *b, size_t len);
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/*
|
||||
* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_CRYPTO_strings(void);
|
||||
|
||||
/* Error codes for the CRYPTO functions. */
|
||||
|
||||
/* Function codes. */
|
||||
# define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100
|
||||
# define CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID 103
|
||||
# define CRYPTO_F_CRYPTO_GET_NEW_LOCKID 101
|
||||
# define CRYPTO_F_CRYPTO_SET_EX_DATA 102
|
||||
# define CRYPTO_F_DEF_ADD_INDEX 104
|
||||
# define CRYPTO_F_DEF_GET_CLASS 105
|
||||
# define CRYPTO_F_FIPS_MODE_SET 109
|
||||
# define CRYPTO_F_INT_DUP_EX_DATA 106
|
||||
# define CRYPTO_F_INT_FREE_EX_DATA 107
|
||||
# define CRYPTO_F_INT_NEW_EX_DATA 108
|
||||
|
||||
/* Reason codes. */
|
||||
# define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101
|
||||
# define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
|
@ -1,271 +0,0 @@
|
|||
/* ssl/dtls1.h */
|
||||
/*
|
||||
* DTLS implementation written by Nagendra Modadugu
|
||||
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HEADER_DTLS1_H
|
||||
# define HEADER_DTLS1_H
|
||||
|
||||
# include <openssl/buffer.h>
|
||||
# include <openssl/pqueue.h>
|
||||
# ifdef OPENSSL_SYS_VMS
|
||||
# include <resource.h>
|
||||
# include <sys/timeb.h>
|
||||
# endif
|
||||
# ifdef OPENSSL_SYS_WIN32
|
||||
/* Needed for struct timeval */
|
||||
# include <winsock.h>
|
||||
# elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_)
|
||||
# include <sys/timeval.h>
|
||||
# else
|
||||
# if defined(OPENSSL_SYS_VXWORKS)
|
||||
# include <sys/times.h>
|
||||
# else
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# define DTLS1_VERSION 0xFEFF
|
||||
# define DTLS1_2_VERSION 0xFEFD
|
||||
# define DTLS_MAX_VERSION DTLS1_2_VERSION
|
||||
|
||||
# define DTLS1_BAD_VER 0x0100
|
||||
|
||||
/* Special value for method supporting multiple versions */
|
||||
# define DTLS_ANY_VERSION 0x1FFFF
|
||||
|
||||
# if 0
|
||||
/* this alert description is not specified anywhere... */
|
||||
# define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 110
|
||||
# endif
|
||||
|
||||
/* lengths of messages */
|
||||
# define DTLS1_COOKIE_LENGTH 256
|
||||
|
||||
# define DTLS1_RT_HEADER_LENGTH 13
|
||||
|
||||
# define DTLS1_HM_HEADER_LENGTH 12
|
||||
|
||||
# define DTLS1_HM_BAD_FRAGMENT -2
|
||||
# define DTLS1_HM_FRAGMENT_RETRY -3
|
||||
|
||||
# define DTLS1_CCS_HEADER_LENGTH 1
|
||||
|
||||
# ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE
|
||||
# define DTLS1_AL_HEADER_LENGTH 7
|
||||
# else
|
||||
# define DTLS1_AL_HEADER_LENGTH 2
|
||||
# endif
|
||||
|
||||
# ifndef OPENSSL_NO_SSL_INTERN
|
||||
|
||||
# ifndef OPENSSL_NO_SCTP
|
||||
# define DTLS1_SCTP_AUTH_LABEL "EXPORTER_DTLS_OVER_SCTP"
|
||||
# endif
|
||||
|
||||
/* Max MTU overhead we know about so far is 40 for IPv6 + 8 for UDP */
|
||||
# define DTLS1_MAX_MTU_OVERHEAD 48
|
||||
|
||||
typedef struct dtls1_bitmap_st {
|
||||
unsigned long map; /* track 32 packets on 32-bit systems and 64
|
||||
* - on 64-bit systems */
|
||||
unsigned char max_seq_num[8]; /* max record number seen so far, 64-bit
|
||||
* value in big-endian encoding */
|
||||
} DTLS1_BITMAP;
|
||||
|
||||
struct dtls1_retransmit_state {
|
||||
EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */
|
||||
EVP_MD_CTX *write_hash; /* used for mac generation */
|
||||
# ifndef OPENSSL_NO_COMP
|
||||
COMP_CTX *compress; /* compression */
|
||||
# else
|
||||
char *compress;
|
||||
# endif
|
||||
SSL_SESSION *session;
|
||||
unsigned short epoch;
|
||||
};
|
||||
|
||||
struct hm_header_st {
|
||||
unsigned char type;
|
||||
unsigned long msg_len;
|
||||
unsigned short seq;
|
||||
unsigned long frag_off;
|
||||
unsigned long frag_len;
|
||||
unsigned int is_ccs;
|
||||
struct dtls1_retransmit_state saved_retransmit_state;
|
||||
};
|
||||
|
||||
struct ccs_header_st {
|
||||
unsigned char type;
|
||||
unsigned short seq;
|
||||
};
|
||||
|
||||
struct dtls1_timeout_st {
|
||||
/* Number of read timeouts so far */
|
||||
unsigned int read_timeouts;
|
||||
/* Number of write timeouts so far */
|
||||
unsigned int write_timeouts;
|
||||
/* Number of alerts received so far */
|
||||
unsigned int num_alerts;
|
||||
};
|
||||
|
||||
typedef struct record_pqueue_st {
|
||||
unsigned short epoch;
|
||||
pqueue q;
|
||||
} record_pqueue;
|
||||
|
||||
typedef struct hm_fragment_st {
|
||||
struct hm_header_st msg_header;
|
||||
unsigned char *fragment;
|
||||
unsigned char *reassembly;
|
||||
} hm_fragment;
|
||||
|
||||
typedef struct dtls1_state_st {
|
||||
unsigned int send_cookie;
|
||||
unsigned char cookie[DTLS1_COOKIE_LENGTH];
|
||||
unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH];
|
||||
unsigned int cookie_len;
|
||||
/*
|
||||
* The current data and handshake epoch. This is initially
|
||||
* undefined, and starts at zero once the initial handshake is
|
||||
* completed
|
||||
*/
|
||||
unsigned short r_epoch;
|
||||
unsigned short w_epoch;
|
||||
/* records being received in the current epoch */
|
||||
DTLS1_BITMAP bitmap;
|
||||
/* renegotiation starts a new set of sequence numbers */
|
||||
DTLS1_BITMAP next_bitmap;
|
||||
/* handshake message numbers */
|
||||
unsigned short handshake_write_seq;
|
||||
unsigned short next_handshake_write_seq;
|
||||
unsigned short handshake_read_seq;
|
||||
/* save last sequence number for retransmissions */
|
||||
unsigned char last_write_sequence[8];
|
||||
/* Received handshake records (processed and unprocessed) */
|
||||
record_pqueue unprocessed_rcds;
|
||||
record_pqueue processed_rcds;
|
||||
/* Buffered handshake messages */
|
||||
pqueue buffered_messages;
|
||||
/* Buffered (sent) handshake records */
|
||||
pqueue sent_messages;
|
||||
/*
|
||||
* Buffered application records. Only for records between CCS and
|
||||
* Finished to prevent either protocol violation or unnecessary message
|
||||
* loss.
|
||||
*/
|
||||
record_pqueue buffered_app_data;
|
||||
/* Is set when listening for new connections with dtls1_listen() */
|
||||
unsigned int listen;
|
||||
unsigned int link_mtu; /* max on-the-wire DTLS packet size */
|
||||
unsigned int mtu; /* max DTLS packet size */
|
||||
struct hm_header_st w_msg_hdr;
|
||||
struct hm_header_st r_msg_hdr;
|
||||
struct dtls1_timeout_st timeout;
|
||||
/*
|
||||
* Indicates when the last handshake msg or heartbeat sent will timeout
|
||||
*/
|
||||
struct timeval next_timeout;
|
||||
/* Timeout duration */
|
||||
unsigned short timeout_duration;
|
||||
/*
|
||||
* storage for Alert/Handshake protocol data received but not yet
|
||||
* processed by ssl3_read_bytes:
|
||||
*/
|
||||
unsigned char alert_fragment[DTLS1_AL_HEADER_LENGTH];
|
||||
unsigned int alert_fragment_len;
|
||||
unsigned char handshake_fragment[DTLS1_HM_HEADER_LENGTH];
|
||||
unsigned int handshake_fragment_len;
|
||||
unsigned int retransmitting;
|
||||
/*
|
||||
* Set when the handshake is ready to process peer's ChangeCipherSpec message.
|
||||
* Cleared after the message has been processed.
|
||||
*/
|
||||
unsigned int change_cipher_spec_ok;
|
||||
# ifndef OPENSSL_NO_SCTP
|
||||
/* used when SSL_ST_XX_FLUSH is entered */
|
||||
int next_state;
|
||||
int shutdown_received;
|
||||
# endif
|
||||
} DTLS1_STATE;
|
||||
|
||||
typedef struct dtls1_record_data_st {
|
||||
unsigned char *packet;
|
||||
unsigned int packet_length;
|
||||
SSL3_BUFFER rbuf;
|
||||
SSL3_RECORD rrec;
|
||||
# ifndef OPENSSL_NO_SCTP
|
||||
struct bio_dgram_sctp_rcvinfo recordinfo;
|
||||
# endif
|
||||
} DTLS1_RECORD_DATA;
|
||||
|
||||
# endif
|
||||
|
||||
/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */
|
||||
# define DTLS1_TMO_READ_COUNT 2
|
||||
# define DTLS1_TMO_WRITE_COUNT 2
|
||||
|
||||
# define DTLS1_TMO_ALERT_COUNT 12
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
|
@ -1,322 +0,0 @@
|
|||
/* e_os2.h */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef HEADER_E_OS2_H
|
||||
# define HEADER_E_OS2_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* Detect operating systems. This probably needs completing.
|
||||
* The result is that at least one OPENSSL_SYS_os macro should be defined.
|
||||
* However, if none is defined, Unix is assumed.
|
||||
**/
|
||||
|
||||
# define OPENSSL_SYS_UNIX
|
||||
|
||||
/* ---------------------- Macintosh, before MacOS X ----------------------- */
|
||||
# if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_MACINTOSH_CLASSIC
|
||||
# endif
|
||||
|
||||
/* ---------------------- NetWare ----------------------------------------- */
|
||||
# if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_NETWARE
|
||||
# endif
|
||||
|
||||
/* --------------------- Microsoft operating systems ---------------------- */
|
||||
|
||||
/*
|
||||
* Note that MSDOS actually denotes 32-bit environments running on top of
|
||||
* MS-DOS, such as DJGPP one.
|
||||
*/
|
||||
# if defined(OPENSSL_SYSNAME_MSDOS)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_MSDOS
|
||||
# endif
|
||||
|
||||
/*
|
||||
* For 32 bit environment, there seems to be the CygWin environment and then
|
||||
* all the others that try to do the same thing Microsoft does...
|
||||
*/
|
||||
# if defined(OPENSSL_SYSNAME_UWIN)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_WIN32_UWIN
|
||||
# else
|
||||
# if defined(__CYGWIN__) || defined(OPENSSL_SYSNAME_CYGWIN)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_WIN32_CYGWIN
|
||||
# else
|
||||
# if defined(_WIN32) || defined(OPENSSL_SYSNAME_WIN32)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_WIN32
|
||||
# endif
|
||||
# if defined(OPENSSL_SYSNAME_WINNT)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_WINNT
|
||||
# endif
|
||||
# if defined(OPENSSL_SYSNAME_WINCE)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_WINCE
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Anything that tries to look like Microsoft is "Windows" */
|
||||
# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_WINDOWS
|
||||
# ifndef OPENSSL_SYS_MSDOS
|
||||
# define OPENSSL_SYS_MSDOS
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* DLL settings. This part is a bit tough, because it's up to the
|
||||
* application implementor how he or she will link the application, so it
|
||||
* requires some macro to be used.
|
||||
*/
|
||||
# ifdef OPENSSL_SYS_WINDOWS
|
||||
# ifndef OPENSSL_OPT_WINDLL
|
||||
# if defined(_WINDLL) /* This is used when building OpenSSL to
|
||||
* indicate that DLL linkage should be used */
|
||||
# define OPENSSL_OPT_WINDLL
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* ------------------------------- OpenVMS -------------------------------- */
|
||||
# if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_VMS
|
||||
# if defined(__DECC)
|
||||
# define OPENSSL_SYS_VMS_DECC
|
||||
# elif defined(__DECCXX)
|
||||
# define OPENSSL_SYS_VMS_DECC
|
||||
# define OPENSSL_SYS_VMS_DECCXX
|
||||
# else
|
||||
# define OPENSSL_SYS_VMS_NODECC
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* -------------------------------- OS/2 ---------------------------------- */
|
||||
# if defined(__EMX__) || defined(__OS2__)
|
||||
# undef OPENSSL_SYS_UNIX
|
||||
# define OPENSSL_SYS_OS2
|
||||
# endif
|
||||
|
||||
/* -------------------------------- Unix ---------------------------------- */
|
||||
# ifdef OPENSSL_SYS_UNIX
|
||||
# if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX)
|
||||
# define OPENSSL_SYS_LINUX
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_MPE
|
||||
# define OPENSSL_SYS_MPE
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_SNI
|
||||
# define OPENSSL_SYS_SNI
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_ULTRASPARC
|
||||
# define OPENSSL_SYS_ULTRASPARC
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_NEWS4
|
||||
# define OPENSSL_SYS_NEWS4
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_MACOSX
|
||||
# define OPENSSL_SYS_MACOSX
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY
|
||||
# define OPENSSL_SYS_MACOSX_RHAPSODY
|
||||
# define OPENSSL_SYS_MACOSX
|
||||
# endif
|
||||
# ifdef OPENSSL_SYSNAME_SUNOS
|
||||
# define OPENSSL_SYS_SUNOS
|
||||
# endif
|
||||
# if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY)
|
||||
# define OPENSSL_SYS_CRAY
|
||||
# endif
|
||||
# if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX)
|
||||
# define OPENSSL_SYS_AIX
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* -------------------------------- VOS ----------------------------------- */
|
||||
# if defined(__VOS__) || defined(OPENSSL_SYSNAME_VOS)
|
||||
# define OPENSSL_SYS_VOS
|
||||
# ifdef __HPPA__
|
||||
# define OPENSSL_SYS_VOS_HPPA
|
||||
# endif
|
||||
# ifdef __IA32__
|
||||
# define OPENSSL_SYS_VOS_IA32
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* ------------------------------ VxWorks --------------------------------- */
|
||||
# ifdef OPENSSL_SYSNAME_VXWORKS
|
||||
# define OPENSSL_SYS_VXWORKS
|
||||
# endif
|
||||
|
||||
/* -------------------------------- BeOS ---------------------------------- */
|
||||
# if defined(__BEOS__)
|
||||
# define OPENSSL_SYS_BEOS
|
||||
# include <sys/socket.h>
|
||||
# if defined(BONE_VERSION)
|
||||
# define OPENSSL_SYS_BEOS_BONE
|
||||
# else
|
||||
# define OPENSSL_SYS_BEOS_R5
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/**
|
||||
* That's it for OS-specific stuff
|
||||
*****************************************************************************/
|
||||
|
||||
/* Specials for I/O an exit */
|
||||
# ifdef OPENSSL_SYS_MSDOS
|
||||
# define OPENSSL_UNISTD_IO <io.h>
|
||||
# define OPENSSL_DECLARE_EXIT extern void exit(int);
|
||||
# else
|
||||
# define OPENSSL_UNISTD_IO OPENSSL_UNISTD
|
||||
# define OPENSSL_DECLARE_EXIT /* declared in unistd.h */
|
||||
# endif
|
||||
|
||||
/*-
|
||||
* Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
|
||||
* certain global symbols that, with some compilers under VMS, have to be
|
||||
* defined and declared explicitely with globaldef and globalref.
|
||||
* Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
|
||||
* DLL exports and imports for compilers under Win32. These are a little
|
||||
* more complicated to use. Basically, for any library that exports some
|
||||
* global variables, the following code must be present in the header file
|
||||
* that declares them, before OPENSSL_EXTERN is used:
|
||||
*
|
||||
* #ifdef SOME_BUILD_FLAG_MACRO
|
||||
* # undef OPENSSL_EXTERN
|
||||
* # define OPENSSL_EXTERN OPENSSL_EXPORT
|
||||
* #endif
|
||||
*
|
||||
* The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
|
||||
* have some generally sensible values, and for OPENSSL_EXTERN to have the
|
||||
* value OPENSSL_IMPORT.
|
||||
*/
|
||||
|
||||
# if defined(OPENSSL_SYS_VMS_NODECC)
|
||||
# define OPENSSL_EXPORT globalref
|
||||
# define OPENSSL_IMPORT globalref
|
||||
# define OPENSSL_GLOBAL globaldef
|
||||
# elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL)
|
||||
# define OPENSSL_EXPORT extern __declspec(dllexport)
|
||||
# define OPENSSL_IMPORT extern __declspec(dllimport)
|
||||
# define OPENSSL_GLOBAL
|
||||
# else
|
||||
# define OPENSSL_EXPORT extern
|
||||
# define OPENSSL_IMPORT extern
|
||||
# define OPENSSL_GLOBAL
|
||||
# endif
|
||||
# define OPENSSL_EXTERN OPENSSL_IMPORT
|
||||
|
||||
/*-
|
||||
* Macros to allow global variables to be reached through function calls when
|
||||
* required (if a shared library version requires it, for example.
|
||||
* The way it's done allows definitions like this:
|
||||
*
|
||||
* // in foobar.c
|
||||
* OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
|
||||
* // in foobar.h
|
||||
* OPENSSL_DECLARE_GLOBAL(int,foobar);
|
||||
* #define foobar OPENSSL_GLOBAL_REF(foobar)
|
||||
*/
|
||||
# ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
|
||||
# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \
|
||||
type *_shadow_##name(void) \
|
||||
{ static type _hide_##name=value; return &_hide_##name; }
|
||||
# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
|
||||
# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
|
||||
# else
|
||||
# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_##name=value;
|
||||
# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name
|
||||
# define OPENSSL_GLOBAL_REF(name) _shadow_##name
|
||||
# endif
|
||||
|
||||
# if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && macintosh==1 && !defined(MAC_OS_GUSI_SOURCE)
|
||||
# define ossl_ssize_t long
|
||||
# endif
|
||||
|
||||
# ifdef OPENSSL_SYS_MSDOS
|
||||
# define ossl_ssize_t long
|
||||
# endif
|
||||
|
||||
# if defined(NeXT) || defined(OPENSSL_SYS_NEWS4) || defined(OPENSSL_SYS_SUNOS)
|
||||
# define ssize_t int
|
||||
# endif
|
||||
|
||||
# if defined(__ultrix) && !defined(ssize_t)
|
||||
# define ossl_ssize_t int
|
||||
# endif
|
||||
|
||||
# ifndef ossl_ssize_t
|
||||
# define ossl_ssize_t ssize_t
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
|
@ -1,197 +0,0 @@
|
|||
/* ssl/kssl.h -*- mode: C; c-file-style: "eay" -*- */
|
||||
/*
|
||||
* Written by Vern Staats <staatsvr@asc.hpc.mil> for the OpenSSL project
|
||||
* 2000. project 2000.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* licensing@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
** 19990701 VRS Started.
|
||||
*/
|
||||
|
||||
#ifndef KSSL_H
|
||||
# define KSSL_H
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_KRB5
|
||||
|
||||
# include <stdio.h>
|
||||
# include <ctype.h>
|
||||
# include <krb5.h>
|
||||
# ifdef OPENSSL_SYS_WIN32
|
||||
/*
|
||||
* These can sometimes get redefined indirectly by krb5 header files after
|
||||
* they get undefed in ossl_typ.h
|
||||
*/
|
||||
# undef X509_NAME
|
||||
# undef X509_EXTENSIONS
|
||||
# undef OCSP_REQUEST
|
||||
# undef OCSP_RESPONSE
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Depending on which KRB5 implementation used, some types from
|
||||
* the other may be missing. Resolve that here and now
|
||||
*/
|
||||
# ifdef KRB5_HEIMDAL
|
||||
typedef unsigned char krb5_octet;
|
||||
# define FAR
|
||||
# else
|
||||
|
||||
# ifndef FAR
|
||||
# define FAR
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
/*-
|
||||
* Uncomment this to debug kssl problems or
|
||||
* to trace usage of the Kerberos session key
|
||||
*
|
||||
* #define KSSL_DEBUG
|
||||
*/
|
||||
|
||||
# ifndef KRB5SVC
|
||||
# define KRB5SVC "host"
|
||||
# endif
|
||||
|
||||
# ifndef KRB5KEYTAB
|
||||
# define KRB5KEYTAB "/etc/krb5.keytab"
|
||||
# endif
|
||||
|
||||
# ifndef KRB5SENDAUTH
|
||||
# define KRB5SENDAUTH 1
|
||||
# endif
|
||||
|
||||
# ifndef KRB5CHECKAUTH
|
||||
# define KRB5CHECKAUTH 1
|
||||
# endif
|
||||
|
||||
# ifndef KSSL_CLOCKSKEW
|
||||
# define KSSL_CLOCKSKEW 300;
|
||||
# endif
|
||||
|
||||
# define KSSL_ERR_MAX 255
|
||||
typedef struct kssl_err_st {
|
||||
int reason;
|
||||
char text[KSSL_ERR_MAX + 1];
|
||||
} KSSL_ERR;
|
||||
|
||||
/*- Context for passing
|
||||
* (1) Kerberos session key to SSL, and
|
||||
* (2) Config data between application and SSL lib
|
||||
*/
|
||||
typedef struct kssl_ctx_st {
|
||||
/* used by: disposition: */
|
||||
char *service_name; /* C,S default ok (kssl) */
|
||||
char *service_host; /* C input, REQUIRED */
|
||||
char *client_princ; /* S output from krb5 ticket */
|
||||
char *keytab_file; /* S NULL (/etc/krb5.keytab) */
|
||||
char *cred_cache; /* C NULL (default) */
|
||||
krb5_enctype enctype;
|
||||
int length;
|
||||
krb5_octet FAR *key;
|
||||
} KSSL_CTX;
|
||||
|
||||
# define KSSL_CLIENT 1
|
||||
# define KSSL_SERVER 2
|
||||
# define KSSL_SERVICE 3
|
||||
# define KSSL_KEYTAB 4
|
||||
|
||||
# define KSSL_CTX_OK 0
|
||||
# define KSSL_CTX_ERR 1
|
||||
# define KSSL_NOMEM 2
|
||||
|
||||
/* Public (for use by applications that use OpenSSL with Kerberos 5 support */
|
||||
krb5_error_code kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text);
|
||||
KSSL_CTX *kssl_ctx_new(void);
|
||||
KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx);
|
||||
void kssl_ctx_show(KSSL_CTX *kssl_ctx);
|
||||
krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
|
||||
krb5_data *realm, krb5_data *entity,
|
||||
int nentities);
|
||||
krb5_error_code kssl_cget_tkt(KSSL_CTX *kssl_ctx, krb5_data **enc_tktp,
|
||||
krb5_data *authenp, KSSL_ERR *kssl_err);
|
||||
krb5_error_code kssl_sget_tkt(KSSL_CTX *kssl_ctx, krb5_data *indata,
|
||||
krb5_ticket_times *ttimes, KSSL_ERR *kssl_err);
|
||||
krb5_error_code kssl_ctx_setkey(KSSL_CTX *kssl_ctx, krb5_keyblock *session);
|
||||
void kssl_err_set(KSSL_ERR *kssl_err, int reason, char *text);
|
||||
void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data);
|
||||
krb5_error_code kssl_build_principal_2(krb5_context context,
|
||||
krb5_principal *princ, int rlen,
|
||||
const char *realm, int slen,
|
||||
const char *svc, int hlen,
|
||||
const char *host);
|
||||
krb5_error_code kssl_validate_times(krb5_timestamp atime,
|
||||
krb5_ticket_times *ttimes);
|
||||
krb5_error_code kssl_check_authent(KSSL_CTX *kssl_ctx, krb5_data *authentp,
|
||||
krb5_timestamp *atimep,
|
||||
KSSL_ERR *kssl_err);
|
||||
unsigned char *kssl_skip_confound(krb5_enctype enctype, unsigned char *authn);
|
||||
|
||||
void SSL_set0_kssl_ctx(SSL *s, KSSL_CTX *kctx);
|
||||
KSSL_CTX *SSL_get0_kssl_ctx(SSL *s);
|
||||
char *kssl_ctx_get0_client_princ(KSSL_CTX *kctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
# endif /* OPENSSL_NO_KRB5 */
|
||||
#endif /* KSSL_H */
|
|
@ -1,261 +0,0 @@
|
|||
/* opensslconf.h */
|
||||
/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* OpenSSL was configured with the following options: */
|
||||
#ifndef OPENSSL_SYSNAME_MACOSX
|
||||
# define OPENSSL_SYSNAME_MACOSX
|
||||
#endif
|
||||
#ifndef OPENSSL_DOING_MAKEDEPEND
|
||||
|
||||
|
||||
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_GMP
|
||||
# define OPENSSL_NO_GMP
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
# define OPENSSL_NO_JPAKE
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
# define OPENSSL_NO_KRB5
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_LIBUNBOUND
|
||||
# define OPENSSL_NO_LIBUNBOUND
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_MD2
|
||||
# define OPENSSL_NO_MD2
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RC5
|
||||
# define OPENSSL_NO_RC5
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RFC3779
|
||||
# define OPENSSL_NO_RFC3779
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
# define OPENSSL_NO_SCTP
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SSL_TRACE
|
||||
# define OPENSSL_NO_SSL_TRACE
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_STORE
|
||||
# define OPENSSL_NO_STORE
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_UNIT_TEST
|
||||
# define OPENSSL_NO_UNIT_TEST
|
||||
#endif
|
||||
|
||||
#endif /* OPENSSL_DOING_MAKEDEPEND */
|
||||
|
||||
#ifndef OPENSSL_THREADS
|
||||
# define OPENSSL_THREADS
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
# define OPENSSL_NO_DYNAMIC_ENGINE
|
||||
#endif
|
||||
|
||||
/* The OPENSSL_NO_* macros are also defined as NO_* if the application
|
||||
asks for it. This is a transient feature that is provided for those
|
||||
who haven't had the time to do the appropriate changes in their
|
||||
applications. */
|
||||
#ifdef OPENSSL_ALGORITHM_DEFINES
|
||||
# if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128)
|
||||
# define NO_EC_NISTP_64_GCC_128
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
|
||||
# define NO_GMP
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
|
||||
# define NO_JPAKE
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
|
||||
# define NO_KRB5
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_LIBUNBOUND) && !defined(NO_LIBUNBOUND)
|
||||
# define NO_LIBUNBOUND
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
|
||||
# define NO_MD2
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
|
||||
# define NO_RC5
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
|
||||
# define NO_RFC3779
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP)
|
||||
# define NO_SCTP
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_SSL_TRACE) && !defined(NO_SSL_TRACE)
|
||||
# define NO_SSL_TRACE
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
|
||||
# define NO_STORE
|
||||
# endif
|
||||
# if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST)
|
||||
# define NO_UNIT_TEST
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define OPENSSL_CPUID_OBJ
|
||||
|
||||
/* crypto/opensslconf.h.in */
|
||||
|
||||
/* Generate 80386 code? */
|
||||
#undef I386_ONLY
|
||||
|
||||
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
|
||||
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
|
||||
#define ENGINESDIR "/usr/local/ssl/lib/engines"
|
||||
#define OPENSSLDIR "/usr/local/ssl"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef OPENSSL_UNISTD
|
||||
#define OPENSSL_UNISTD <unistd.h>
|
||||
|
||||
#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
|
||||
|
||||
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
|
||||
#define IDEA_INT unsigned int
|
||||
#endif
|
||||
|
||||
#if defined(HEADER_MD2_H) && !defined(MD2_INT)
|
||||
#define MD2_INT unsigned int
|
||||
#endif
|
||||
|
||||
#if defined(HEADER_RC2_H) && !defined(RC2_INT)
|
||||
/* I need to put in a mod for the alpha - eay */
|
||||
#define RC2_INT unsigned int
|
||||
#endif
|
||||
|
||||
#if defined(HEADER_RC4_H)
|
||||
#if !defined(RC4_INT)
|
||||
/* using int types make the structure larger but make the code faster
|
||||
* on most boxes I have tested - up to %20 faster. */
|
||||
/*
|
||||
* I don't know what does "most" mean, but declaring "int" is a must on:
|
||||
* - Intel P6 because partial register stalls are very expensive;
|
||||
* - elder Alpha because it lacks byte load/store instructions;
|
||||
*/
|
||||
#define RC4_INT unsigned int
|
||||
#endif
|
||||
#if !defined(RC4_CHUNK)
|
||||
/*
|
||||
* This enables code handling data aligned at natural CPU word
|
||||
* boundary. See crypto/rc4/rc4_enc.c for further details.
|
||||
*/
|
||||
#define RC4_CHUNK unsigned long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
|
||||
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
|
||||
* %20 speed up (longs are 8 bytes, int's are 4). */
|
||||
#ifndef DES_LONG
|
||||
#define DES_LONG unsigned long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
|
||||
#define CONFIG_HEADER_BN_H
|
||||
#define BN_LLONG
|
||||
|
||||
/* Should we define BN_DIV2W here? */
|
||||
|
||||
/* Only one for the following should be defined */
|
||||
#undef SIXTY_FOUR_BIT_LONG
|
||||
#undef SIXTY_FOUR_BIT
|
||||
#define THIRTY_TWO_BIT
|
||||
#endif
|
||||
|
||||
#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
|
||||
#define CONFIG_HEADER_RC4_LOCL_H
|
||||
/* if this is defined data[i] is used instead of *data, this is a %20
|
||||
* speedup on x86 */
|
||||
#undef RC4_INDEX
|
||||
#endif
|
||||
|
||||
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
|
||||
#define CONFIG_HEADER_BF_LOCL_H
|
||||
#define BF_PTR
|
||||
#endif /* HEADER_BF_LOCL_H */
|
||||
|
||||
#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
|
||||
#define CONFIG_HEADER_DES_LOCL_H
|
||||
#ifndef DES_DEFAULT_OPTIONS
|
||||
/* the following is tweaked from a config script, that is why it is a
|
||||
* protected undef/define */
|
||||
#ifndef DES_PTR
|
||||
#undef DES_PTR
|
||||
#endif
|
||||
|
||||
/* This helps C compiler generate the correct code for multiple functional
|
||||
* units. It reduces register dependancies at the expense of 2 more
|
||||
* registers */
|
||||
#ifndef DES_RISC1
|
||||
#undef DES_RISC1
|
||||
#endif
|
||||
|
||||
#ifndef DES_RISC2
|
||||
#undef DES_RISC2
|
||||
#endif
|
||||
|
||||
#if defined(DES_RISC1) && defined(DES_RISC2)
|
||||
YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
|
||||
#endif
|
||||
|
||||
/* Unroll the inner loop, this sometimes helps, sometimes hinders.
|
||||
* Very mucy CPU dependant */
|
||||
#ifndef DES_UNROLL
|
||||
#define DES_UNROLL
|
||||
#endif
|
||||
|
||||
/* These default values were supplied by
|
||||
* Peter Gutman <pgut001@cs.auckland.ac.nz>
|
||||
* They are only used if nothing else has been defined */
|
||||
#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
|
||||
/* Special defines which change the way the code is built depending on the
|
||||
CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
|
||||
even newer MIPS CPU's, but at the moment one size fits all for
|
||||
optimization options. Older Sparc's work better with only UNROLL, but
|
||||
there's no way to tell at compile time what it is you're running on */
|
||||
|
||||
#if defined( sun ) /* Newer Sparc's */
|
||||
# define DES_PTR
|
||||
# define DES_RISC1
|
||||
# define DES_UNROLL
|
||||
#elif defined( __ultrix ) /* Older MIPS */
|
||||
# define DES_PTR
|
||||
# define DES_RISC2
|
||||
# define DES_UNROLL
|
||||
#elif defined( __osf1__ ) /* Alpha */
|
||||
# define DES_PTR
|
||||
# define DES_RISC2
|
||||
#elif defined ( _AIX ) /* RS6000 */
|
||||
/* Unknown */
|
||||
#elif defined( __hpux ) /* HP-PA */
|
||||
/* Unknown */
|
||||
#elif defined( __aux ) /* 68K */
|
||||
/* Unknown */
|
||||
#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
|
||||
# define DES_UNROLL
|
||||
#elif defined( __sgi ) /* Newer MIPS */
|
||||
# define DES_PTR
|
||||
# define DES_RISC2
|
||||
# define DES_UNROLL
|
||||
#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
|
||||
# define DES_PTR
|
||||
# define DES_RISC1
|
||||
# define DES_UNROLL
|
||||
#endif /* Systems-specific speed defines */
|
||||
#endif
|
||||
|
||||
#endif /* DES_DEFAULT_OPTIONS */
|
||||
#endif /* HEADER_DES_LOCL_H */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,97 +0,0 @@
|
|||
#ifndef HEADER_OPENSSLV_H
|
||||
# define HEADER_OPENSSLV_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*-
|
||||
* Numeric release version identifier:
|
||||
* MNNFFPPS: major minor fix patch status
|
||||
* The status nibble has one of the values 0 for development, 1 to e for betas
|
||||
* 1 to 14, and f for release. The patch level is exactly that.
|
||||
* For example:
|
||||
* 0.9.3-dev 0x00903000
|
||||
* 0.9.3-beta1 0x00903001
|
||||
* 0.9.3-beta2-dev 0x00903002
|
||||
* 0.9.3-beta2 0x00903002 (same as ...beta2-dev)
|
||||
* 0.9.3 0x0090300f
|
||||
* 0.9.3a 0x0090301f
|
||||
* 0.9.4 0x0090400f
|
||||
* 1.2.3z 0x102031af
|
||||
*
|
||||
* For continuity reasons (because 0.9.5 is already out, and is coded
|
||||
* 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
|
||||
* part is slightly different, by setting the highest bit. This means
|
||||
* that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start
|
||||
* with 0x0090600S...
|
||||
*
|
||||
* (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
# define OPENSSL_VERSION_NUMBER 0x1000200fL
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2-fips 22 Jan 2015"
|
||||
# else
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2 22 Jan 2015"
|
||||
# endif
|
||||
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
/*-
|
||||
* The macros below are to be used for shared library (.so, .dll, ...)
|
||||
* versioning. That kind of versioning works a bit differently between
|
||||
* operating systems. The most usual scheme is to set a major and a minor
|
||||
* number, and have the runtime loader check that the major number is equal
|
||||
* to what it was at application link time, while the minor number has to
|
||||
* be greater or equal to what it was at application link time. With this
|
||||
* scheme, the version number is usually part of the file name, like this:
|
||||
*
|
||||
* libcrypto.so.0.9
|
||||
*
|
||||
* Some unixen also make a softlink with the major verson number only:
|
||||
*
|
||||
* libcrypto.so.0
|
||||
*
|
||||
* On Tru64 and IRIX 6.x it works a little bit differently. There, the
|
||||
* shared library version is stored in the file, and is actually a series
|
||||
* of versions, separated by colons. The rightmost version present in the
|
||||
* library when linking an application is stored in the application to be
|
||||
* matched at run time. When the application is run, a check is done to
|
||||
* see if the library version stored in the application matches any of the
|
||||
* versions in the version string of the library itself.
|
||||
* This version string can be constructed in any way, depending on what
|
||||
* kind of matching is desired. However, to implement the same scheme as
|
||||
* the one used in the other unixen, all compatible versions, from lowest
|
||||
* to highest, should be part of the string. Consecutive builds would
|
||||
* give the following versions strings:
|
||||
*
|
||||
* 3.0
|
||||
* 3.0:3.1
|
||||
* 3.0:3.1:3.2
|
||||
* 4.0
|
||||
* 4.0:4.1
|
||||
*
|
||||
* Notice how version 4 is completely incompatible with version, and
|
||||
* therefore give the breach you can see.
|
||||
*
|
||||
* There may be other schemes as well that I haven't yet discovered.
|
||||
*
|
||||
* So, here's the way it works here: first of all, the library version
|
||||
* number doesn't need at all to match the overall OpenSSL version.
|
||||
* However, it's nice and more understandable if it actually does.
|
||||
* The current library version is stored in the macro SHLIB_VERSION_NUMBER,
|
||||
* which is just a piece of text in the format "M.m.e" (Major, minor, edit).
|
||||
* For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
|
||||
* we need to keep a history of version numbers, which is done in the
|
||||
* macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and
|
||||
* should only keep the versions that are binary compatible with the current.
|
||||
*/
|
||||
# define SHLIB_VERSION_HISTORY ""
|
||||
# define SHLIB_VERSION_NUMBER "1.0.0"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* HEADER_OPENSSLV_H */
|
|
@ -1,211 +0,0 @@
|
|||
/* ====================================================================
|
||||
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HEADER_OPENSSL_TYPES_H
|
||||
# define HEADER_OPENSSL_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
# ifdef NO_ASN1_TYPEDEFS
|
||||
# define ASN1_INTEGER ASN1_STRING
|
||||
# define ASN1_ENUMERATED ASN1_STRING
|
||||
# define ASN1_BIT_STRING ASN1_STRING
|
||||
# define ASN1_OCTET_STRING ASN1_STRING
|
||||
# define ASN1_PRINTABLESTRING ASN1_STRING
|
||||
# define ASN1_T61STRING ASN1_STRING
|
||||
# define ASN1_IA5STRING ASN1_STRING
|
||||
# define ASN1_UTCTIME ASN1_STRING
|
||||
# define ASN1_GENERALIZEDTIME ASN1_STRING
|
||||
# define ASN1_TIME ASN1_STRING
|
||||
# define ASN1_GENERALSTRING ASN1_STRING
|
||||
# define ASN1_UNIVERSALSTRING ASN1_STRING
|
||||
# define ASN1_BMPSTRING ASN1_STRING
|
||||
# define ASN1_VISIBLESTRING ASN1_STRING
|
||||
# define ASN1_UTF8STRING ASN1_STRING
|
||||
# define ASN1_BOOLEAN int
|
||||
# define ASN1_NULL int
|
||||
# else
|
||||
typedef struct asn1_string_st ASN1_INTEGER;
|
||||
typedef struct asn1_string_st ASN1_ENUMERATED;
|
||||
typedef struct asn1_string_st ASN1_BIT_STRING;
|
||||
typedef struct asn1_string_st ASN1_OCTET_STRING;
|
||||
typedef struct asn1_string_st ASN1_PRINTABLESTRING;
|
||||
typedef struct asn1_string_st ASN1_T61STRING;
|
||||
typedef struct asn1_string_st ASN1_IA5STRING;
|
||||
typedef struct asn1_string_st ASN1_GENERALSTRING;
|
||||
typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
|
||||
typedef struct asn1_string_st ASN1_BMPSTRING;
|
||||
typedef struct asn1_string_st ASN1_UTCTIME;
|
||||
typedef struct asn1_string_st ASN1_TIME;
|
||||
typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
|
||||
typedef struct asn1_string_st ASN1_VISIBLESTRING;
|
||||
typedef struct asn1_string_st ASN1_UTF8STRING;
|
||||
typedef struct asn1_string_st ASN1_STRING;
|
||||
typedef int ASN1_BOOLEAN;
|
||||
typedef int ASN1_NULL;
|
||||
# endif
|
||||
|
||||
typedef struct asn1_object_st ASN1_OBJECT;
|
||||
|
||||
typedef struct ASN1_ITEM_st ASN1_ITEM;
|
||||
typedef struct asn1_pctx_st ASN1_PCTX;
|
||||
|
||||
# ifdef OPENSSL_SYS_WIN32
|
||||
# undef X509_NAME
|
||||
# undef X509_EXTENSIONS
|
||||
# undef X509_CERT_PAIR
|
||||
# undef PKCS7_ISSUER_AND_SERIAL
|
||||
# undef OCSP_REQUEST
|
||||
# undef OCSP_RESPONSE
|
||||
# endif
|
||||
|
||||
# ifdef BIGNUM
|
||||
# undef BIGNUM
|
||||
# endif
|
||||
typedef struct bignum_st BIGNUM;
|
||||
typedef struct bignum_ctx BN_CTX;
|
||||
typedef struct bn_blinding_st BN_BLINDING;
|
||||
typedef struct bn_mont_ctx_st BN_MONT_CTX;
|
||||
typedef struct bn_recp_ctx_st BN_RECP_CTX;
|
||||
typedef struct bn_gencb_st BN_GENCB;
|
||||
|
||||
typedef struct buf_mem_st BUF_MEM;
|
||||
|
||||
typedef struct evp_cipher_st EVP_CIPHER;
|
||||
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
|
||||
typedef struct env_md_st EVP_MD;
|
||||
typedef struct env_md_ctx_st EVP_MD_CTX;
|
||||
typedef struct evp_pkey_st EVP_PKEY;
|
||||
|
||||
typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
|
||||
|
||||
typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
|
||||
typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
|
||||
|
||||
typedef struct dh_st DH;
|
||||
typedef struct dh_method DH_METHOD;
|
||||
|
||||
typedef struct dsa_st DSA;
|
||||
typedef struct dsa_method DSA_METHOD;
|
||||
|
||||
typedef struct rsa_st RSA;
|
||||
typedef struct rsa_meth_st RSA_METHOD;
|
||||
|
||||
typedef struct rand_meth_st RAND_METHOD;
|
||||
|
||||
typedef struct ecdh_method ECDH_METHOD;
|
||||
typedef struct ecdsa_method ECDSA_METHOD;
|
||||
|
||||
typedef struct x509_st X509;
|
||||
typedef struct X509_algor_st X509_ALGOR;
|
||||
typedef struct X509_crl_st X509_CRL;
|
||||
typedef struct x509_crl_method_st X509_CRL_METHOD;
|
||||
typedef struct x509_revoked_st X509_REVOKED;
|
||||
typedef struct X509_name_st X509_NAME;
|
||||
typedef struct X509_pubkey_st X509_PUBKEY;
|
||||
typedef struct x509_store_st X509_STORE;
|
||||
typedef struct x509_store_ctx_st X509_STORE_CTX;
|
||||
|
||||
typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
|
||||
|
||||
typedef struct v3_ext_ctx X509V3_CTX;
|
||||
typedef struct conf_st CONF;
|
||||
|
||||
typedef struct store_st STORE;
|
||||
typedef struct store_method_st STORE_METHOD;
|
||||
|
||||
typedef struct ui_st UI;
|
||||
typedef struct ui_method_st UI_METHOD;
|
||||
|
||||
typedef struct st_ERR_FNS ERR_FNS;
|
||||
|
||||
typedef struct engine_st ENGINE;
|
||||
typedef struct ssl_st SSL;
|
||||
typedef struct ssl_ctx_st SSL_CTX;
|
||||
|
||||
typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
|
||||
typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
|
||||
typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
|
||||
typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
|
||||
|
||||
typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
|
||||
typedef struct DIST_POINT_st DIST_POINT;
|
||||
typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
|
||||
typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
|
||||
|
||||
/* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
|
||||
# define DECLARE_PKCS12_STACK_OF(type)/* Nothing */
|
||||
# define IMPLEMENT_PKCS12_STACK_OF(type)/* Nothing */
|
||||
|
||||
typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
|
||||
/* Callback types for crypto.h */
|
||||
typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
|
||||
void *from_d, int idx, long argl, void *argp);
|
||||
|
||||
typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
|
||||
typedef struct ocsp_response_st OCSP_RESPONSE;
|
||||
typedef struct ocsp_responder_id_st OCSP_RESPID;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* def HEADER_OPENSSL_TYPES_H */
|
|
@ -1,813 +0,0 @@
|
|||
/* ssl/tls1.h */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@cryptsoft.com).
|
||||
* The implementation was written so as to conform with Netscapes SSL.
|
||||
*
|
||||
* This library is free for commercial and non-commercial use as long as
|
||||
* the following conditions are aheared to. The following conditions
|
||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
* included with this distribution is covered by the same copyright terms
|
||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
* the code are not to be removed.
|
||||
* If this package is used in a product, Eric Young should be given attribution
|
||||
* as the author of the parts of the library used.
|
||||
* This can be in the form of a textual message at program startup or
|
||||
* in documentation (online or textual) provided with the package.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* "This product includes cryptographic software written by
|
||||
* Eric Young (eay@cryptsoft.com)"
|
||||
* The word 'cryptographic' can be left out if the rouines from the library
|
||||
* being used are not cryptographic related :-).
|
||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
* the apps directory (application code) you must include an acknowledgement:
|
||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* The licence and distribution terms for any publically available version or
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
||||
*
|
||||
* Portions of the attached software ("Contribution") are developed by
|
||||
* SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
|
||||
*
|
||||
* The Contribution is licensed pursuant to the OpenSSL open source
|
||||
* license provided above.
|
||||
*
|
||||
* ECC cipher suite support in OpenSSL originally written by
|
||||
* Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories.
|
||||
*
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright 2005 Nokia. All rights reserved.
|
||||
*
|
||||
* The portions of the attached software ("Contribution") is developed by
|
||||
* Nokia Corporation and is licensed pursuant to the OpenSSL open source
|
||||
* license.
|
||||
*
|
||||
* The Contribution, originally written by Mika Kousa and Pasi Eronen of
|
||||
* Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
|
||||
* support (see RFC 4279) to OpenSSL.
|
||||
*
|
||||
* No patent licenses or other rights except those expressly stated in
|
||||
* the OpenSSL open source license shall be deemed granted or received
|
||||
* expressly, by implication, estoppel, or otherwise.
|
||||
*
|
||||
* No assurances are provided by Nokia that the Contribution does not
|
||||
* infringe the patent or other intellectual property rights of any third
|
||||
* party or that the license provides you with all the necessary rights
|
||||
* to make use of the Contribution.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
|
||||
* ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
|
||||
* SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
|
||||
* OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
|
||||
* OTHERWISE.
|
||||
*/
|
||||
|
||||
#ifndef HEADER_TLS1_H
|
||||
# define HEADER_TLS1_H
|
||||
|
||||
# include <openssl/buffer.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 0
|
||||
|
||||
# define TLS1_VERSION 0x0301
|
||||
# define TLS1_1_VERSION 0x0302
|
||||
# define TLS1_2_VERSION 0x0303
|
||||
# define TLS_MAX_VERSION TLS1_2_VERSION
|
||||
|
||||
# define TLS1_VERSION_MAJOR 0x03
|
||||
# define TLS1_VERSION_MINOR 0x01
|
||||
|
||||
# define TLS1_1_VERSION_MAJOR 0x03
|
||||
# define TLS1_1_VERSION_MINOR 0x02
|
||||
|
||||
# define TLS1_2_VERSION_MAJOR 0x03
|
||||
# define TLS1_2_VERSION_MINOR 0x03
|
||||
|
||||
# define TLS1_get_version(s) \
|
||||
((s->version >> 8) == TLS1_VERSION_MAJOR ? s->version : 0)
|
||||
|
||||
# define TLS1_get_client_version(s) \
|
||||
((s->client_version >> 8) == TLS1_VERSION_MAJOR ? s->client_version : 0)
|
||||
|
||||
# define TLS1_AD_DECRYPTION_FAILED 21
|
||||
# define TLS1_AD_RECORD_OVERFLOW 22
|
||||
# define TLS1_AD_UNKNOWN_CA 48/* fatal */
|
||||
# define TLS1_AD_ACCESS_DENIED 49/* fatal */
|
||||
# define TLS1_AD_DECODE_ERROR 50/* fatal */
|
||||
# define TLS1_AD_DECRYPT_ERROR 51
|
||||
# define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */
|
||||
# define TLS1_AD_PROTOCOL_VERSION 70/* fatal */
|
||||
# define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */
|
||||
# define TLS1_AD_INTERNAL_ERROR 80/* fatal */
|
||||
# define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */
|
||||
# define TLS1_AD_USER_CANCELLED 90
|
||||
# define TLS1_AD_NO_RENEGOTIATION 100
|
||||
/* codes 110-114 are from RFC3546 */
|
||||
# define TLS1_AD_UNSUPPORTED_EXTENSION 110
|
||||
# define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
|
||||
# define TLS1_AD_UNRECOGNIZED_NAME 112
|
||||
# define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
|
||||
# define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
|
||||
# define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */
|
||||
|
||||
/* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */
|
||||
# define TLSEXT_TYPE_server_name 0
|
||||
# define TLSEXT_TYPE_max_fragment_length 1
|
||||
# define TLSEXT_TYPE_client_certificate_url 2
|
||||
# define TLSEXT_TYPE_trusted_ca_keys 3
|
||||
# define TLSEXT_TYPE_truncated_hmac 4
|
||||
# define TLSEXT_TYPE_status_request 5
|
||||
/* ExtensionType values from RFC4681 */
|
||||
# define TLSEXT_TYPE_user_mapping 6
|
||||
/* ExtensionType values from RFC5878 */
|
||||
# define TLSEXT_TYPE_client_authz 7
|
||||
# define TLSEXT_TYPE_server_authz 8
|
||||
/* ExtensionType values from RFC6091 */
|
||||
# define TLSEXT_TYPE_cert_type 9
|
||||
|
||||
/* ExtensionType values from RFC4492 */
|
||||
# define TLSEXT_TYPE_elliptic_curves 10
|
||||
# define TLSEXT_TYPE_ec_point_formats 11
|
||||
|
||||
/* ExtensionType value from RFC5054 */
|
||||
# define TLSEXT_TYPE_srp 12
|
||||
|
||||
/* ExtensionType values from RFC5246 */
|
||||
# define TLSEXT_TYPE_signature_algorithms 13
|
||||
|
||||
/* ExtensionType value from RFC5764 */
|
||||
# define TLSEXT_TYPE_use_srtp 14
|
||||
|
||||
/* ExtensionType value from RFC5620 */
|
||||
# define TLSEXT_TYPE_heartbeat 15
|
||||
|
||||
/* ExtensionType value from draft-ietf-tls-applayerprotoneg-00 */
|
||||
# define TLSEXT_TYPE_application_layer_protocol_negotiation 16
|
||||
|
||||
/*
|
||||
* ExtensionType value for TLS padding extension.
|
||||
* http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml
|
||||
* http://tools.ietf.org/html/draft-agl-tls-padding-03
|
||||
*/
|
||||
# define TLSEXT_TYPE_padding 21
|
||||
|
||||
/* ExtensionType value from RFC4507 */
|
||||
# define TLSEXT_TYPE_session_ticket 35
|
||||
|
||||
/* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */
|
||||
# if 0
|
||||
/*
|
||||
* will have to be provided externally for now ,
|
||||
* i.e. build with -DTLSEXT_TYPE_opaque_prf_input=38183
|
||||
* using whatever extension number you'd like to try
|
||||
*/
|
||||
# define TLSEXT_TYPE_opaque_prf_input ??
|
||||
# endif
|
||||
|
||||
/* Temporary extension type */
|
||||
# define TLSEXT_TYPE_renegotiate 0xff01
|
||||
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
/* This is not an IANA defined extension number */
|
||||
# define TLSEXT_TYPE_next_proto_neg 13172
|
||||
# endif
|
||||
|
||||
/* NameType value from RFC 3546 */
|
||||
# define TLSEXT_NAMETYPE_host_name 0
|
||||
/* status request value from RFC 3546 */
|
||||
# define TLSEXT_STATUSTYPE_ocsp 1
|
||||
|
||||
/* ECPointFormat values from draft-ietf-tls-ecc-12 */
|
||||
# define TLSEXT_ECPOINTFORMAT_first 0
|
||||
# define TLSEXT_ECPOINTFORMAT_uncompressed 0
|
||||
# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1
|
||||
# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2
|
||||
# define TLSEXT_ECPOINTFORMAT_last 2
|
||||
|
||||
/* Signature and hash algorithms from RFC 5246 */
|
||||
|
||||
# define TLSEXT_signature_anonymous 0
|
||||
# define TLSEXT_signature_rsa 1
|
||||
# define TLSEXT_signature_dsa 2
|
||||
# define TLSEXT_signature_ecdsa 3
|
||||
|
||||
/* Total number of different signature algorithms */
|
||||
# define TLSEXT_signature_num 4
|
||||
|
||||
# define TLSEXT_hash_none 0
|
||||
# define TLSEXT_hash_md5 1
|
||||
# define TLSEXT_hash_sha1 2
|
||||
# define TLSEXT_hash_sha224 3
|
||||
# define TLSEXT_hash_sha256 4
|
||||
# define TLSEXT_hash_sha384 5
|
||||
# define TLSEXT_hash_sha512 6
|
||||
|
||||
/* Total number of different digest algorithms */
|
||||
|
||||
# define TLSEXT_hash_num 7
|
||||
|
||||
/* Flag set for unrecognised algorithms */
|
||||
# define TLSEXT_nid_unknown 0x1000000
|
||||
|
||||
/* ECC curves */
|
||||
|
||||
# define TLSEXT_curve_P_256 23
|
||||
# define TLSEXT_curve_P_384 24
|
||||
|
||||
# ifndef OPENSSL_NO_TLSEXT
|
||||
|
||||
# define TLSEXT_MAXLEN_host_name 255
|
||||
|
||||
const char *SSL_get_servername(const SSL *s, const int type);
|
||||
int SSL_get_servername_type(const SSL *s);
|
||||
/*
|
||||
* SSL_export_keying_material exports a value derived from the master secret,
|
||||
* as specified in RFC 5705. It writes |olen| bytes to |out| given a label and
|
||||
* optional context. (Since a zero length context is allowed, the |use_context|
|
||||
* flag controls whether a context is included.) It returns 1 on success and
|
||||
* zero otherwise.
|
||||
*/
|
||||
int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
|
||||
const char *label, size_t llen,
|
||||
const unsigned char *p, size_t plen,
|
||||
int use_context);
|
||||
|
||||
int SSL_get_sigalgs(SSL *s, int idx,
|
||||
int *psign, int *phash, int *psignandhash,
|
||||
unsigned char *rsig, unsigned char *rhash);
|
||||
|
||||
int SSL_get_shared_sigalgs(SSL *s, int idx,
|
||||
int *psign, int *phash, int *psignandhash,
|
||||
unsigned char *rsig, unsigned char *rhash);
|
||||
|
||||
int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain);
|
||||
|
||||
# define SSL_set_tlsext_host_name(s,name) \
|
||||
SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name)
|
||||
|
||||
# define SSL_set_tlsext_debug_callback(ssl, cb) \
|
||||
SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb)
|
||||
|
||||
# define SSL_set_tlsext_debug_arg(ssl, arg) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg)
|
||||
|
||||
# define SSL_set_tlsext_status_type(ssl, type) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL)
|
||||
|
||||
# define SSL_get_tlsext_status_exts(ssl, arg) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
|
||||
|
||||
# define SSL_set_tlsext_status_exts(ssl, arg) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
|
||||
|
||||
# define SSL_get_tlsext_status_ids(ssl, arg) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
|
||||
|
||||
# define SSL_set_tlsext_status_ids(ssl, arg) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
|
||||
|
||||
# define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)arg)
|
||||
|
||||
# define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)arg)
|
||||
|
||||
# define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
|
||||
SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb)
|
||||
|
||||
# define SSL_TLSEXT_ERR_OK 0
|
||||
# define SSL_TLSEXT_ERR_ALERT_WARNING 1
|
||||
# define SSL_TLSEXT_ERR_ALERT_FATAL 2
|
||||
# define SSL_TLSEXT_ERR_NOACK 3
|
||||
|
||||
# define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
|
||||
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg)
|
||||
|
||||
# define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
|
||||
SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys))
|
||||
# define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
|
||||
SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys))
|
||||
|
||||
# define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
|
||||
SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb)
|
||||
|
||||
# define SSL_CTX_set_tlsext_status_arg(ssl, arg) \
|
||||
SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg)
|
||||
|
||||
# define SSL_set_tlsext_opaque_prf_input(s, src, len) \
|
||||
SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT, len, src)
|
||||
# define SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) \
|
||||
SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB, (void (*)(void))cb)
|
||||
# define SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) \
|
||||
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG, 0, arg)
|
||||
|
||||
# define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \
|
||||
SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
|
||||
|
||||
# ifndef OPENSSL_NO_HEARTBEATS
|
||||
# define SSL_TLSEXT_HB_ENABLED 0x01
|
||||
# define SSL_TLSEXT_HB_DONT_SEND_REQUESTS 0x02
|
||||
# define SSL_TLSEXT_HB_DONT_RECV_REQUESTS 0x04
|
||||
|
||||
# define SSL_get_tlsext_heartbeat_pending(ssl) \
|
||||
SSL_ctrl((ssl),SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING,0,NULL)
|
||||
# define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \
|
||||
SSL_ctrl((ssl),SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* PSK ciphersuites from 4279 */
|
||||
# define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A
|
||||
# define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B
|
||||
# define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C
|
||||
# define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D
|
||||
|
||||
/*
|
||||
* Additional TLS ciphersuites from expired Internet Draft
|
||||
* draft-ietf-tls-56-bit-ciphersuites-01.txt (available if
|
||||
* TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see s3_lib.c). We
|
||||
* actually treat them like SSL 3.0 ciphers, which we probably shouldn't.
|
||||
* Note that the first two are actually not in the IDs.
|
||||
*/
|
||||
# define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060/* not in
|
||||
* ID */
|
||||
# define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061/* not in
|
||||
* ID */
|
||||
# define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062
|
||||
# define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063
|
||||
# define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064
|
||||
# define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065
|
||||
# define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066
|
||||
|
||||
/* AES ciphersuites from RFC3268 */
|
||||
|
||||
# define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F
|
||||
# define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030
|
||||
# define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031
|
||||
# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032
|
||||
# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033
|
||||
# define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034
|
||||
|
||||
# define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035
|
||||
# define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036
|
||||
# define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037
|
||||
# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038
|
||||
# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039
|
||||
# define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A
|
||||
|
||||
/* TLS v1.2 ciphersuites */
|
||||
# define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B
|
||||
# define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C
|
||||
# define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D
|
||||
# define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E
|
||||
# define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F
|
||||
# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040
|
||||
|
||||
/* Camellia ciphersuites from RFC4132 */
|
||||
# define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041
|
||||
# define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042
|
||||
# define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043
|
||||
# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044
|
||||
# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045
|
||||
# define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046
|
||||
|
||||
/* TLS v1.2 ciphersuites */
|
||||
# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067
|
||||
# define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068
|
||||
# define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069
|
||||
# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A
|
||||
# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B
|
||||
# define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C
|
||||
# define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D
|
||||
|
||||
/* Camellia ciphersuites from RFC4132 */
|
||||
# define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084
|
||||
# define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085
|
||||
# define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086
|
||||
# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087
|
||||
# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088
|
||||
# define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089
|
||||
|
||||
/* SEED ciphersuites from RFC4162 */
|
||||
# define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096
|
||||
# define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097
|
||||
# define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098
|
||||
# define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099
|
||||
# define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A
|
||||
# define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B
|
||||
|
||||
/* TLS v1.2 GCM ciphersuites from RFC5288 */
|
||||
# define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C
|
||||
# define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D
|
||||
# define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E
|
||||
# define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F
|
||||
# define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0
|
||||
# define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1
|
||||
# define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2
|
||||
# define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3
|
||||
# define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4
|
||||
# define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5
|
||||
# define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6
|
||||
# define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7
|
||||
|
||||
/*
|
||||
* ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in
|
||||
* draft 13
|
||||
*/
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005
|
||||
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A
|
||||
|
||||
# define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B
|
||||
# define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C
|
||||
# define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D
|
||||
# define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E
|
||||
# define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F
|
||||
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014
|
||||
|
||||
# define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015
|
||||
# define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016
|
||||
# define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017
|
||||
# define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018
|
||||
# define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019
|
||||
|
||||
/* SRP ciphersuites from RFC 5054 */
|
||||
# define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A
|
||||
# define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B
|
||||
# define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C
|
||||
# define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D
|
||||
# define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E
|
||||
# define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F
|
||||
# define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020
|
||||
# define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021
|
||||
# define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022
|
||||
|
||||
/* ECDH HMAC based ciphersuites from RFC5289 */
|
||||
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028
|
||||
# define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029
|
||||
# define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A
|
||||
|
||||
/* ECDH GCM based ciphersuites from RFC5289 */
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B
|
||||
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D
|
||||
# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F
|
||||
# define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030
|
||||
# define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031
|
||||
# define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032
|
||||
|
||||
/*
|
||||
* XXX * Backward compatibility alert: + * Older versions of OpenSSL gave
|
||||
* some DHE ciphers names with "EDH" + * instead of "DHE". Going forward, we
|
||||
* should be using DHE + * everywhere, though we may indefinitely maintain
|
||||
* aliases for users + * or configurations that used "EDH" +
|
||||
*/
|
||||
# define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5"
|
||||
# define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5"
|
||||
# define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DHE-DSS-DES-CBC-SHA"
|
||||
# define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA "EXP1024-RC4-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA "EXP1024-DHE-DSS-RC4-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA"
|
||||
|
||||
/* AES ciphersuites from RFC3268 */
|
||||
# define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA"
|
||||
# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA"
|
||||
# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA"
|
||||
# define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA"
|
||||
|
||||
# define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA"
|
||||
# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA"
|
||||
# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA"
|
||||
# define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA"
|
||||
|
||||
/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA"
|
||||
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA"
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA"
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA"
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA"
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA"
|
||||
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA"
|
||||
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA"
|
||||
|
||||
# define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA"
|
||||
# define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA"
|
||||
# define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA"
|
||||
# define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA"
|
||||
# define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA"
|
||||
|
||||
/* PSK ciphersuites from RFC 4279 */
|
||||
# define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA"
|
||||
# define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA"
|
||||
# define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA"
|
||||
# define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA"
|
||||
|
||||
/* SRP ciphersuite from RFC 5054 */
|
||||
# define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA"
|
||||
# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA"
|
||||
|
||||
/* Camellia ciphersuites from RFC4132 */
|
||||
# define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA"
|
||||
# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA"
|
||||
# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA"
|
||||
# define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA"
|
||||
|
||||
# define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA"
|
||||
# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA"
|
||||
# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA"
|
||||
# define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA"
|
||||
|
||||
/* SEED ciphersuites from RFC4162 */
|
||||
# define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA"
|
||||
# define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA"
|
||||
# define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA"
|
||||
# define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA"
|
||||
|
||||
/* TLS v1.2 ciphersuites */
|
||||
# define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256"
|
||||
# define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256"
|
||||
# define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256"
|
||||
# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256"
|
||||
# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256"
|
||||
# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256"
|
||||
# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256"
|
||||
# define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256"
|
||||
# define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256"
|
||||
|
||||
/* TLS v1.2 GCM ciphersuites from RFC5288 */
|
||||
# define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384"
|
||||
|
||||
/* ECDH HMAC based ciphersuites from RFC5289 */
|
||||
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256"
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384"
|
||||
|
||||
/* ECDH GCM based ciphersuites from RFC5289 */
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "ECDHE-ECDSA-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "ECDHE-ECDSA-AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 "ECDH-ECDSA-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 "ECDH-ECDSA-AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256"
|
||||
# define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384"
|
||||
|
||||
# define TLS_CT_RSA_SIGN 1
|
||||
# define TLS_CT_DSS_SIGN 2
|
||||
# define TLS_CT_RSA_FIXED_DH 3
|
||||
# define TLS_CT_DSS_FIXED_DH 4
|
||||
# define TLS_CT_ECDSA_SIGN 64
|
||||
# define TLS_CT_RSA_FIXED_ECDH 65
|
||||
# define TLS_CT_ECDSA_FIXED_ECDH 66
|
||||
# define TLS_CT_GOST94_SIGN 21
|
||||
# define TLS_CT_GOST01_SIGN 22
|
||||
/*
|
||||
* when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
|
||||
* comment there)
|
||||
*/
|
||||
# define TLS_CT_NUMBER 9
|
||||
|
||||
# define TLS1_FINISH_MAC_LENGTH 12
|
||||
|
||||
# define TLS_MD_MAX_CONST_SIZE 20
|
||||
# define TLS_MD_CLIENT_FINISH_CONST "client finished"
|
||||
# define TLS_MD_CLIENT_FINISH_CONST_SIZE 15
|
||||
# define TLS_MD_SERVER_FINISH_CONST "server finished"
|
||||
# define TLS_MD_SERVER_FINISH_CONST_SIZE 15
|
||||
# define TLS_MD_SERVER_WRITE_KEY_CONST "server write key"
|
||||
# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16
|
||||
# define TLS_MD_KEY_EXPANSION_CONST "key expansion"
|
||||
# define TLS_MD_KEY_EXPANSION_CONST_SIZE 13
|
||||
# define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key"
|
||||
# define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16
|
||||
# define TLS_MD_SERVER_WRITE_KEY_CONST "server write key"
|
||||
# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16
|
||||
# define TLS_MD_IV_BLOCK_CONST "IV block"
|
||||
# define TLS_MD_IV_BLOCK_CONST_SIZE 8
|
||||
# define TLS_MD_MASTER_SECRET_CONST "master secret"
|
||||
# define TLS_MD_MASTER_SECRET_CONST_SIZE 13
|
||||
|
||||
# ifdef CHARSET_EBCDIC
|
||||
# undef TLS_MD_CLIENT_FINISH_CONST
|
||||
/*
|
||||
* client finished
|
||||
*/
|
||||
# define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
|
||||
|
||||
# undef TLS_MD_SERVER_FINISH_CONST
|
||||
/*
|
||||
* server finished
|
||||
*/
|
||||
# define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
|
||||
|
||||
# undef TLS_MD_SERVER_WRITE_KEY_CONST
|
||||
/*
|
||||
* server write key
|
||||
*/
|
||||
# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
|
||||
|
||||
# undef TLS_MD_KEY_EXPANSION_CONST
|
||||
/*
|
||||
* key expansion
|
||||
*/
|
||||
# define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"
|
||||
|
||||
# undef TLS_MD_CLIENT_WRITE_KEY_CONST
|
||||
/*
|
||||
* client write key
|
||||
*/
|
||||
# define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
|
||||
|
||||
# undef TLS_MD_SERVER_WRITE_KEY_CONST
|
||||
/*
|
||||
* server write key
|
||||
*/
|
||||
# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
|
||||
|
||||
# undef TLS_MD_IV_BLOCK_CONST
|
||||
/*
|
||||
* IV block
|
||||
*/
|
||||
# define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b"
|
||||
|
||||
# undef TLS_MD_MASTER_SECRET_CONST
|
||||
/*
|
||||
* master secret
|
||||
*/
|
||||
# define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
|
||||
# endif
|
||||
|
||||
/* TLS Session Ticket extension struct */
|
||||
struct tls_session_ticket_ext_st {
|
||||
unsigned short length;
|
||||
void *data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue