Compare commits

..

1827 Commits

Author SHA1 Message Date
Povilas Kanapickas
c43597c27a Barrier v2.3.4 2021-11-01 22:11:28 +02:00
Povilas Kanapickas
b1ceff97af Merge pull request #1359 from p12tic/2.3-release
[2.3.x] Prepare for v2.3.4
2021-11-01 22:07:51 +02:00
Povilas Kanapickas
ad1a2c0bd6 Release notes for v2.3.4 2021-11-01 21:39:12 +02:00
Povilas Kanapickas
8883cfae0f Setup release notes build using towncrier tool 2021-11-01 21:32:02 +02:00
Povilas Kanapickas
342bb6295f azure-pipelines: Use a different artifact name for each macOS image 2021-11-01 21:32:02 +02:00
Povilas Kanapickas
5417a4ece9 Document the releasing procedure 2021-11-01 21:32:02 +02:00
Povilas Kanapickas
a3a354e664 Merge pull request #1357 from p12tic/2.3-build-fixes
[2.3.x] Backport build fixes
2021-11-01 21:31:30 +02:00
Povilas Kanapickas
34f03b689c Sync OSX build environment with current master
This synchronizes the contents of the files with
fc6d4e41d8.
2021-11-01 19:57:26 +02:00
Dom Rodriguez
61ac3793e0 Fix missing VM parameter, matrix doesn't select automatically
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
(cherry picked from commit a53380de4f)
2021-11-01 19:33:03 +02:00
Dom Rodriguez
cc3be8162a Fix indentation on macOS matrix
Turns out VS Code handled the YAML indentation.... badly.

This should fix it.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
(cherry picked from commit 907bcdcfea)
2021-11-01 19:33:03 +02:00
Dom Rodriguez
b633f34adc Initial test of multi-macOS builds
This is an initial test of building Barrier for multiple macOS versions.

For:

- Big Sur
- Moja\ve
- Catalina

I think there's an indentation issue somewhere, but VS Code isn't
'seeing' it... let's hope this works.

If it does, we can proceed to merge.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
(cherry picked from commit 59d076988f)
2021-11-01 19:33:03 +02:00
Dom Rodriguez
15202b4b85 Pipelines: Remove Ubuntu 16.04 agent
Azure Pipelines no longer supports Ubuntu 16.04, so to remove the
error, this commit removes it from the cross-platform matrix.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
(cherry picked from commit 2877e6cb17)
2021-11-01 19:32:07 +02:00
Tomoya Tanjo
00c29b80a6 Attempt to support several Ubuntu LTSs to CI
(cherry picked from commit 57463a31f8)
2021-11-01 19:29:22 +02:00
Tomoya Tanjo
4e0081ef21 Update azure-pipelines.yml to use Ubuntu 20.04
(cherry picked from commit 695a737a89)
2021-11-01 19:29:22 +02:00
Povilas Kanapickas
dcbd1f91b1 Merge pull request #1356 from p12tic/2.3-security-fixes
Backports of security fixes to 2.3.x
2021-11-01 19:28:18 +02:00
Povilas Kanapickas
e32cc609e2 lib/net: Fix incorrect sharing of data between different SSL sessions
(cherry picked from commit f0efe043bb)
2021-11-01 18:06:54 +02:00
Povilas Kanapickas
1c1e83c942 lib/net: Fix race conditions when closing SSL connections
This fixes the following security vulnerability:
- CVE-2021-42074 SIGSEGV on quick open/close sequence while sending
Hello message

The issue has been reported by Matthias Gerstner <mgerstner@suse.de>.
2021-11-01 17:43:35 +02:00
Povilas Kanapickas
ceecc61388 lib/server: Close connection when client app-level handshake fails
This fixes the following security vulnerability:
 - CVE-2021-42075 DoS via file descriptor exhaustion

The issue has been reported by Matthias Gerstner <mgerstner@suse.de>.

(cherry picked from commit deefecc262)
2021-11-01 17:41:06 +02:00
Povilas Kanapickas
45cd2a9f34 lib/barrier: Disconnect client on too long input packets
This commit is the 3/3 part of the fix for the following security
vulnerability:
 - CVE-2021-42076 DoS via excess length messages

The issue has been reported by Matthias Gerstner <mgerstner@suse.de>.

(cherry picked from commit fd5295eb31)
2021-11-01 17:40:49 +02:00
Povilas Kanapickas
d762ab7d50 lib/net: Limit the maximum size of TCP or SSL input buffers
This commit is the 2/3 part of the fix for the following security
vulnerability:
 - CVE-2021-42076 DoS via excess length messages

The issue has been reported by Matthias Gerstner <mgerstner@suse.de>.

(cherry picked from commit af90f39b4a)
2021-11-01 17:40:45 +02:00
Povilas Kanapickas
f546af4a85 lib: Enforce a maximum length of input messages
This commit is the 1/3 part of the fix for the following security
vulnerability:
 - CVE-2021-42076 DoS via excess length messages

The issue has been reported by Matthias Gerstner <mgerstner@suse.de>.

(cherry picked from commit e33c81b835)
2021-11-01 17:39:42 +02:00
Povilas Kanapickas
d9b4a1c703 lib/server: Remove unused code
(cherry picked from commit cc369820d4)
2021-11-01 17:39:26 +02:00
Dom Rodriguez
3395cca967 Prepare for v2.3.3 release 2020-07-14 18:37:45 +01:00
Povilas Kanapickas
2393393b88 Merge pull request #750 from nh2/double-tap-explanation
ui: Settings: Explain what "double tap" means
2020-06-14 22:45:35 +03:00
Niklas Hambüchen
03c1f06878 ui: Settings: Explain what "double tap" means 2020-06-14 20:16:03 +02:00
Povilas Kanapickas
965cd70ba2 Merge pull request #742 from maxiberta/fix-snap-submodules
Fix snap build failing to initialize submodules
2020-06-11 20:43:36 +03:00
Maximiliano Bertacchini
d06395a6f2 Fix snap build failing to initialize submodules. 2020-06-08 21:29:35 -03:00
Povilas Kanapickas
515805fc1a Merge pull request #703 from zexee/master
Added toggleScreen function, using hot key to loop through all screens.
2020-06-08 18:49:49 +03:00
Povilas Kanapickas
00f2b1f615 Merge pull request #721 from shymega/enhance/make-gtest-submodule
Proposal: Replace bundled gtest directory with Git submodule
2020-06-08 18:43:04 +03:00
Dom Rodriguez
b16ad17340 Fix CI infrastructure (.bat/.sh) to initialise Git submodules before build 2020-06-08 14:31:27 +03:00
Dom Rodriguez
938ad34e2d Add gtest/gmock framework, locked at 1.6.0 2020-06-08 14:31:39 +03:00
Dom Rodriguez
e9b82b462c Remove ext/gtest, ext/gmock to replace with Git submodule 2020-06-08 14:31:27 +03:00
Povilas Kanapickas
c336cfde8f Merge pull request #739 from simons-public/gui-status-log-comments
GUI status log comments
2020-06-06 21:00:01 +03:00
Chris Simons
7331519b51 add comments explaining the use of CLOG_PRINT 2020-06-06 09:51:33 -07:00
Povilas Kanapickas
69cfd14ee9 Merge pull request #738 from debauchee/revert-725-patch-2
Revert "Make connection message a NOTE for consistency"
2020-06-06 11:02:37 +03:00
Povilas Kanapickas
2b2818c1a7 Revert "Make connection message a NOTE for consistency" 2020-06-05 21:12:44 +03:00
Povilas Kanapickas
0f29c7716d Merge pull request #656 from galkinvv/fix-win10-cpu-usage-spikes
Fixes high cpu usage spikes on win10
2020-06-05 00:30:22 +03:00
Povilas Kanapickas
8df50c734f Merge pull request #732 from GeorgH93/master
Fix build on Windows
2020-06-05 00:25:33 +03:00
GeorgH93
0ec5283506 Keep errorlevel 2020-06-03 16:03:14 +02:00
GeorgH93
64a9320d61 Fix build on Windows 2020-06-03 15:48:44 +02:00
zhexiwang
b477efa706 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.
2020-06-02 21:49:06 +08:00
Dom Rodriguez
0a1f080231 Merge pull request #725 from jmartens/patch-2
Make connection message a NOTE for consistency
2020-06-01 14:51:06 +01:00
Jonathan Martens
583b2cb5ae Make connection message a NOTE for consistency
When disconnected a NOTE log entry is made in the log, when connected it just prints which seems inconsistent to me:

```
[2020-06-01T11:50:55] INFO: AES256-GCM-SHA384       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(256) Mac=AEAD

	/home/jonathan/barrier/src/lib/net/SecureSocket.cpp,872
connected to server
[2020-06-01T11:52:43] INFO: entering screen
```
vs.
```
[2020-06-01T11:59:01] NOTE: disconnected from server
	/home/jonathan/barrier/src/lib/barrier/ClientApp.cpp,315
```
Since everything else logs with a timestamp I suggest changing this to NOTE as well for connection events being logged.
2020-06-01 12:02:33 +02:00
Dom Rodriguez
b373d8eda9 Merge pull request #679 from p12tic/x11-fix-event-wait-race-condition
XWindowsEventQueueBuffer: Fix delays when waiting for new events
2020-05-31 00:07:14 +01:00
Dom Rodriguez
8891364258 Merge pull request #718 from p12tic/use-noexcept
Use noexcept instead of dynamic exception specifications
2020-05-30 21:39:12 +01:00
Povilas Kanapickas
89c6623c0e lib/common: Remove no longer used stdexcept.h 2020-05-30 23:35:27 +03:00
Povilas Kanapickas
5eac13a969 Use noexcept instead of exception specifications 2020-05-30 23:35:27 +03:00
Dom Rodriguez
5d0f6e6f73 Merge pull request #719 from p12tic/tests
Fix building of tests
2020-05-30 21:14:08 +01:00
Dom Rodriguez
dacbfc1ee2 Merge pull request #717 from p12tic/use-std-string
lib/platform: Use std::string directly instead of String typedef
2020-05-30 21:06:54 +01:00
Povilas Kanapickas
64265e926f tests: Disable test that depends on external state 2020-05-30 22:41:27 +03:00
Povilas Kanapickas
460f5df838 test: Fix undefined behavior of deleting incomplete type 2020-05-30 22:41:26 +03:00
Povilas Kanapickas
13a0359c58 tests: Fix crash in XWindowsKeyStateTests 2020-05-30 22:41:25 +03:00
Povilas Kanapickas
f23e8a6ad9 test: Update to new APIs 2020-05-30 22:41:24 +03:00
Povilas Kanapickas
7868043ac4 test: Fix referenced library name 2020-05-30 22:41:23 +03:00
Povilas Kanapickas
a6e5e47366 test: Remove unresolved merge conflict markers 2020-05-30 22:41:22 +03:00
Povilas Kanapickas
56f1232352 test: Reduce the number of implicit include directories 2020-05-30 22:41:21 +03:00
Povilas Kanapickas
b99ca80eaa test: Enable building of tests 2020-05-30 22:41:20 +03:00
Povilas Kanapickas
5eafd30de4 lib/platform: Use std::string directly instead of String typedef 2020-05-30 21:46:49 +03:00
Povilas Kanapickas
a626f245a9 lib/net: Add missing include 2020-05-30 21:46:16 +03:00
Dom Rodriguez
e354d79d81 Merge pull request #706 from jmartens/patch-1
Fix Auto config missing hostname prompt #704
2020-05-30 18:28:13 +01:00
Dom Rodriguez
5522d077aa Merge pull request #708 from p12tic/enum-class
gui: Use enum class to scope enum values
2020-05-30 18:04:01 +01:00
Dom Rodriguez
4a2f1a9b61 Merge pull request #709 from p12tic/use-std-string-1
lib/base: Use std::string directly instead of String typedef
2020-05-30 18:00:54 +01:00
Dom Rodriguez
b02a20bd36 Merge pull request #712 from p12tic/use-std-string-4
lib/ipc: Use std::string directly instead of String typedef
2020-05-30 18:00:35 +01:00
Dom Rodriguez
df15e76e12 Merge pull request #710 from p12tic/use-std-string-2
lib/client: Use std::string directly instead of String typedef
2020-05-30 17:59:58 +01:00
Dom Rodriguez
4039bc2f3d Merge pull request #711 from p12tic/use-std-string-3
lib/arch: Use std::string directly instead of String typedef
2020-05-30 17:59:50 +01:00
Dom Rodriguez
9368845d8e Merge pull request #713 from p12tic/use-std-string-5
lib/net: Use std::string directly instead of String typedef
2020-05-30 17:59:36 +01:00
Dom Rodriguez
b0f0a6fa96 Merge pull request #714 from p12tic/use-std-string-6
lib/server: Use std::string directly instead of String typedef
2020-05-30 17:58:31 +01:00
Povilas Kanapickas
787f907587 lib/ipc: Use std::string directly instead of String typedef 2020-05-30 16:00:42 +03:00
Povilas Kanapickas
61771d9039 lib/base: Use std::string directly instead of String typedef 2020-05-30 14:50:36 +03:00
Povilas Kanapickas
b4c1e4c239 lib/server: Use std::string directly instead of String typedef 2020-05-30 14:48:11 +03:00
Povilas Kanapickas
b93bcccf57 lib/net: Use std::string directly instead of String typedef 2020-05-30 14:47:11 +03:00
Povilas Kanapickas
6868491483 lib/arch: Use std::string directly instead of String typedef 2020-05-30 14:45:21 +03:00
Povilas Kanapickas
a0af288b2b lib/client: Use std::string directly instead of String typedef 2020-05-30 14:42:59 +03:00
Povilas Kanapickas
94a280a82b gui: Use enum class to scope enum values 2020-05-30 13:46:40 +03:00
Vasily Galkin
95f2a840be Windows 8+: make waiting for messages correspond to emptiness check
Fixes high cpu usage spikes on win10.
When queue was containing messages of only non-QS_POSTMESSAGE type the
"while (m_buffer->isEmpty())" busy-looped in EventQueue::getEvent
since isEmpty was true (checked only QS_POSTMESSAGE message type),
but waitForEvent returned immediately (checked more message types).

Investigation shows that the difference was introduced in
https://github.com/debauchee/barrier/commit/dbfb04a6e
to fix a problem with bad behaviour of GetQueueStatus
Researching showed that a similar problem was fixed in Qt,
and the solution was
"pass different flags to GetQueueStatus depending on version of windows"
https://bugreports.qt.io/browse/QTBUG-29097

So this patch makes changes to a barrier non-GUI core similar to Qt fix.
2020-05-29 14:09:48 +03:00
Jonathan Martens
21eadc9661 Fix Auto config missing hostname prompt #704
I think this might fix the prompt for a missing hostname when auto config is checked
2020-05-29 10:11:55 +02:00
Povilas Kanapickas
722b7d6cc4 XWindowsEventQueueBuffer: Fix delays when waiting for new events
QLength() may return 0 even if there are events pending because they
need to be read from the display socket in order to become visible. We
must use XPending() which will poll the socket if QLength() == 0.
2020-05-20 22:11:14 +03:00
Vasily Galkin
8ab6ad64f9 Remove unused IEventQueue::isEmpty() method to simplify code understanding
Current code base don't use IEventQueue::isEmpty() method.
Remove it to simplify IEventQueue API and to remove confusion with
IEventQueueBuffer with same name.

The IEventQueueBuffer::isEmpty() and all its implementations kept unchanged
2020-05-13 01:35:40 +03:00
Dom Rodriguez
dbd10820c3 Merge pull request #585 from chewi/pthread
Use -pthread flag and simplify pthread build logic
2020-05-12 23:13:16 +01:00
Dom Rodriguez
fe0f3303d7 Merge pull request #655 from simons-public/elevate-bind-failure-to-error
Elevate XSocketAddressInUse to ERROR
2020-05-12 23:06:15 +01:00
Dom Rodriguez
81d4758c28 Merge pull request #579 from eson57/patch-1
Update gui_sv.ts
2020-05-12 22:09:21 +01:00
Dom Rodriguez
db63edde69 Merge pull request #615 from scarabeusiv/patch-1
Fix desktop file Categories to match standard
2020-05-12 21:54:01 +01:00
Dom Rodriguez
dc2869f48b Merge pull request #664 from simons-public/fix-gui-status
Change log level on several status messages (Fixes #652, Fixes #516)
2020-05-12 21:40:38 +01:00
Chris Simons
639415ea44 Merge pull request #2 from plessbd/patch-3
A few more log cleanups
2020-05-12 13:07:45 -07:00
Ben Plessinger
5636e9cb40 A few more log cleanups
Fix a few more log messages to be consistent
2020-05-12 15:49:19 -04:00
Dom Rodriguez
5d82510ee8 Merge pull request #653 from simons-public/tis-tsm-fix
Fix TIS/TSM in logs
2020-05-12 18:54:57 +01:00
Chris Simons
a9421a9cd3 Change log level on several status messages (Fixes #652, Fixes #516)
This changes the log level for several statuses (started server,
connected to server, server status:) from CLOG_NOTE or CLOG_INFO to
CLOG_PRINT so they will be printed to stdout regardless of the log
level. This allows the GUI to accurately report the status of the
`barriers` or `barrierc` processes in src/gui/src/MainWindow.cpp#L379-L399.
2020-05-11 20:36:51 -07:00
Chris Simons
7a2b38ad56 replace tabs with spaces 2020-05-07 16:56:42 -07:00
Dom Rodriguez
2d2e92989c Merge pull request #658 from simons-public/select-fingerprint
Allow selecting Fingerprint Qlabel
2020-05-07 15:20:39 +01:00
Chris Simons
6653de6450 Allow selecting Fingerprint Qlabel
Setting the Fingerprint label to TextSelectableByMouse allows users to
copy/paste the fingerprint so it can be easily added to "TrustedServers.txt"
on a client machine (i.e. via SSH).
2020-05-06 20:40:17 -07:00
Chris Simons
b3349ddfec Elevate XSocketAddressInUse to ERROR
Errors where the socket address is in use will keep the server from connecting
with clients. This should be reported as an ERROR instead of a warning. Also,
if the retry time is shorter issues will be more obvious, since the error will
cause the log to scroll visibly.
2020-05-06 15:36:34 -07:00
Chris Simons
30c77497df Fix TIS/TSM in logs
Silences the "is calling TIS/TSM in non-main thread environment"
messages in the log when running a MacOS server as it is a red herring
that causes a lot of issues to be filed.
2020-05-06 15:32:46 -07:00
Dom Rodriguez
675a17d6e8 Merge pull request #648 from simons-public/use-macdeployqt
Use macdeployqt
2020-05-06 18:48:53 +01:00
Chris Simons
b5c7eb45ef Change MacOS Build Steps
The Azure Pipelines MacOS vmImage has an old version of OpenSSL (1.0.2t)
installed at /usr/local/opt/openssl. Normally with Homebrew this directory
would be linked to the currenly installed version of OpenSSL (1.1.x) in
/usr/local/Cellar, but since it has been installed manually here it interferes
with linking libssl.a and libcrypto.a static libraries which causes the build
to fail.
2020-05-05 20:04:25 -07:00
Chris Simons
0deaaad2c9 added barrierc and barriers to macdeployqt targets
macdeployqt needs "-executable=filename" to propery
change linking on other variables

also renamed the cmake target from "Barrier_dmg" to
"Barrier_MacOS" to properly reflect earlier changes
2020-05-04 09:37:18 -07:00
Chris Simons
e0051d17d8 Homebrew (Ruby) throws an error when it gets SIGPIPE from the --max-count on grep. 2020-05-02 13:58:22 -07:00
Chris Simons
fb3eaa3e3c Add warnings for users manually running build_installer.sh and reref_dylibs.sh manually 2020-05-02 13:27:58 -07:00
Chris Simons
8cd59ebee7 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"
2020-05-02 12:33:09 -07:00
Chris Simons
e37277fe8f Add script that uses macdeployqt instead of reref_dylibs.sh shell script to create the .app bundle 2020-05-02 12:30:18 -07:00
Tomáš Chvátal
f0d2459247 Fix desktop file Categories to match standard
It requires more sections than Utility;
2020-04-07 10:30:41 +02:00
Dom Rodriguez
b6a1b57420 Merge pull request #592 from chewi/qt-gui-only
Only require Qt5 when building the GUI
2020-03-26 11:48:15 +00:00
Dom Rodriguez
79c191ab2b Merge pull request #580 from the-wes/patch-1
Add more detailed description of what Barrier does, fixes #551
2020-03-26 11:21:15 +00:00
Dom Rodriguez
11edf04107 Merge pull request #574 from shymega/enhancement/readme-0
README: Add OpenBSD to list of supported OSes
2020-03-18 21:40:49 +00:00
James Le Cuirot
af0ce63733 Only require Qt5 when building the GUI
Commit 6c888437 made Qt5 mandatory for all builds when it is only
required for the GUI. There's already a find_package call in src/gui,
it just needed the REQUIRED flag to be added.
2020-03-17 22:45:20 +00:00
James Le Cuirot
a0b3124f80 Use -pthread flag and simplify pthread build logic
Sometimes -lpthread is not enough. This has caused build failures on
Gentoo Linux in the past.

The logic also seems needlessly complex. We check for HAVE_PTHREAD on
UNIX platforms even though CMake errors out if pthreads are not
found. Similarly, we have a fallback for HAVE_PTHREAD_SIGNAL being
false even though we always set it to true.
2020-03-10 21:10:48 +00:00
the-wes
b2324f0d24 Add more detailed description of what Barrier does 2020-03-03 02:17:38 -08:00
Åke Engelbrektson
6fb4512617 Update gui_sv.ts
Hi, 
Please, add updated Swedish translation.
2020-03-03 10:57:39 +01:00
Dom Rodriguez
3afa54d0da README: Add OpenBSD to list of supported OSes 2020-02-26 00:42:41 +00:00
Adrian Lucrèce Céleste
e8d7cd3f10 Merge pull request #539 from MicaelJarniac/patch-2
Build status badges added to a table
2020-02-25 17:22:57 -05:00
Adrian Lucrèce Céleste
e5999f01a8 Merge pull request #553 from maxiberta/disable-wayland
Disable wayland support in the snap
2020-02-13 09:20:32 -05:00
Adrian Lucrèce Céleste
72d1c8cd65 Merge pull request #557 from galkinvv/fix-loop-tcp-disconnection
Fix infinite loop on fast TCP disconnection
2020-02-13 09:20:22 -05:00
Vasily Galkin
c79120c049 Fix infinite loop on fast TCP disconnection
The commit a841b28 changed the condition for removing job from processing.
New flag MultiplexerJobStatus::continue_servicing become used
instead of checking pointer for NULL.
However for cases when TCPSocket::newJob() returns nullptr
the behaviour changed: earlier the job was removed, but after change
it is called again, since MultiplexerJobStatus equal to {true, nullptr}
means "run this job again".

This leads to problem with eating CPU and RAM on linux
https://github.com/debauchee/barrier/issues/470

There is similar windows problem, but not sure it is related.
https://github.com/debauchee/barrier/issues/552

Since it looks that the goal of a841b28 was only clarifying
object ownership and not changing job deletion behaviour,
this commit tries to get original behaviour and fix the bugs above
by returning {false, nullptr} instead of {true, nullptr}
when TCPSocket::newJob() returns nullptr.
2020-02-09 23:27:26 +03:00
Maximiliano Bertacchini
65fb58ebe5 Add comment on snap env var 2020-02-05 12:30:04 -03:00
Maximiliano Bertacchini
f2f9f1ec64 Explicitly disable wayland support in the snap. 2020-02-05 12:16:53 -03:00
Maximiliano Bertacchini
d9745a737a Add build-essential to the snap's build deps. 2020-02-05 12:16:20 -03:00
Micael Jarniac
8335ffd5e5 Build status badges added to a table 2020-01-10 12:14:51 -03:00
Adrian Lucrèce Céleste
170a271737 Merge pull request #533 from candeira/503_readme_issues_prs
Fix #503 - Clarify on README how to report issues
2019-12-30 08:46:56 -05:00
Javier Candeira
6e2ed1e597 Fix #503 - Clarify on README how to report issues 2019-12-29 19:13:23 +11:00
Adrian Lucrèce Céleste
adb175df9e Merge pull request #521 from maxiberta/master
Update readme with mention of the snap package
2019-12-08 12:22:13 -05:00
Maximiliano Bertacchini
55e3d52eec Update readme with mention of the snap package. 2019-12-07 18:28:49 -03:00
Adrian Lucrèce Céleste
13ac24821a Merge pull request #511 from keeganquinn/elcapitan-build-fix
Cast values to fix build errors on OS X 10.11.
2019-11-24 19:02:44 -05:00
Keegan Quinn
3d832fd728 Cast values to fix build errors on OS X 10.11. 2019-11-24 12:40:13 -08:00
Adrian Lucrèce Céleste
36ed253e12 Merge pull request #507 from galkinvv/man-conf-name-dot
Man page: fix incorrect name of user conf file in barriers.1
2019-11-21 16:37:46 -05:00
Vasily Galkin
e2d460b779 Man page: fix incorrect name of user conf file in barriers.1
The leading dot was lost in documentation in previous change
while moving file to another directory.
The usage of leading dot in non-home folder is not a common practice,
but this is the current behavior,
and this commit just update man page to match the code.

Also the man pages has a not that they are auto-generated by help2man.
I used help2man to update them,
but it's output has some problems (wrong formatting of copyrights).

So in addition to the only important change (naming fix)
there is some more changes:

* Formatting manually added to the list of config files.
* New option --screen-change-script auto-added by help2man
* Man files themselves and doc/UpdateManpages.txt now mention
that some manual work is needed after help2man
2019-11-21 21:17:18 +03:00
Adrian Lucrèce Céleste
d8e0394a54 Merge pull request #504 from tiwoc/macos-tray-image
Let tray image blend into macOS menu bar
2019-11-21 08:36:46 -05:00
Daniel Seither
8ef0668b09 Let tray image blend into macOS menu bar
The expected style for macOS menu bar images is a template image than
can adapt to the user's appearance settings. Also, high-res screens
("Retina" in Apple speak) need higher resolution images.

Based on /res/barrier.svg, I created black and transparent SVGs for the
three icon states. I had to remove some details to make the image scale
down to icon size without becoming too crowded, and I drew a new
checkmark and the transfer arrow.
2019-11-21 10:45:08 +01:00
Adrian Lucrèce Céleste
1246ec36fd Merge pull request #498 from tiwoc/fix-macos-warnings
Fix macOS build warnings
2019-11-19 09:18:54 -05:00
Daniel Seither
dc2d8e9661 Add override specifiers 2019-11-19 12:04:55 +01:00
Daniel Seither
937326bf4f OSXDragView: Get rid of uninitialized variable warning 2019-11-19 12:04:29 +01:00
Daniel Seither
96e8adbaae IpcLogOutputter: Put member initializers in execution order
Member initializers are always run in the order defined in the header.
This commit reorders them in the implementation so that their order
reflects their execution order.
2019-11-19 12:03:53 +01:00
Daniel Seither
da3876325d Remove unused variables 2019-11-19 12:01:37 +01:00
Adrian Lucrèce Céleste
9080ce451b Merge pull request #486 from ctsrc/script-dir
Replace hard-coded names of build directory in build_installer.sh scr…
2019-11-09 21:33:50 -05:00
Adrian Lucrèce Céleste
22e353869a Add settings in the Info.plist file that enable high-DPI support… (#488)
Add settings in the Info.plist file that enable high-DPI support on macOS
2019-11-09 21:33:27 -05:00
Adrian Lucrèce Céleste
3e4de1d9c1 Remove shell script that changes directory and then executes bar… (#487)
Remove shell script that changes directory and then executes barrier on macOS, and execute barrier directly instead
2019-11-09 21:32:59 -05:00
Erik Nordstrøm
3737ed634d Add settings in the Info.plist file that enable high-DPI support on macOS.
These changes follow the instructions in the official Qt docs.

https://doc.qt.io/qt-5/highdpi.html
2019-11-08 03:15:13 +01:00
Erik Nordstrøm
983b84be35 Remove shell script that changes directory and then executes barrier on macOS, and execute barrier directly instead. 2019-11-08 02:00:15 +01:00
Erik Nordstrøm
9c6de19f17 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. 2019-11-08 01:01:10 +01:00
Adrian Lucrèce Céleste
07a1c31fab Merge pull request #473 from RealKelsar/master
make non-gui variants build without avahi
2019-10-18 19:38:25 -04:00
Tetja Rediske
93a4035409 make non-gui variants build without avahi 2019-10-19 00:28:13 +02:00
Adrian Lucrèce Céleste
6daa516e99 Merge pull request #468 from qbit/openbsd
tell build system about openbsd
2019-10-16 19:50:55 -04:00
Aaron Bieber
459c136036 tell build system about openbsd 2019-10-16 17:35:30 -06:00
Adrian Lucrèce Céleste
14a708db33 Merge pull request #455 from xkill/master
Update debian changelog for 2.3.2 release
2019-10-09 09:43:52 -04:00
Pablo Catalina
29723a5745 Update changelog for 2.3.2 release 2019-10-09 12:52:10 +02:00
Pablo Catalina
8d9f8fa617 Update changelog for 2.3.2 release 2019-10-09 12:29:39 +02:00
Adrian Lucrèce Céleste
210c2b70bd [Version] bump to 2.3.2, stable 2019-10-02 21:26:26 -04:00
Adrian Lucrèce Céleste
8320686e0d Merge pull request #439 from mirh/master
Fix debug build launch
2019-09-20 10:37:32 -04:00
mirh
90f7a68695 Fix debug build launch 2019-09-19 22:41:51 +02:00
Adrian Lucrèce Céleste
0ed18c6b89 Merged mouse drift fix from synergy-core (#424)
Merged mouse drift fix from synergy-core
2019-09-03 15:02:43 -07:00
Casey Barton
69a65e4725 Merged mouse drift fix from synergy-core 2019-09-03 13:24:46 -04:00
Adrian Lucrèce Céleste
4dddbb5816 [README] update README with info about packages (#422)
[README] update README with info about packages
2019-09-01 11:14:49 -07:00
Adrian Lucrèce Céleste
894191d1cb [README] update README with info about packages 2019-09-01 14:09:39 -04:00
Adrian Lucrèce Céleste
f791a482b9 Add snap build status 2019-08-28 13:18:48 -04:00
Adrian Lucrèce Céleste
0ed9451430 [Azure Pipelines] use QT 5.13.0 (#418)
* [Azure Pipelines] use QT 5.13.0

* [Azure Pipelines] update build_env_tmp.bat to QT 5.13
2019-08-23 15:59:14 -04:00
Adrian Lucrèce Céleste
28466eea10 [CMake] properly declare FPIC (#417)
[CMake] properly declare FPIC
2019-08-23 15:48:20 -04:00
Adrian Lucrèce Céleste
1bdc95a498 [CMake] properly declare FPIC
use CMAKE_POSITION_INDEPENDENT_CODE instead of manually addinf -fPIC to CXX args.

	modified:   CMakeLists.txt
2019-08-23 15:40:36 -04:00
Adrian Lucrèce Céleste
f1c570752b Merge pull request #413 from debauchee/revert-405-fix/build-scripts
Revert "Tidy up and fix lint errors in build scripts"
2019-08-22 17:11:02 -04:00
Adrian Lucrèce Céleste
70a4ece9e8 Revert "Tidy up and fix lint errors in build scripts" 2019-08-22 17:03:18 -04:00
Adrian Lucrèce Céleste
58f6c735ff Merge pull request #412 from maxiberta/rename-snap
Rename the snap as `barrier`.
2019-08-22 15:03:58 -04:00
Adrian Lucrèce Céleste
fca05b9163 Use standard mutex APIs instead of the home-grown wrapper (#410)
Use standard mutex APIs instead of the home-grown wrapper
2019-08-22 15:01:35 -04:00
Adrian Lucrèce Céleste
7bb541ea91 Merge pull request #411 from p12tic/rewrite-memory-management
Use explicit memory ownership in SocketMultiplexer
2019-08-22 15:01:21 -04:00
Adrian Lucrèce Céleste
ccfa10f2a0 Merge pull request #391 from EbonJaeger
Re-implement patch for horizontal scrolling and extra mouse buttons
2019-08-22 14:57:46 -04:00
Maximiliano Bertacchini
5812030f43 Rename the snap as barrier. 2019-08-22 15:55:12 -03:00
Adrian Lucrèce Céleste
e31ebc1b22 Merge pull request #408 from p12tic/fix-ssl-mem-leak
Fix memory leak during SSL socket shutdown
2019-08-22 12:54:27 -04:00
Adrian Lucrèce Céleste
69ea670c1f Fix retry timer not being unregistered properly (#409)
Fix retry timer not being unregistered properly
2019-08-22 12:54:19 -04:00
Povilas Kanapickas
3600f4b255 Fix retry timer not being unregistered properly
This is cherry-pick of 70ba53caf4 from symless/synergy-core
2019-08-22 18:11:03 +03:00
Adrian Lucrèce Céleste
4ec30b6ade Tidy up and fix lint errors in build scripts (#405)
Tidy up and fix lint errors in build scripts
2019-08-20 13:36:54 -04:00
Dom Rodriguez
452820eef7 Interim fix for failed macOS builds
Not ideal, but it might just work. Take two!

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2019-08-20 18:29:17 +01:00
Dom Rodriguez
c685f0f231 Tidy up and fix lint errors in build scripts
I've tidied up the code in both of the build scripts used for *nix-like
systems, and the macOS/OSX specific build script helper.

This has been tested on Linux with no issues, but this PR will hopefully
indicate if the changes run without issues on macOS as well.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2019-08-20 18:08:03 +01:00
Adrian Lucrèce Céleste
cf3b86341a Merge pull request #404 from shymega/fix/cmake-qt
Fix: CMake now checks for required Qt5 libraries
2019-08-18 17:35:57 -04:00
Dom Rodriguez
6c88843771 Fix: CMake now checks for required Qt5 libraries
This won't fix #402 completely, but it *will* help mitigate similar
issues with Qt5 libraries during compilation in the future.
2019-08-18 22:29:19 +01:00
Adrian Lucrèce Céleste
dea143bfd7 Merge pull request #403 from shymega/fix/snap-flags
Snap: Change CMake builds to be of Release type
2019-08-18 17:26:55 -04:00
Dom Rodriguez
dcc45dd80e Snap: Change CMake builds to be of Release type 2019-08-18 22:24:32 +01:00
Adrian Lucrèce Céleste
7bcb74adc1 [Build[ update pre-build script to call VS2019 (#401)
[Build[ update pre-build script to call VS2019
2019-08-17 17:03:24 -04:00
Adrian Lucrèce Céleste
e9f6092172 [Build[ update pre-build script to call VS2019 2019-08-17 16:52:24 -04:00
Povilas Kanapickas
b0e415de03 Fix race condition in IArchString
Even though the calls to C functions are protected with a mutex, the
initialization and destruction of the mutex itself had race conditions.
2019-08-17 16:40:25 +03:00
Povilas Kanapickas
83d0639230 Use std::mutex instead of ArchMutex in IpcLogOutputter 2019-08-17 16:40:24 +03:00
Povilas Kanapickas
93c04bb2fa Use std::mutex instead of ArchMutex in IpcClientProxy 2019-08-17 16:40:23 +03:00
Povilas Kanapickas
36f3235f51 Use std::mutex instead of ArchMutex in IpcServer 2019-08-17 16:40:22 +03:00
Povilas Kanapickas
d9d39040ae Use std::mutex instead of ArchMutex in Log 2019-08-17 16:40:21 +03:00
Povilas Kanapickas
9df4741748 Use std::mutex instead of ArchMutex in EventQueue 2019-08-17 16:40:20 +03:00
Povilas Kanapickas
f71c68506e Use std::mutex instead of ArchMutex in ArchMultithreadPosix 2019-08-17 16:40:19 +03:00
Povilas Kanapickas
a841b2858f Make ownership of SocketMultiplexerJob explicit 2019-08-17 16:17:50 +03:00
Povilas Kanapickas
8dd6bc2c55 Make ownership of SocketMultiplexer explicit 2019-08-17 16:17:49 +03:00
Adrian Lucrèce Céleste
58d8f020dc [Version] bump to 2.3.1 for new release 2019-08-09 16:17:30 -04:00
Adrian Lucrèce Céleste
910f1f3ac1 Delete .travis.yml As We Switch To Azure Pipelines (#376)
Delete .travis.yml As We Switch To Azure Pipelines
2019-08-09 09:34:51 -04:00
walker0643
f7b7c55b53 Drop Travis CI 2019-08-09 09:31:31 -04:00
Evan Maddock
0cd2e6bb6c Use Windows helper function to check for Windows version
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
2019-08-06 17:02:37 -04:00
Evan Maddock
00c18b4c92 Used the wrong key button by accident
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
2019-08-06 15:23:22 -04:00
Evan Maddock
9f15b1bcf2 Reimplement patch for horizontal scrolling and extra mouse buttons
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
2019-08-05 21:59:43 -04:00
Adrian Lucrèce Céleste
c6ff6a6de6 Merge pull request #374 from TafThorne/patch-1
Reference Only Microsoft Azue Pipelines In Readme.md
2019-08-05 12:07:06 -04:00
Adrian Lucrèce Céleste
0ddd38ece1 Merge pull request #373 from shymega/feature/compile_commands_cmake
Feature: CMake now generates compile_commands.json
2019-08-04 18:02:21 -04:00
Thomas Thorne
3e3e183e75 Delete .travis.yml As We Switch To Azure Pipelines
Azure Pipelines have been made to work well enough for this project.  All other CI systems are to be disabled as mentioned dunder #308 

Delete the .travis.yml file now that it is not longer needed.  It can be recovered from git history if we ever wish to resurrect it.  

A separate action will need to be taken by someone with administrator access to the present https://travis-ci.org/debauchee/barrier project to unlink from the system there.
2019-07-26 10:52:01 +01:00
Thomas Thorne
6dc59d14a3 Reference Only Microsoft Azue Pipelines In Readme.md
We plan to remove all the CI pipeline apart from Microsoft Azue Pipelines.  This was documented under #308 after the Azure Pipeline system was successfully integrated under #303 and shown to provide all the build targetes we needed.

As there are presently have 4 seperate main build targes.  As well as giving the overall master branch status in the Readme (which forms part of the main page on github.com) also show the seperate build status.  This makes it clear if a single part fails and gives an obvious indicator that this project works for Linux, Mac and Windows.
2019-07-26 10:24:37 +01:00
Dom Rodriguez
f399c8c642 Feature: CMake now generates compile_commands.json
This commit adds suppotr for generating a 'compile commands' JSON
file. This provides fairly sufficient autocomplete support for most text
editors, such as (Neo)vim and VS Code. It specifies include paths, and
the compiler arguments used to compile each source file.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2019-07-25 13:46:00 +01:00
Adrian Lucrèce Céleste
ea0717b5f5 Merge pull request #368 from maxiberta/snap-fix-version-script
Fix snap version-control script for local LXD builds
2019-07-23 19:00:26 -04:00
Maximiliano Bertacchini
4e83ea7f9a Fix snap version-control script for local lxd builds. 2019-07-23 18:44:12 -03:00
Maximiliano Bertacchini
f23a2ecec3 Use appstream metadata from flathub. 2019-07-10 15:38:01 -04:00
Maximiliano Bertacchini
30bc1948c6 Set snap icon and license. 2019-07-10 15:38:01 -04:00
Maximiliano Bertacchini
bad0373bbb Add desktop entry with an app icon. 2019-07-10 15:38:01 -04:00
Maximiliano Bertacchini
7a2c3f7741 Update build-packages and stage-packages. 2019-07-10 15:38:01 -04:00
Maximiliano Bertacchini
e2f59c7475 Drop custom qt5, use distro provided one. 2019-07-10 15:38:01 -04:00
Maximiliano Bertacchini
49210e1ea4 Add commands: barrier, barrierc, barriers. 2019-07-10 15:38:01 -04:00
Maximiliano Bertacchini
1c5a95f810 Fix interface plugs. 2019-07-10 15:38:01 -04:00
Maximiliano Bertacchini
1c398dcd66 Use version from git tag. 2019-07-10 15:38:01 -04:00
Patrizio Tufarolo
40ee389296 Fixed quote key on US International keyboard
Fixes single quote key on US international keyboard, backported from symless/synergy-core#6448
2019-07-10 09:28:22 -04:00
Nelson Chen
af444a6932 Ensure Inno Setup 5 is installed in Azure Pipelines 2019-07-09 08:25:20 -04:00
Adrian Lucrèce Céleste
8e8b38b493 [Cmake] bump version to 2.3.0 2019-06-27 21:33:34 -04:00
Adrian Lucrèce Céleste
8e1a5921f6 [Release] Bump up to a new release version 2019-06-27 21:18:24 -04:00
Adrian Lucrèce Céleste
1e118ee8e8 [README] Add FaQ to the bottom 2019-06-26 18:07:19 -04:00
Chun Wang
0f5cdecf51 Fix #232 MACOS serious config file errors - hotkeys totally broken 2019-06-14 12:22:56 -07:00
Adrian Lucrèce Céleste
6c19a87f63 Add Q/A about 32-bit windows
Clarify that 32-bit editions of windows are not supported.
2019-06-14 09:34:18 -04:00
Adrian Lucrèce Céleste
b3374a07ed Add a quick Q/A about what OSes are supported 2019-06-14 09:32:08 -04:00
Adrian Lucrèce Céleste
b09a3985d0 fix #163 2019-05-30 09:30:38 -04:00
Nelson Chen
40f94c6477 Upgrade QLI Installer and use Cal's Qt Mirror
This should provide more reliable Windows builds in CI.
2019-05-26 13:22:10 -04:00
Nelson Chen
0be33c3032 Publish Mac Artifacts 2019-05-26 13:20:00 -04:00
Nelson Chen
500a82824f Build Release version of Barrier on Mac 2019-05-26 13:20:00 -04:00
Nelson Chen
cd8176e69f Install Pinned Qt and OpenSSL on Mac 2019-05-26 13:20:00 -04:00
Nelson Chen
ae8ef7f4f2 Prefix Windows artifact names with 'Windows' on Azure Pipelines (#319) 2019-05-26 13:18:55 -04:00
Nelson Chen
6074f9b648 Update Apt on Linux before installing dependencies on Azure Pipelines (#321) 2019-05-26 13:16:41 -04:00
pack
a3804c4915 typo fix (#311) 2019-05-17 22:54:42 -04:00
Adrian Lucrèce Céleste
e4392b51b4 📝 add release link and contact info (#310)
📝 add release link and contact info
2019-05-17 19:30:02 -04:00
Adrian Lucrèce Céleste
d362f7ad52 📝 add release link and contact info 2019-05-17 19:09:50 -04:00
Adrian Lucrèce Céleste
9b5e2c2da3 Azure pipelines (#303)
Azure pipelines
2019-05-16 10:36:42 -04:00
Nelson Chen
e518694026 Initial Azure Pipelines 2019-05-15 20:18:19 -07:00
Adrian Lucrèce Céleste
a82b845e07 Rename the "Apply" button to "Reload" (#292)
Rename the "Apply" button to "Reload"
2019-05-14 16:07:44 -04:00
Adrian Lucrèce Céleste
ab40f52f4b Add dpiAwareness PerMonitor (#306)
Add dpiAwareness PerMonitor
2019-05-14 09:57:11 -04:00
Matthijs Wensveen
84fcbea34b Add dpiAwareness: PerMonitor to manifest to better handle multiple monitors with different DPI settings. 2019-05-14 11:36:21 +02:00
Adrian Lucrèce Céleste
2f86911c87 Merge pull request #287 from noisyshape/windows-installer-fix
Windows installer fix
2019-04-21 12:24:55 -04:00
noisyshape
18ac0fe4b5 Replace Wix with Inno Setup
The Wix configuration is left over from Synergy.
2019-04-18 21:04:00 -04:00
Mike Salvatore
c54424794f Rename the "Apply" button to "Reload"
The "Apply" button in the main window calls stopBarrier() immediately
followed by startBarrier(). The startBarrier() function reloads the
configuration. The fact that the "Apply" button applies configuration
changes is incidental; the "Start" button also applies new settings.

"Reload" more accurately describes the function that the button
performs.

Issue #284
2019-04-17 20:37:28 -04:00
Adrian Lucrèce Céleste
929a8e133d Merge pull request #289 from mssalvatore/issue_278
Fix #278 "Enable Clipboard Sharing" always reset after restart
2019-04-17 12:24:22 -04:00
Mike Salvatore
854a6b2a86 Fix #278 "Enable Clipboard Sharing" always reset after restart
Unlike other settings, the "Enable Clipboard Sharing" setting of the
ServerConfigDialog does not persist when the barrier application (GUI)
is stopped completely and restarted. Add the necessary code to the
saveSettings() and loadSettings() functions.
2019-04-13 06:40:45 -04:00
Adrian Lucrèce Céleste
d85a47ad80 Merge pull request #283 from noisyshape/vs2019-build
Update Windows build script for VS2019
2019-04-12 11:39:24 -04:00
noisyshape
35e6693d6d Fix XML 2019-04-12 10:49:49 -04:00
noisyshape
cdf37376f5 Remove hardcoded paths 2019-04-12 10:49:49 -04:00
noisyshape
6a70ef9efb Create version number for wix 2019-04-12 10:49:49 -04:00
noisyshape
4afa31ac54 Correct path and instructions 2019-04-12 10:09:40 -04:00
Adrian Lucrèce Céleste
acbe6d371f Merge pull request #271 from wendall911/rpm-spec
Working spec file for Fedora
2019-04-12 08:55:37 -04:00
Adrian Lucrèce Céleste
5d031588b2 Merge pull request #270 from payomagic/master
Barrier Snappy
2019-04-12 08:54:44 -04:00
noisyshape
0af43a2488 Normalize cmake generator strings 2019-04-11 11:42:59 -04:00
noisyshape
3e6095fc34 Add support for multiple VS versions 2019-04-10 18:36:42 -04:00
noisyshape
47aac5081f Update Windows build script for VS2019 2019-04-10 14:08:09 -04:00
Adrian Lucrèce Céleste
acca0d7f6f Merge pull request #252 from vorph1/screen-change-script
Fire screen switch event on client disconnect
2019-03-22 08:40:30 -04:00
Wendall Cada
75db3a64ca Working spec file for Fedora 2019-03-21 10:23:11 -07:00
PayouZon MagIT
15ddd868d4 Barrier Snappy
Snappy ready & tested on Ubuntu 18.04
2019-03-17 07:33:19 +01:00
PayouZon MagIT
5621846854 Update snapcraft.yaml 2019-03-16 11:37:06 +01:00
PayouZon MagIT
a90b1bdd34 Update snapcraft.yaml 2019-03-16 02:10:48 +01:00
Povilas Kanapickas
71f2ca7c35 Fix memory leak during socket shutdown 2019-03-13 10:14:29 +03:00
Szymon Szeląg
b8ca2d0381 Fire screen switch event on client disconnect 2019-02-10 17:41:17 +01:00
Adrian Lucrèce Céleste
fac5610b44 Merge pull request #249 from vorph1/screen-change-script
Screen change script argument
2019-02-10 11:26:28 -05:00
Szymon Szeląg
bf1fd35237 Start script via execl 2019-02-09 19:02:27 +01:00
Szymon Szeląg
783fbbd84d Use std::system 2019-02-05 23:08:39 +01:00
Szymon Szeląg
24b3ee547c Screen change script argument 2019-02-05 19:44:14 +01:00
Adrian Lucrèce Céleste
41f5ef2e09 Merge pull request #241 from jwestfall69/osx-debug
OSX: let build_installer.sh create a working Barrier.app on debug builds
2019-01-25 04:38:31 -05:00
jwestfall
726f5e2b53 OSX: let build_installer.sh create a working Barrier.app on debug builds
build_installer.sh on OSX is responsible for populating Barrier.app to
make it viable to run and creating a dmg for release.  However its only
works if you run it against a release build.  This patch makes so you can
run it on a debug build and it will populate Barrier.app but doesn't
create the dmg.
2019-01-24 19:45:40 -08:00
Adrian Lucrèce Céleste
a92e9d90f4 Merge pull request #237 from TafThorne/run-without-system-tray-support
Run Without System Tray Support
2019-01-24 12:44:49 -05:00
Thomas A. F. Thorne
79c08baf43 Do Not Warn About Missing System Tray
The system tray will be a nice to have.  Everything should continue to
operate in a satisfactory manner without it.  Log the warning but do
not interup the user with the message.
2019-01-22 15:52:44 +00:00
Thomas A. F. Thorne
0a56cdbca0 Reduce Sysmtem Tray Retry Attempts
It is not essential that the system tray exists in order that the
application contuinue to function.  Reduce the number of retry
attempts which will reduce the time the application appears stalled
at startup.

This is part of the work on making the app work without the need of
system tray support as described uner #155.
2019-01-22 10:48:22 +00:00
Adrian Lucrèce Céleste
4dedd88ab2 Merge pull request #221 from girtsf/update-osx-environment
add checks to osx_environment.sh
2019-01-05 15:00:58 -05:00
Girts Folkmanis
b6861a7d3c add checks to osx_environment.sh
Check if Xcode and required packages are installed, otherwise fail
early.
2019-01-05 11:19:28 -08:00
Adrian Lucrèce Céleste
c806a5137a Merge pull request #218 from jwestfall69/osx-macports
Fix OSX builds for macports
2019-01-02 20:37:43 -05:00
Jim Westfall
cb1d116cce Fix OSX builds for macports
macports command is 'port' not 'ports'
2019-01-02 16:41:43 -08:00
Adrian Lucrèce Céleste
c38c6bcaa2 Merge pull request #214 from ignac/macos_build_issues
Macos build issues
2018-12-30 14:51:09 -05:00
Adrian Lucrèce Céleste
4afe5ddf87 Merge pull request #210 from ignac/master
Fix #204 modifier keys not working in remote desktop on MacOS
2018-12-30 14:50:17 -05:00
Adrian Lucrèce Céleste
943b9a8a0a Merge pull request #211 from jwestfall69/socket-fix
Properly deal with a socket that is readable and writable at the same time
2018-12-30 14:49:26 -05:00
Miroslav Lences
730c065ee7 Fix macos build issues 2018-12-29 03:05:20 +01:00
jwestfall
94f8336af5 Properly deal with a socket that is readable and writable at the same time
Its possible poll() will return that a socket is both readable and
writable.  When this happens TCPSocket::serviceConnected() is
overwriting the result from doWrite() with the result from doRead()

This can cause a situation where doWrite() tried to notify that we
should stop polling if the socket is writable, but the doRead() result
causes that to be ignored.  This results in a tight loop and 100% cpu
usage in SocketMultiplexer::serviceThread() as the poll() call
instantly returns that the socket is writable, but no one cares that
it is.  The issue eventually corrects itself with enough mouse
movement/clicks.
2018-12-28 14:03:42 -08:00
Moron
03f9009d10 Fix #204 modifier keys not working in remote desktop on MacOS 2018-12-28 17:26:51 +01:00
Robert Sandell
3d835ea4aa Spelling correction (#209) 2018-12-27 11:55:34 -05:00
Dayne Broderson
1b99390c96 fixing style to be consistent per @p12tic 2018-12-26 14:57:19 -05:00
Dayne Broderson
d4a2a055cc fix spelling of matches 2018-12-26 14:57:19 -05:00
Dayne Broderson
5f71b47b5a add debug notes to help identify where trusted fingerprints file is 2018-12-26 14:57:19 -05:00
Chris Simons
ea3e20ade1 Added preserveFocus fix (#178)
Adds the [preserveFocus configuration](https://github.com/symless/synergy-core/wiki/Text-Config#Focus_Preservation) item to the GUI configuration screen. 

This is useful if you want to control a system that you are not the only user of. For example, I use barrier to control my HTPC computer sometimes, but I don't want Kodi to lose focus when my cursor leaves the screen since it will cause other inputs (i.e. CEC Remote) to stop working.
2018-12-16 18:05:20 -05:00
Monika Kairaityte
14a7ca0848 Fix tests wrapper 2018-11-21 17:39:33 -05:00
Monika Kairaityte
51118014b1 x11: Wrap platform functions in XWindowsEventQueueBuffer class 2018-11-12 23:09:27 -05:00
Monika Kairaityte
2c32270d49 x11: Wrap platform functions in XWindowsKeyState class 2018-11-12 23:09:27 -05:00
Monika Kairaityte
624a718f2d x11: Wrap platform functions in XWindowsClipboard class 2018-11-12 23:09:27 -05:00
Monika Kairaityte
ce3e8243a9 x11: Wrap platform functions in XWindowsScreenSaver class 2018-11-12 23:09:27 -05:00
Monika Kairaityte
be45440e84 x11: Wrap platform functions in an interface that can be mocked later 2018-11-12 23:09:27 -05:00
Povilas Kanapickas
65172ebd60 OSX: Explain why the app needs to go into /Applications (#158) 2018-10-19 13:17:17 -04:00
Povilas Kanapickas
b8fa610f8f Build full installer via clean_build.sh (#157)
* OSX: Fix lack of newlines in build messages

* OSX: Build full installer as part of the installer build via cmake
2018-10-19 13:17:04 -04:00
Christopher N. Hesse
ab887a4e90 gui: Fix auto hide behavior (#140)
* make waitForTray() report a proper status - the return value was not
   used until now anyway (it would always return true)
 * depend on the system tray availability for auto hide

On my system (Fedora 29 with Pantheon Desktop), on a clean install the GUI
would auto hide itself on startup, but due to no system tray being
available I could never make the GUI appear again.

This change disallows auto hide if the system tray is not available.
Users who don't want the GUI can just start barriers/barrierc instead of
the main barrier executable, so this should not break existing workflows.
2018-10-13 01:52:45 -04:00
Adrian Lucrèce Céleste
a58cdf625e add pre-build script for building barrier on windows from SSH (#152)
I build barrier on windows from SSH, as such, I need a way to invoke the "Developer Command Prompt for VS 2017" without a GUI. This simple one-line batch script gets the job done. I thought it might be handy to upstream it.

process I use to build on windows:

```shell
$ ssh owner@10.0.0.209
owner@DESKTOP-C2IV8E5 C:\Users\Owner> cd Documents\GitHub\barrier\
owner@DESKTOP-C2IV8E5 C:\Users\Owner\Documents\GitHub\barrier> pre-build.bat
owner@DESKTOP-C2IV8E5 C:\Users\Owner\Documents\GitHub\barrier> clean_build.bat
```
2018-10-13 01:50:43 -04:00
Epakai
0eeb4ce240 Update openssl key size in barrier.conf (#150)
Done in order to match the size specified in src/gui/src/SslCertificate.cpp

Also see Debian bug #907528 http://bugs.debian.org/907528

Related to Barrier Issue #126
2018-10-12 16:31:07 -04:00
walker0643
53ebc47ace Merge pull request #106 from coypoop/master
Small patches for netbsd
2018-09-08 19:09:56 -04:00
walker0643
f203a7f49e Merge pull request #121 from cuviper/barrier-fromUTF8
Fix data indexes in Unicode::fromUTF8
2018-09-08 19:05:13 -04:00
walker0643
e65ea3c545 Update README.md 2018-09-08 18:27:00 -04:00
3794767459 add firewall rule for default port on installation (windows) 2018-09-08 16:49:08 -04:00
b2aac6719f rename field Interface to Address in GUI settings dialog 2018-09-08 15:20:02 -04:00
075d4f4758 enable high-dps awareness for barriers/barrierc. fixes screen geometry calculations for screens with >100% scaling 2018-09-08 14:36:50 -04:00
c63dd6f4f1 Merge branch 'master' of github.com:debauchee/barrier 2018-09-07 18:15:17 -04:00
9e2fbe269d bump ssl cert key size up to 2048 from 1024. fixes #126 2018-09-07 18:14:03 -04:00
Josh Stone
7a0bc3abb7 Fix data indexes in Unicode::fromUTF8 2018-08-29 14:40:39 -07:00
walker0643
5916d40053 Merge pull request #111 from pbogut/fix-server-help-message
Fix config file name in server help message
2018-08-25 21:04:20 -04:00
Pawel Bogut
af8bbf2674 Fix config file name in server help message 2018-08-09 07:54:30 +02:00
a381347233 bump qt/vs versions on windows 2018-08-05 13:08:42 -04:00
73c13ab023 bump version to 2.2 2018-08-05 13:08:30 -04:00
coypu
443e656be2 Use ${CMAKE_DL_LIBS} rather than listing OSes.
CMake makes our lives easier. Needed for NetBSD, which also
doesn't have libdl.so.
2018-08-02 15:46:01 +03:00
coypu
87820d9387 have all other OSes handled in the else case.
No reason to limit to just freebsd and linux, we handle all existing
supported OSes in the previous cases.
Needed for NetBSD support.
2018-08-02 15:46:01 +03:00
coypu
c7c14f02dd Also add curl include directories.
While here, use the variables from FindCURL.cmake
2018-08-02 15:46:01 +03:00
5498836b6f fix formatting in last merge 2018-07-03 16:55:57 -04:00
Adrian Lucrèce Céleste
cc69299ea3 Merge pkgconfig branch into master (#86)
* use pkg-config for finding avahi include dir

* [Travis] bring up to date
2018-07-02 23:21:08 -04:00
Adrian Lucrèce Céleste
ccfa11ca7b [Travis] use container builds for linux (#85)
Things should build faster
2018-07-02 22:40:54 -04:00
walker0643
b28442ee1b Merge pull request #82 from sidneys/fix-macos-build
Use standard methods for detecting XCode installation and macOS SDK (patch by sidneys)
2018-07-02 20:43:30 -04:00
walker0643
4806441cb2 Merge pull request #84 from p12tic/osx-ci
More complete OSX config for Travis CI
2018-07-02 20:42:13 -04:00
Povilas Kanapickas
55c74e9075 travis: Add homebrew-based OSX script 2018-07-02 22:34:21 +03:00
Povilas Kanapickas
4c0690dd96 travis: Add macports-based OSX script 2018-07-02 22:33:57 +03:00
Povilas Kanapickas
af789958f0 travis: Rewrite the CI config to use platform matrix 2018-07-02 22:33:42 +03:00
Povilas Kanapickas
5467b90982 OSX: Prefer Macports over Homebrew if available 2018-07-02 22:33:42 +03:00
Povilas Kanapickas
f928c81afc OSX: Add support for building on macports 2018-07-02 22:33:21 +03:00
sidneys
39ccc4cbe6 fix(macos-build): use standard methods for detecting default XCode installation and default macOS platform SDK 2018-07-02 11:14:42 +02:00
2ddc81d927 rephrase language in README.md 2018-07-01 14:50:49 -04:00
dc5dc25de7 screen settings dialog handles internationalized default name better
(ref #71)
2018-06-30 17:33:49 -04:00
walker0643
53ee9c7803 Merge pull request #64 from p12tic/osx-server-jumpy-scrolling
Improve precision of grabbed scroll events on OSX server
2018-06-30 16:40:10 -04:00
1f3a91e74e fix email in debian changelog 2018-06-30 16:32:05 -04:00
walker0643
99188fe24b Merge pull request #69 from p12tic/debian-add-fake-changelog
Add fake changelog so that debian package may be built (p
2018-06-30 16:30:32 -04:00
a956cad0da add patch from Gentoo packager to fix cmake issue (reported on Arch, too). ref #49 2018-06-30 13:44:34 -04:00
e88bc97e63 non-GUI build should not require bonjour headers 2018-06-30 13:26:18 -04:00
walker0643
f857354535 Merge pull request #68 from p12tic/linux-client-accumulate-small-scrolls
Accumulate scrolls less than supported scroll on XWindows (patch by p12tic)
2018-06-30 12:52:09 -04:00
Povilas Kanapickas
b570e57591 Add fake changelog so that debian package may be built 2018-06-21 01:13:41 +03:00
Povilas Kanapickas
76c39aaf4e Accumulate scrolls less than supported scroll on XWindows
This fixes barrier case #67 and synergy case #5670.
2018-06-21 00:50:08 +03:00
Povilas Kanapickas
a645e9a296 Improve precision of grabbed scroll events on OSX server
This is barrier issue #63, synergy issue #5672.
2018-06-21 00:13:40 +03:00
773a0081e3 remove (wrong) version line from .desktop file 2018-05-15 22:48:18 -04:00
8b69f9fe03 better handling of non-git builds 2018-05-14 12:55:03 -04:00
0b2dfd80e2 move protocol version to new line in --version output (fix display issue in created manpages) 2018-05-14 12:23:24 -04:00
c7569f8af7 update manpages 2018-05-12 18:35:18 -04:00
walker0643
b8ad9b8aba Set theme jekyll-theme-slate 2018-05-12 18:24:22 -04:00
9ab77545ee fix ipv6 handling between GUI and barriers/barrierc; zero-fill sockaddr_in(6) structs prior to initializing; update --help output 2018-05-12 17:42:55 -04:00
f4301a7618 fix usage of m_pname and rename to m_exename 2018-05-12 17:32:26 -04:00
f299558cdf remove stale definitions 2018-05-12 17:20:35 -04:00
7fd6711829 remove stale references to syntool/synwinhk 2018-05-10 11:42:08 -04:00
b43581c2f5 remove explicit paths from .desktop file 2018-05-07 13:21:25 -04:00
bd4c214c39 bump version to 2.1. remove dependence on git for tarball builds. 2018-05-07 13:20:40 -04:00
642eb33446 make linux/bsd data directory conform to freedesktop standards. fixes #31 2018-05-07 12:57:06 -04:00
walker0643
0b5ca57b9c Merge pull request #26 from debauchee/nosyntool
Drop syntool. In the process some platform-dependent locations have changed. Some users may need to recreate config files or copy the from the old location(s).
2018-04-14 18:20:19 -04:00
a7fb1b56f6 Merge branch 'master' into nosyntool 2018-04-01 21:14:32 -04:00
5e19820425 remove dangling handler..fixes race condition when a clipboard event is queued but not dispatched before disconnect 2018-04-01 21:13:56 -04:00
9e7792e2ae add comment re C++17 to MSWindowsUtil.cpp 2018-04-01 14:57:22 -04:00
42a8f69050 better comments in PathUtilities.cpp 2018-04-01 14:47:34 -04:00
1734e6d7f6 Merge branch 'master' into nosyntool 2018-04-01 14:04:53 -04:00
6c4199b11a fix mainwindow icon 2018-04-01 14:00:52 -04:00
767188799e add desktop name to DEBUG output. when is desktop ever NOT "Default" ? 2018-04-01 13:59:14 -04:00
e6d0f40a36 add legal header to new files 2018-04-01 12:43:55 -04:00
129e61a33a server should look for config in the profile() dir rather than the personal() dir. removed personal() since it is no longer used. 2018-03-31 22:48:59 -04:00
4c04f39685 reimplement path operations basename() and concat() in Common. these were the last bits remaining in ArchFile* so it was removed 2018-03-31 22:41:00 -04:00
131a19d478 reimplement ArchFile*::getSystemDirectory() as DataDirectories::systemconfig(). windows will now use ProgramData by default rather than C:\Windows 2018-03-30 14:39:12 -04:00
6c5acdd552 remove DataDirectory wrappers in ArchFile* 2018-03-30 14:01:18 -04:00
d81054ab6e remove some stale code and put windows service logfile in a better spot 2018-03-29 21:41:30 -04:00
1be86a9248 remove syntool, CoreInterface, and WebClient 2018-03-29 17:14:57 -04:00
ea025f5958 fix --profile-dir argument 2018-03-29 17:13:45 -04:00
6e5b340bcc replace CoreInterface syntool calls with DataDirectory calls 2018-03-29 16:38:50 -04:00
451bd72b30 MSWindowsWatchdog checks active desktop without external call to syntool 2018-03-29 16:32:51 -04:00
c16fd089f6 old personal and profile directory functions now wrap the new implementations 2018-03-29 16:12:45 -04:00
96627f4f07 reimplement finding personal & profile directories on unix (not yet used) 2018-03-29 15:54:41 -04:00
c5e70af09a DataDirectories header should be shared between platform-specific implementations 2018-03-29 15:50:23 -04:00
72cc7e3d89 link gui with common; reimplement finding personal and profile directories on windows (not yet used) 2018-03-29 14:01:07 -04:00
fe818a4955 add console for ctrl+c to daemon app when debugging in foreground 2018-03-29 12:02:35 -04:00
ecfa7d7d1c fix windows build 2018-03-24 15:47:51 -04:00
walker0643
9a2d61cbb5 Merge pull request #19 from debauchee/ipv6
Add ipv6 support
2018-03-24 15:09:20 -04:00
626aa9a3e8 add cpack settings for creating source packages 2018-03-19 13:50:08 -04:00
12ed71250a use cpack to provide package build target 2018-03-19 13:16:06 -04:00
d75bdb8ec0 clean up --help output for barriers/barrierc at kloetzl's request. ref commit 63a7936 2018-03-17 16:55:53 -04:00
63a7936e9f update manpages and --help output. fixes #23 2018-03-16 21:27:03 -04:00
3389a980ea remove bogus check for logonui.exe. it was causing false-positives for the need to elevate 2018-03-13 18:04:29 -04:00
a600801319 support options to msbuild on windows 2018-03-13 17:06:16 -04:00
bac2999d3e bump version to 2.0.0 2018-03-13 16:55:07 -04:00
921a40c684 silence avahi's bonjour warning 2018-03-13 13:03:19 -04:00
ea1c563647 make LogWindow wider 2018-03-11 13:20:51 -04:00
51abdc281d make DaemonApp a win32-only target 2018-03-11 13:14:45 -04:00
b9a59c014f don't build barrierd for non-windows platforms; removed some synergy-related legacy checks 2018-03-11 12:48:59 -04:00
ed05dc2b2e set file extension in Save dialog for configuration files 2018-03-11 12:29:48 -04:00
24987e0694 merge modified patch from synergy PR https://github.com/symless/synergy-core/pull/6178 2018-03-06 13:55:27 -05:00
b4604b0921 fix QBarrier references 2018-03-04 16:58:17 -05:00
3edbc00397 fix X11 crash if DISPLAY is not valid 2018-03-04 16:21:41 -05:00
e396f8d55e sync mainwindow icon to current application status 2018-03-03 14:34:34 -05:00
5362dbc297 replace source with . in sh scripts for compatibility 2018-03-03 12:57:49 -05:00
5b31036cdc fix bad logic in XWindowsScreen.cpp 2018-03-03 12:57:13 -05:00
625253a7e8 fix FreeBSD build 2018-03-02 18:36:31 -05:00
c605cbdbcc fix macos installer script 2018-03-01 13:27:58 -05:00
116a133902 fix macos installer script 2018-03-01 13:22:47 -05:00
e6a3a124ee improve macos build 2018-03-01 13:05:53 -05:00
786d513379 fix build script 2018-03-01 12:22:54 -05:00
4da5c29e5f Merge branch 'master' of github.com:debauchee/barrier 2018-03-01 10:57:49 -05:00
db1e05ff08 integrate inno installer into cmake 2018-03-01 10:57:13 -05:00
315f4c05ca re-add Hide to menu because not all WMs will add a minimize button to the title bar; add WM hint so that tiling WMs might float it instead 2018-02-25 21:19:04 -05:00
c351d450ae move log output into its own window; add some keyboard shortcuts for menu items 2018-02-25 20:00:32 -05:00
b55fe3237a clean up AppConfig; eliminate unnecessary UI changes to MainWindow; MainWindow starts at smaller size 2018-02-25 16:22:10 -05:00
2a4382bac9 Merge branch 'master' of github.com:debauchee/barrier 2018-02-25 13:38:03 -05:00
c1827bde51 redo GUI menu a bit; remove unused items 2018-02-25 13:37:29 -05:00
walker0643
65b9d795cf Update README.md 2018-02-25 12:35:41 -05:00
1648c1d51a build checks unixbuild_env.sh for environmental overrides 2018-02-24 19:39:04 -05:00
916b085474 better resource management for SecureSocket buffer. fixes #16 2018-02-24 19:37:30 -05:00
b994c94a90 fix build for libressl. thanks to truatpasteurdotfr for the patch 2018-02-24 18:20:14 -05:00
60d121aed3 reduce size of clipboard buffer. fixes #15 2018-02-24 17:41:28 -05:00
15c83eca48 add libavahi to travis 2018-02-24 15:23:53 -05:00
0f42f82439 add qt5 dev package to travis 2018-02-24 15:14:20 -05:00
b36a91a363 fix travis.yml 2018-02-24 15:05:42 -05:00
dc15dc6081 add libxtst-dev to travis 2018-02-24 15:01:39 -05:00
cfe8719982 remove debug statements 2018-02-24 14:56:30 -05:00
87ff075c15 fix clean_build.sh on travis 2018-02-24 14:39:30 -05:00
ec1d68912d working on travis-ci 2018-02-24 14:27:47 -05:00
cfc13f1f04 add travis support 2018-02-24 14:10:14 -05:00
45805bbdcb fix cmake3 detection in barebones environments 2018-02-24 13:05:17 -05:00
06d5080b42 reimplement immune keys 2018-02-23 21:31:05 -05:00
0e5ed7a305 clean up the hook management code 2018-02-23 20:56:12 -05:00
be0fab1775 migrate k/m hook handlers from synwinhk to platform/MSWindowsHook and delete synwinhk.dll. for ever and ever. 2018-02-23 18:06:17 -05:00
a3ec43999f remove local memcpy from synwinhk 2018-02-23 16:30:44 -05:00
d169555b28 remove references to immunekeys functions from outside synwinhk 2018-02-23 16:27:56 -05:00
b1be8227d2 missed a couple things: EWheelSupport and immunekeys stuff in header 2018-02-23 16:24:01 -05:00
30304255ea remove *very* old support code for mouse wheels 2018-02-23 15:42:09 -05:00
a71779647d remove high-level k/m hooks and temporarily remove immune keys
implementation in synwinhk
2018-02-23 15:06:27 -05:00
4571f4cc6e remove annoying LOG statement; add a small bit of debugging info 2018-02-23 14:02:38 -05:00
07dad10251 moved SSL configuration on OSX from Library/Barrier to Library/Application Support/Barrier as per the App Programming Guide. fixes #5
ref: https://developer.apple.com/library/content/documentation/General/Conceptual/MOSXAppProgrammingGuide/AppRuntime/AppRuntime.html
2018-02-16 12:29:47 -05:00
28cb82bcb0 normalize osx script names 2018-02-16 12:12:21 -05:00
cebe7873a4 Merge branch 'master' of github.com:debauchee/barrier 2018-02-16 11:55:41 -05:00
3b20310deb update macos bundle icon 2018-02-16 11:55:16 -05:00
f5b5258f4a revert some of the "deprecated" fixes so that older OSX versions are still supported. my thanks to Cpuroast for additional macos testing. 2018-02-15 01:17:18 -05:00
a8d0dfdacc recursive re-referencing of binaries, and add cocoa qt platform plugin 2018-02-14 14:41:59 -05:00
71a20eedec automate building mac installer 2018-02-13 22:11:56 -05:00
8073db2247 silence a couple more compiler warnings on osx 2018-02-13 17:43:39 -05:00
6cf4f14dec fix some compiler warnings 2018-02-13 15:14:26 -05:00
f07070f7f9 fix OSX build 2018-02-13 14:49:39 -05:00
5bd7e6bfe8 add inno installer scripts 2018-02-10 16:46:50 -05:00
f30fe8775c configure qt version automatically in installer script 2018-02-10 13:44:33 -05:00
3023f9b469 remove redistributable magic (that doesn't work) from installer and
re-add qwindows.dll
2018-02-09 20:51:57 -05:00
2ffd92accc rename scripts 2018-02-07 16:33:48 -05:00
walker0643
649b43c3cc fix names in readme 2018-02-07 13:20:08 -05:00
d5544dc6d1 fix installer build. at this point the process is not at all robust..it mainly just works for me. 2018-02-06 20:08:37 -05:00
541fb2afc5 fix quotations in for platform build 2018-02-06 17:26:23 -05:00
e93b203b87 rmdir doesn't set errorlevel but mkdir does and can be used to check for errors up to that point...to a point 2018-02-06 17:13:35 -05:00
6cb65ebf05 fix PNG warning 2018-02-03 17:01:30 -05:00
df129f139b add ImmuneKeysReader.h/cpp to windows builds 2018-02-03 16:47:36 -05:00
faec8a2f84 implement "Immune Keys" which are keys that are ignored by
server-to-client key-forwarding. this feature is only implemented for
servers running on windows machines.
2018-02-03 16:32:41 -05:00
b64512d65f update artwork 2018-02-02 19:12:14 -05:00
1effd7bc0b Merge branch 'master' of github.com:debauchee/barrier 2018-02-01 18:42:41 -05:00
531ced363c clean_build: try cmake3 before cmake 2018-02-01 18:42:21 -05:00
edfc7e9bbc add description to XWindows error handler message 2018-02-01 18:21:47 -05:00
dea4359cce Merge branch 'master' of github.com:debauchee/barrier 2018-02-01 17:13:57 -05:00
b3298ad799 fix race condition 2018-02-01 16:37:25 -05:00
eb025871c4 add CLOG_DEBUG for opening/closing TCPSocket objects and fix assert() crash 2018-02-01 11:18:13 -05:00
830f6acbef fix windows build and refactor last addition to EventQueue 2018-02-01 10:10:46 -05:00
d9530bf7aa use a relatively small hack to keep barriers/barrierc from crashing on
unixes when they are killed from the GUI with QProcess's close(). the
stdin stream is going completely unused (though the stdout stream is
not) so use stdin to send a shutdown command. this solution avoids all
the nastiness and overhead of using shared memory, mutexes, condvars,
etc. just to communicate "stop" from one process to another
2018-01-31 20:20:06 -05:00
d8237238b4 rearrange CMakeLists.txt in gui 2018-01-31 10:04:07 -05:00
b77eec1f17 fix some compiler warnings 2018-01-31 10:03:34 -05:00
9240cc12df implemented minize to tray 2018-01-30 17:32:00 -05:00
ccb02372bf fix autohide on windows and correct a typo in settings ui 2018-01-30 16:55:34 -05:00
cda6933f10 changed SettingsDialog layout to group options more reasonably
added checkbox for minimizing to tray
don't hide "hide on startup" on windows
2018-01-30 16:41:16 -05:00
c68d355ce5 when running barriers/barrierc inside a windows debugger, add a pause
before exiting so the output in the terminal window can be read
2018-01-30 14:23:11 -05:00
8bdd530d7d fix running daemon in foreground for debugging 2018-01-30 14:18:14 -05:00
5af4b13611 double-clicking tray icon should work on windows as well. also labeled the tray icon with a tooltip. 2018-01-30 11:54:49 -05:00
0f2063b67f fix organization fields in QCoreApplication 2018-01-29 22:52:15 -05:00
ecf4ebf50e disable check for updated version since it was causing an access
violation on close and since there is nothing to check it against
anyway. will reimplement check for updated version in the future.
2018-01-29 22:49:50 -05:00
31a64731c1 mute the IPC debug messages on stdout 2018-01-29 18:53:46 -05:00
dbfb04a6ec pass QS_POSTMESSAGE to GetQueueStatus() instead of QS_ALLINPUT.
QS_ALLINPUT is a meta-flag that includes QS_POINTER and QS_TOUCH, both
of which can cause GetQueueStatus() to return 0 even when there are
pending messages.

fixes #4
2018-01-29 18:12:50 -05:00
ce8c65f8f9 move deletion of accepted client socket pointers to ClientListener
where it belongs. previously SecureListenSocket would delete the client
socket but TCPListenSocket would not. PacketStreamFilter would then
attempt to delete the socket regardless of what type it was. this would
cause an access violation when SecureListenSocket attempted to delete
the socket again.

fixes #3
2018-01-29 12:57:17 -05:00
8fb904285b forgot to clear savedir 2018-01-29 12:49:10 -05:00
33b81742b5 fix execute bit on a lot of files 2018-01-28 17:34:15 -05:00
da37ccdf87 add clean_build_windows.bat to help with win64 builds 2018-01-28 17:32:11 -05:00
5a0465eb36 change openssl path relative to binary 2018-01-28 16:56:16 -05:00
0bb94da72d replace unknown type to fix windows build 2018-01-28 16:19:27 -05:00
0929086428 fix SSL fingerprint text and about box copyright text 2018-01-27 20:50:30 -05:00
99b16334b5 remove activation, serial, trial garbage. shame on you all! 2018-01-27 20:21:44 -05:00
2169eb679b fix CosmoSynergy 2018-01-27 19:15:03 -05:00
f12bfdfedc rebranding symless/synergy to debauchee/barrier 2018-01-27 16:48:17 -05:00
walker0643
5a1c217b54 Update ISSUE_TEMPLATE.md 2018-01-25 18:43:52 -05:00
walker0643
49b607a729 Update ISSUE_TEMPLATE.md 2018-01-25 18:43:30 -05:00
walker0643
ff0525254d Update ISSUE_TEMPLATE.md 2018-01-25 18:42:32 -05:00
walker0643
3b19884fd4 Update README.md 2018-01-25 18:30:26 -05:00
walker0643
bbfcc5cbb3 Update README.md 2018-01-25 18:18:44 -05:00
walker0643
3d245c7255 Create README.md 2018-01-25 17:05:55 -05:00
Andrew Nelless
f51ec97b3b Update Qt version 2017-11-26 20:09:57 +00:00
Andrew Nelless
2600cb303d Bump Qt 5 version 2017-11-16 00:27:35 +00:00
Nick Bolton
d61d2c0d6c #6116 Change log level for unknown quartz event type to DEBUG3 2017-08-09 19:59:44 +01:00
Andrew Nelless
fa2b12bc63 Update Qt version number 2017-07-21 15:04:34 +01:00
Andrew Nelless
c20346971d Move version number handling out of main CMake file 2017-05-27 14:01:49 +01:00
Andrew Nelless
0058ae9e80 Update OpenSSL to v1.0.2l 2017-05-26 22:10:15 +01:00
Andrew Nelless
1d5bb1ff46 Update 16px icon 2017-05-25 14:09:55 +01:00
Andrew Nelless
20961312e7 Use test ico 2017-05-25 13:39:04 +01:00
Andrew Nelless
843f34a830 Add numbered icon for debugging 2017-05-25 12:28:22 +01:00
Andrew Nelless
43948f7871 Merge pull request #6048 , fixes #5844
Fix icon paths on Linux
2017-05-23 10:58:28 +01:00
Andrew Nelless
7c89fdb6eb Update CMakeLists.txt 2017-05-23 02:37:03 +01:00
Andrew Nelless
7f48685411 Update CMakeLists.txt 2017-05-23 02:32:45 +01:00
Connor Lirot
32f4dea7f5 Fix icon path in RPM spec 2017-05-22 20:26:41 -05:00
Andrew Nelless
5f7e047484 Always set SYNERGY_SNAPSHOT_INFO 2017-05-23 02:11:51 +01:00
Connor Lirot
da2754d41e Fix icon installation path on Linux 2017-05-22 19:57:02 -05:00
Andrew Nelless
98a6b0421a Delete temporary config files on platforms other than Windows 2017-05-22 22:41:38 +01:00
Andrew Nelless
087b07b335 Add keywords to Linux .desktop files 2017-05-22 22:36:27 +01:00
Andrew Nelless
45580db33c Port fix for guitests from offical debian package 2017-05-22 22:34:25 +01:00
Andrew Nelless
62ab8ffc4f v1.9.0-rc4 2017-05-22 21:02:06 +01:00
Andrew Nelless
0953ac069b Merge pull request #6045 from symless/v1.9-pvs-studio
PVS Studio related bugfixes for v1.9
2017-05-22 20:56:03 +01:00
Andrew Nelless
56f7403f68 Update synergy.spec.in 2017-05-22 17:56:49 +01:00
Andrew Nelless
dbdb033bcc Fix SYNERGY_SNAPSHOT_INFO for non-snapshot builds 2017-05-22 17:34:43 +01:00
Andrew Nelless
8d92b7ad45 More CMake version number tweaking 2017-05-22 16:04:57 +01:00
Andrew Nelless
ca830f267a Use 8 characters for SYNERGY_REVISION 2017-05-22 14:30:12 +01:00
Andrew Nelless
9d79f9bee4 Update RPM spec to use BUILDS_TODAY 2017-05-22 11:10:29 +01:00
Andrew Nelless
e041af6010 Add support for BUILDS_TODAY to CMake 2017-05-22 11:09:58 +01:00
Andrew Nelless
0f137543e4 Generate useful release tag in RPM specfile 2017-05-22 09:52:27 +01:00
Andrew Nelless
b52eb95f41 Tweak version handling again 2017-05-21 23:59:15 +01:00
Connor Lirot
b646b284bf Fix icon path on Linux 2017-05-20 18:56:43 -05:00
Andrew Nelless
98e617a937 #6037 Use MAKINTATOM in MSWindowsScreen 2017-05-18 01:20:22 +01:00
Andrew Nelless
b87dba52ba #6037 Unitialized member in Chunk 2017-05-18 01:11:20 +01:00
Andrew Nelless
857482ced7 #6037 Unitialized members in App class 2017-05-18 01:09:38 +01:00
Andrew Nelless
e608f8f081 #6037 Fix broken override in ZeroconfServer 2017-05-18 01:00:16 +01:00
Andrew Nelless
cc2f1146ea #6037 Fix broken override in ScreenSetupView 2017-05-18 00:55:46 +01:00
Andrew Nelless
b0c80b419a #6037 Unitialized pointer in DataDownloader 2017-05-18 00:46:02 +01:00
Andrew Nelless
0c2b89ed21 #6037 Fix key repeat expression always false 2017-05-18 00:32:59 +01:00
Andrew Nelless
bae51a4406 #6037 Use MAKEINTATOM in MSWindowsScreen 2017-05-18 00:06:56 +01:00
Andrew Nelless
3e6920964a #6037 Unitialized members in MSWindowsScreenSaver 2017-05-18 00:03:34 +01:00
Andrew Nelless
40e943d145 #6037 Use of non-memsize type for pointer arithmetic 2017-05-12 20:40:07 +01:00
Andrew Nelless
762718d938 #6037 Use MAKEINTATOM macro in place of dodgy casts 2017-05-12 20:15:57 +01:00
Andrew Nelless
ae8db8b125 #6037 prevent object slicing in caught exception 2017-05-12 20:02:51 +01:00
Andrew Nelless
c556184114 #6037 Remove pointless cast in TCPSocket 2017-05-12 19:50:38 +01:00
Andrew Nelless
58e8e06812 #6037 Unitialized member in SecureSocket 2017-05-12 19:47:03 +01:00
Andrew Nelless
b097171c69 #6037 Unitialized and unused members in IPCLogOutputter 2017-05-12 19:38:03 +01:00
Andrew Nelless
3e6b6dc7b8 #6037 Remove crazy LoadString wrapper 2017-05-12 01:41:17 +01:00
Andrew Nelless
823868f767 #6037 Fix potential memory leak if SetClipboardData fails 2017-05-12 01:08:27 +01:00
Andrew Nelless
7deb5f04f3 #6037 Replaced empty()->clear() mixup 2017-05-12 00:57:46 +01:00
Andrew Nelless
46231cd35c #6037 Slightly improve error checking in vformat() 2017-05-12 00:45:59 +01:00
Andrew Nelless
0290583ab9 #6037 Unitialized handles and other members in ArchTaskBarWindows 2017-05-12 00:20:59 +01:00
Andrew Nelless
485540bbb4 #6037 socket accept() failure could lead to NULL ptr dereference 2017-05-12 00:10:16 +01:00
Andrew Nelless
1c5e986dcf QtQuick isn't a required dependency 2017-05-11 21:18:29 +01:00
Andrew Nelless
f987381a0f Make ready v1.9.0-rc3 2017-05-10 15:29:48 +01:00
Andrew Nelless
526fe3d453 Update ChangeLog 2017-05-10 15:28:01 +01:00
Andrew Nelless
bb726e6deb #4132 Disable Qt Bearer management 2017-05-10 15:25:21 +01:00
Andrew Nelless
54632e2ceb Fix appending revision to version number 2017-05-09 12:32:46 +01:00
Andrew Nelless
6784c1df66 Remove Debian changelog.
It is now generated by buildbot
2017-05-09 11:59:44 +01:00
Andrew Nelless
9732e3f9bc Revert "Configure debian package directory"
This reverts commit 17abdefd20.
2017-05-09 11:21:51 +01:00
Andrew Nelless
17abdefd20 Configure debian package directory 2017-05-09 11:12:20 +01:00
Andrew Nelless
f38d86aeb0 Make ready v1.9.0-beta 2017-05-09 10:40:56 +01:00
Jerry (Xinyu Hou)
ab566bb5a4 Update synergy.ico file 2017-05-08 17:22:00 +01:00
Andrew Nelless
1d39bbe506 Update ChangeLog 2017-05-05 02:27:43 +01:00
Svyatoslav
cd015482d5 PVS-Studio: An exception should be caught by reference rather than by value. (#6003) 2017-05-05 01:34:34 +01:00
Svyatoslav
30baa8fbe1 src/lib/server/Server.cpp: PVS-Studio: Initial and final values of the iterator are the same. 2017-05-05 01:31:36 +01:00
Andrew Nelless
a73b65431b Fix showSecureCipherInfo() to build with OpenSSL 1.1.0 2017-05-05 01:27:25 +01:00
Jerry (Xinyu Hou)
0888b1228c Remove typo 2017-05-04 21:05:46 +01:00
Jerry (Xinyu Hou)
29ca4b76ac Stop building installer if specified 2017-05-04 21:00:49 +01:00
Jerry (Xinyu Hou)
58eb7952a6 Allow skip building old GUI 2017-05-04 20:10:06 +01:00
Dan Sorahan
165bfa3dd6 Fix hex encoding of non-ASCII characters in serial 2017-05-04 12:38:19 +01:00
Andrew Nelless
9df559598a Initial v1.9.0-beta1 changelog 2017-05-02 16:48:28 +01:00
Andrew Nelless
b5c24ec449 #5467 Fix Bonjour download URL 2017-05-02 16:46:12 +01:00
Andrew Nelless
fe117db525 Force -DNDEBUG on non-Debug CMake builds 2017-04-27 17:01:54 +01:00
Andrew Nelless
242f1e7e29 Rename VERSION to SYNERGY_VERSION 2017-04-27 16:14:46 +01:00
Andrew Nelless
876744ad2c Cleanup version number handling in CMake 2017-04-27 15:40:23 +01:00
Andrew Nelless
380e2db9aa Make debian/rules executable 2017-04-27 14:03:40 +01:00
Andrew Nelless
d7e1b79733 Cleanup CMakeLists 2017-04-27 14:03:20 +01:00
Andrew Nelless
53d702a7c1 Remove debian revision from debian changelog 2017-04-27 13:58:18 +01:00
Andrew Nelless
0ac88db778 Remove synergyd from RPM 2017-04-27 12:47:09 +01:00
Andrew Nelless
032ca5cf30 Remove duplicated install process between RPM spec and CMake 2017-04-27 12:26:01 +01:00
Andrew Nelless
10cabbc5a0 Fix Synergy icon on Linux 2017-04-26 17:38:28 +01:00
Andrew Nelless
c4feae3491 Fix rpm spec variable substitution 2017-04-26 16:04:03 +01:00
Andrew Nelless
07ab0850c8 Remove junk files 2017-04-26 15:39:32 +01:00
Andrew Nelless
563b8c5b31 Delete old debian specs 2017-04-26 15:38:53 +01:00
Andrew Nelless
a9f293061e Make CMake configure rpm spec 2017-04-26 15:38:22 +01:00
Andrew Nelless
5c967781c3 Tweak debian control file 2017-04-26 15:35:12 +01:00
Andrew Nelless
cb1b7eee50 Clean up RPM spec 2017-04-26 15:34:48 +01:00
Jerry (Xinyu Hou)
cc0048657e #6012 Fix cmake if not closed error 2017-04-25 15:53:54 +01:00
Jerry (Xinyu Hou)
86d6697dea #6012 Use different synergy desktop files for v1 and v2 2017-04-25 15:47:17 +01:00
Jerry (Xinyu Hou)
485a7fff03 #6012 Move gui v1 into bin for deb packaging 2017-04-25 14:15:15 +01:00
Jerry (Xinyu Hou)
9900132176 #6012 Update version number in deb package 2017-04-25 13:50:27 +01:00
Jerry (Xinyu Hou)
c0376e9e2f Use c++ 14 standard 2017-04-25 13:40:31 +01:00
Jerry (Xinyu Hou)
513f50a9e0 #6012 Deb packaging directory 2017-04-25 13:24:35 +01:00
Jerry (Xinyu Hou)
be2e3f117f Force build 2017-04-25 12:22:21 +01:00
Jerry (Xinyu Hou)
67f01e02d0 Force build 2017-04-21 15:30:34 +01:00
Jerry (Xinyu Hou)
e883660809 Force build 2017-04-20 16:37:02 +01:00
Andrew Nelless
78faf2712e New macOS icon 2017-03-22 14:24:43 +00:00
XinyuHou
b8cfbdefef Revert "Add new installer banner graphic"
This reverts commit c28892ea04.
2017-03-22 14:20:49 +00:00
XinyuHou
c28892ea04 Add new installer banner graphic 2017-03-22 13:35:16 +00:00
XinyuHou
338aebde95 Change branding in Windows installer 2017-03-21 12:54:14 +00:00
Andrew Nelless
b7042e936d Install synergys and syntool on Linux 2017-03-17 14:10:02 +00:00
Andrew Nelless
3ce7e6add6 Improved desktop file and icon on Linux 2017-03-17 14:08:40 +00:00
Andrew Nelless
ca4c734535 Install desktop file and icon on Linux 2017-03-17 14:07:36 +00:00
Andrew Nelless
db8b341dff Install synergyc 2017-03-16 18:16:33 +00:00
Andrew Nelless
03447ffd64 Allow install config to be turned off 2017-03-13 12:50:17 +00:00
Andrew Nelless
b3f606daee Merge branch 'master' into v1.9 2017-03-09 21:35:55 +00:00
Andrew Nelless
0348ba0483 Rename build properties file 2017-03-09 19:03:55 +00:00
Andrew Nelless
6b3600ece0 Update version number logic 2017-03-09 19:02:20 +00:00
Andrew Nelless
fedbcb0f3a Remove ../ includes in src/lib 2017-03-09 15:16:08 +00:00
Andrew Nelless
0cd45ba1ef Remove unused include paths 2017-03-09 14:18:39 +00:00
Andrew Nelless
50dc29394e Remove cmd dir from include paths 2017-03-09 14:03:00 +00:00
Andrew Nelless
2b3d3f9339 Remove CPack legacy in synergyd 2017-03-09 13:50:58 +00:00
Andrew Nelless
926478e8dc Remove needless include paths on UNIX 2017-03-09 13:45:52 +00:00
Andrew Nelless
0cddcdca10 Fix common.h: Windows doesn't use config.h 2017-03-08 18:50:56 +00:00
Andrew Nelless
f815f9840d See what happens when config.h is mandatory 2017-03-08 18:43:23 +00:00
Andrew Nelless
9ce58f1f4e Remove suspicious looking fp.h hack for macOS 2017-03-08 18:36:08 +00:00
Andrew Nelless
a35c567e2f Remove #define nullptr: it's the future now 2017-03-08 18:34:49 +00:00
Andrew Nelless
58e2ece498 Remove suspect MSVC hacks and warning suppression 2017-03-08 18:31:09 +00:00
Andrew Nelless
4b77e25992 Fix passing version number to GUI etc 2017-03-08 18:22:41 +00:00
Andrew Nelless
bb73b1722a Link legacy GUI to Avahi on Linux 2017-03-08 18:20:18 +00:00
Andrew Nelless
7f0f3123c5 Cleanup main CMake file 2017-03-08 17:51:56 +00:00
Andrew Nelless
adf051a354 Make CMake configure Synergy version number in WiX 2017-03-08 15:14:51 +00:00
Andrew Nelless
c266b921a7 Fix macOS rpath 2017-03-08 12:48:08 +00:00
Andrew Nelless
20948522ea Install macOS binaries in to bundle 2017-03-07 16:50:02 +00:00
Andrew Nelless
8d8d4d600e Move Info.plist and PkgInfo in to the correct bundle directory 2017-03-07 13:41:37 +00:00
Andrew Nelless
03c05af734 Remove _SECURE_SCL=1 2017-03-07 13:21:57 +00:00
Andrew Nelless
37b3f63690 Allow override of version number from build environment 2017-03-07 13:12:22 +00:00
Andrew Nelless
ec56ac4485 Fix version number in Changelog 2017-03-03 14:51:23 +00:00
Andrew Nelless
c30301e234 Merge branch 'master' into v1.8.8 2017-03-03 14:05:27 +00:00
Andrew Nelless
5909df9ee7 v1.8.8-stable 2017-03-03 13:41:07 +00:00
Epakai
c5b83ce4c4 Fix ClipboardChunkTests unit test (Fixes #5840) 2017-02-12 21:18:44 +00:00
Andrew Nelless
c211184c23 macOS: Verify app bundle 2017-02-10 16:45:26 +00:00
Andrew Nelless
d45831f5ea Remove unnecessary GLOB 2017-02-10 16:43:58 +00:00
Andrew Nelless
99473fbb9a Remove Doxygen 2017-02-10 16:42:59 +00:00
Andrew Nelless
09935aaf6c Use configure_files macro for WiX 2017-02-10 16:16:49 +00:00
Andrew Nelless
db70d56d01 Configure the macOS bundle 2017-02-10 16:03:41 +00:00
Andrew Nelless
5a355fe68f Add macOS folder to dist 2017-02-10 13:47:59 +00:00
Andrew Nelless
91f27a13a5 Bump minimum CMake version requirement 2017-02-10 12:37:20 +00:00
Andrew Nelless
f7b87e0670 Remove version number from gtest/gmock paths 2017-02-09 22:30:42 +00:00
Andrew Nelless
3ac4fe7723 Attempt to fix squashed main UI 2017-02-09 20:50:59 +00:00
Andrew Nelless
f90b537b01 Update macOS icon 2017-02-09 20:32:57 +00:00
Andrew Nelless
c6d5db77a9 Update icons 2017-02-09 20:24:02 +00:00
Andrew Nelless
ed29889f25 Add GUI resource files on Windows 2017-02-09 20:05:36 +00:00
Andrew Nelless
71f24c0664 Correct UI file path 2017-02-09 19:57:13 +00:00
Andrew Nelless
971f5bd1ed Update about dialog logo and GUI icon 2017-02-09 18:03:58 +00:00
Andrew Nelless
688095d0a7 Remove IRIX nonsense 2017-02-09 17:34:09 +00:00
Andrew Nelless
9b14f4242a Move Linux package specs to dist folder 2017-02-09 17:30:40 +00:00
Andrew Nelless
94c3fe7979 Removing cruft: Unknown DLL 2017-02-09 17:29:10 +00:00
Andrew Nelless
06c9aa73e7 Removing cruft: NSIS installer 2017-02-09 17:28:35 +00:00
Andrew Nelless
30768207b3 Move WiX installer project to new dist directory 2017-02-09 17:07:59 +00:00
Andrew Nelless
191dac1193 Remove 'install' subdirectory 2017-02-09 16:16:33 +00:00
Andrew Nelless
df58209e83 Remove /FR from Windows build 2017-02-09 16:14:14 +00:00
Andrew Nelless
7bcd595da4 Tweak GUI CMakeLists 2017-02-09 16:06:34 +00:00
Andrew Nelless
1a62200a56 Package both release and debug C++ runtimes in debug build 2017-02-09 14:27:05 +00:00
Andrew Nelless
ab534cd292 Add universal CRT binary to debug installer 2017-02-09 12:49:51 +00:00
Andrew Nelless
31680ee252 Add debug CRT to WiX installer when building Debug configuration 2017-02-08 17:25:55 +00:00
Andrew Nelless
39e0974f71 Add debug library support to WiX installer 2017-02-08 16:50:25 +00:00
Andrew Nelless
2e4a22c440 Use relative output paths in WiX 2017-02-08 16:02:58 +00:00
Andrew Nelless
271418a0ba Fix WiX registry key components 2017-02-08 15:53:33 +00:00
Andrew Nelless
8f17659d43 Fix OpenSSL binary paths in WiX 2017-02-08 15:30:39 +00:00
Andrew Nelless
4263fd1717 Rename synergy library to synlib to work around conflict with GUI 2017-02-08 15:11:21 +00:00
Andrew Nelless
31a7fb395c Restore GUI v1 executable name 2017-02-08 12:40:34 +00:00
Andrew Nelless
6a5abbe3c2 Change OpenSSL binary path (again) 2017-02-08 12:38:59 +00:00
Andrew Nelless
839318add6 Remove hardcoded filepaths in WiX project 2017-02-08 11:18:35 +00:00
Andrew Nelless
196fa02443 Disable warnngs as errors on Windows 2017-02-08 00:55:56 +00:00
Andrew Nelless
7d3531e3c2 Copy WiX setup files to build directory 2017-02-08 00:46:37 +00:00
Andrew Nelless
f9b3969f72 Fix up Synergy version number 2017-02-07 23:01:01 +00:00
Andrew Nelless
b52cadd1f7 Revert "Remove ugly Synergy version from about dialog"
This reverts commit 7cd4642e92.
2017-02-07 22:24:55 +00:00
Andrew Nelless
7c9f99a378 Add build properties 2017-02-07 21:58:31 +00:00
Andrew Nelless
15885086fa Make CMake configure WiX 2017-02-07 17:07:11 +00:00
Andrew Nelless
9fbec1184e Cleanup WiX and make it configuration ready 2017-02-07 16:41:58 +00:00
Andrew Nelless
5f3bf6ddeb Correct OpenSSL case 2017-02-07 15:25:04 +00:00
Andrew Nelless
f8b7282db1 Titlecase synergy.* 2017-02-07 14:58:42 +00:00
Andrew Nelless
b9d12e2197 Reindent WiX XML 2017-02-07 14:05:16 +00:00
Andrew Nelless
7161e28cf6 Put binaries into install directory 2017-02-07 12:32:37 +00:00
Andrew Nelless
e4db361d62 Ensure source tree is clean after build 2017-02-07 12:28:18 +00:00
Andrew Nelless
e3f3b7424c Fix bonjour linkage on non-Windows platforms 2017-02-07 01:35:07 +00:00
Andrew Nelless
7cd4642e92 Remove ugly Synergy version from about dialog 2017-02-07 01:29:27 +00:00
Andrew Nelless
82a4b859c3 Make it clear was BUILD_SERVICE does 2017-02-07 01:27:15 +00:00
Andrew Nelless
c297fced3d Update OpenSSL to v1.0.2k 2017-02-07 01:27:15 +00:00
Andrew Nelless
c0e812a57a Move and update OpenSSL license 2017-02-07 01:27:15 +00:00
Andrew Nelless
0d404cd659 Delete old build system and cruft 2017-02-07 01:27:15 +00:00
Andrew Nelless
1a536acdff Add Qt5 core module to GUI1 linkage 2017-02-07 01:27:15 +00:00
Andrew Nelless
e779b2b49a Remove redundant OS_TARGET_* definitions 2017-02-07 01:27:15 +00:00
Andrew Nelless
ccda3a6e4f Add core to GUI1 linkage 2017-02-07 01:27:11 +00:00
Andrew Nelless
6a27ad617a Remove spacify filter 2017-02-07 01:25:01 +00:00
Andrew Nelless
b46daccc29 Fix ODR violation of EventQueueTimer base class 2017-02-07 01:25:01 +00:00
Andrew Nelless
6bb3a921e6 Remove OpenSSL binaries for macOS 2017-02-07 01:25:00 +00:00
Andrew Nelless
3733290442 Remove old OpenSSL binaries for Windows 2017-02-07 01:25:00 +00:00
Andrew Nelless
e86029d7ea Fix up OpenSSL paths in CMake and WiX 2017-02-07 01:25:00 +00:00
Andrew Nelless
d95b39bb70 Remove duplicate OpenSSL headers on OS X 2017-02-07 01:25:00 +00:00
Andrew Nelless
c85ad6cd06 Relocate OS X OpenSSL binaries 2017-02-07 01:25:00 +00:00
Andrew Nelless
0c0a969c5a Add MSVC14 builds of OpenSSL 1.0.2j for Win32 and Win64 2017-02-07 01:25:00 +00:00
XinyuHou
cd8d4107e8 Remove duplicate openssl include files 2017-02-07 01:25:00 +00:00
XinyuHou
2abfd7a0d5 Convert tabs into spaces 2017-02-07 01:25:00 +00:00
Jerry (Xinyu Hou)
c79759115b Use 64 bit openssl on Mac 2017-02-07 01:24:59 +00:00
Jerry (Xinyu Hou)
84c8c891af Restructure the openssl lib for both 32 and 64 bit on Mac 2017-02-07 01:24:59 +00:00
Jerry (Xinyu Hou)
ed16db9df6 Ignore deprecated warning on Mac 2017-02-07 01:24:59 +00:00
XinyuHou
e58bbd197f Always build old GUI 2017-02-07 01:24:59 +00:00
XinyuHou
c960bdb6db Use Ascii rather than Unicode GUI project 2017-02-07 01:24:59 +00:00
XinyuHou
1d2932df4f Fix ui file using wrong path 2017-02-07 01:24:59 +00:00
XinyuHou
c6cab74481 Change tab to spaces in commands1.py 2017-02-07 01:24:59 +00:00
XinyuHou
deea23f866 Apply tab to spaces filter to src folder 2017-02-07 01:24:59 +00:00
XinyuHou
4902b8674c Add git attributes to use filter to convert tabs to 4 spaces 2017-02-07 01:24:58 +00:00
XinyuHou
7f2b25d453 Compile old GUI on Windows only 2017-02-07 01:24:58 +00:00
Andrew Nelless
a76ae31126 Fix OpenService buffer for building with narrow char type 2017-02-07 01:24:58 +00:00
XinyuHou
0d8bc9d7e2 Remove all xcopy commands in cmake 2017-02-07 01:24:58 +00:00
Andrew Nelless
e0b4561e55 Re-enable building GUI 2017-02-07 01:24:58 +00:00
Andrew Nelless
abeedf9bcc Add CMake build option for GUI 2017-02-07 01:24:58 +00:00
Andrew Nelless
b405f4e476 Remove unused GUI source files 2017-02-07 01:24:58 +00:00
Andrew Nelless
14aa1cfd82 Move Qt UI files to source directory 2017-02-07 01:24:58 +00:00
Andrew Nelless
5fdf50ce93 Fix missing trailing slashes in xcopy command 2017-02-07 01:24:58 +00:00
Andrew Nelless
0322cf0112 Fix missing trailing slashes in xcopy command 2017-02-07 01:24:58 +00:00
Andrew Nelless
0feb5df327 Remove usynergy 2017-02-07 01:24:51 +00:00
Andrew Nelless
1759afd82d Remove synergyp 2017-02-07 01:24:33 +00:00
Andrew Nelless
790d108a56 Remove useless OpenSSL tarball 2017-02-07 01:24:33 +00:00
Andrew Nelless
d37920364d Unzip GTest and GMock and remove zip handling code 2017-02-07 01:24:32 +00:00
Jerry (Xinyu Hou)
72c394208f Fix Mac warning ⚠️ 2017-02-07 01:24:32 +00:00
Jerry (Xinyu Hou)
eb0e5a9ecd Only copy binaries to ROOT/bin on Windows 2017-02-07 01:24:32 +00:00
Jerry (Xinyu Hou)
2a333b7fbf Copy binaries and libs into ROOT/bin 2017-02-07 01:24:32 +00:00
Andrew Nelless
680c9b4078 Merge changes from v1.8.8-rc1 2017-02-06 14:28:20 +00:00
Andrew Nelless
fc3cc78c3e Update changelog... again 2017-02-06 12:47:19 +00:00
Martin Wilck
ed17e9275d XRandR: fix screen size calculation
XWindowsScreen::saveShape() using XRRSizes / XRRRotations to
calculate screen dimensions when XRandR and a rotated screen
was detected. This is wrong. The screen dimensions in the
display properties already reflect rotation.

Moreover, on servers supporting XRandR >= 1.2, the XRRSizes()
and XRRRotations calls from XRandR 1.1 will return the
properties of the "primary output" in XRandR 1.2 terms rather than
the properties of the entire screen.
2017-02-06 12:45:39 +00:00
Andrew Nelless
2d9ed0d335 Updated Changelog 2017-02-06 12:04:52 +00:00
Andrew Nelless
2643cea67b #5074 Nuke -Werror. It's dumb right now 2017-02-06 11:10:26 +00:00
Andrew Nelless
4b913b5599 v1.8.8-rc1 2017-01-31 12:39:18 +00:00
Reinder Feenstra
1499f7b27c #5525 Add support for floating point start/end range values 2017-01-25 21:11:13 +00:00
Jiwoong Yoo
f35e3e5e06 #5578 Virtual key table mapped for inactive IMEs
Virtual key table is mapped for all IMEs not just active IME.

And this causes the wrong modifier key to be pressed. For example, if you use Korean and Japanese IMEs, pressing the Hangul key makes alt key pressed. So when I press just 'a', client interprets that as 'alt-a'.
2017-01-25 21:07:44 +00:00
Jiwoong Yoo
180d3e57d2 #5196 Korean and Japanese keyboards have same key code 2017-01-25 21:04:13 +00:00
Mike Hobbs
adf34eba40 #5785 Fix screen switch problem when cursor is in a corner 2017-01-25 20:55:20 +00:00
Andrew Nelless
b5a81579ed #5809 macOS: Add a version key to Info.plist 2017-01-25 20:46:59 +00:00
James McMullan
0eff5a95be #3992 macOS: Dragging broken in Unity
OSXScreen was not adding mouse movement deltas to mouse events while
dragging. Some 3D applications rely on these deltas to implement
dragging. Adding the mouse deltas to the mouse event fixes dragging in
these applications. Ex: Unity3d
2017-01-25 20:46:00 +00:00
Andreas Eriksson
ba55369d42 #3197 Disable regular motion events when using XInput 2 2017-01-25 20:36:56 +00:00
Jee-Yong Um
8e6bf53233 #4504 Improve Korean language description 2017-01-25 20:32:59 +00:00
Christian Schmidt
21d4e6a908 #4477 Only allow mouse buttons 1-10 for XTestFakeButtons call.
These are the only valid ones:
[~]>for i in `seq 0 1 11`; do echo Testing $i; xte "mouseclick $i"; done
Testing 0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  132 (XTEST)
  Minor opcode of failed request:  2 (X_XTestFakeInput)
  Value in failed request:  0x0
  Serial number of failed request:  12
  Current serial number in output stream:  15
Testing 1
Testing 2
Testing 3
Testing 4
Testing 5
Testing 6
Testing 7
Testing 8
Testing 9
Testing 10
Testing 11
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  132 (XTEST)
  Minor opcode of failed request:  2 (X_XTestFakeInput)
  Value in failed request:  0xb
  Serial number of failed request:  12

And there are mice out there where buttons 11+ can be pressed accidentally,
terminating the synergy client and often leaving the system in a bad state.
2017-01-25 20:30:15 +00:00
zbrode
f5944278ed #4419 We never define _BYTE_ORDER so don't test for it. 2017-01-25 20:28:11 +00:00
Fábio Oliveira
3d3b7ca881 #4288 Remove auto Alt+Printscreen on Windows
As per issue https://github.com/synergy/synergy/issues/4288
2017-01-25 20:25:49 +00:00
伊冲
3bb833b798 #4193 System tray is unavailable on KDE5 2017-01-21 11:28:12 +00:00
Nye Liu
a5140aa1b9 Fix typo in compiler flags 2017-01-21 11:12:27 +00:00
Andrew Nelless
c27c094f9c Merge changes from v1.8.6 and v1.8.7 2017-01-20 23:18:03 +00:00
Andrew Nelless
9799e96903 Update changelog for v1.8.7 2017-01-19 13:18:10 +00:00
XinyuHou
487d8c99a1 Merge branch 'issue5784-edition-switching' into v1.8.7 2017-01-18 12:44:10 +00:00
XinyuHou
fd6ea65f1a Version to1.8.7-stable 2017-01-18 12:43:17 +00:00
Jerry (Xinyu Hou)
b69570ec2c #5784 Fix using the wrong serial key 2016-12-28 15:57:15 +00:00
XinyuHou
ade4b7f8a2 Merge branch 'v1.8.6' 2016-12-12 18:32:00 +00:00
XinyuHou
2ab21aaa01 Version to 1.8.6-stable 2016-12-12 16:55:31 +00:00
XinyuHou
5061f51a66 Update Changelog 2016-12-12 16:55:05 +00:00
XinyuHou
c31f908fb2 Fix warning in IPC proxy classes 2016-12-07 17:35:52 +00:00
XinyuHou
74d63df244 Fix incorrect check of return code from dup 2016-12-07 17:28:15 +00:00
XinyuHou
3b92a87261 Merge branch 'beefnog-mac-directions' of https://github.com/beefnog/synergy into beefnog-beefnog-mac-directions 2016-12-07 17:13:47 +00:00
XinyuHou
c764e26144 Merge branch 'mac-msg' of https://github.com/j2gl/synergy into j2gl-mac-msg 2016-12-07 16:39:40 +00:00
XinyuHou
e1dc29799f Fix wrong usage example in hm 2016-12-06 15:18:18 +00:00
Epakai
4297673387 spelling error "implmented => implemented" 2016-12-06 14:56:47 +00:00
Epakai
72b1ebcdb2 spelling error "unknow => unknown" 2016-12-06 14:56:38 +00:00
XinyuHou
a49de58738 #5752 Correct tab order in settings dialog 2016-12-06 12:03:40 +00:00
XinyuHou
d8cd60f057 Version to 1.8.6-rc2 2016-12-06 11:22:54 +00:00
Jerry (Xinyu Hou)
00db51cd93 Ask for logs in issue template 2016-12-05 11:01:53 +00:00
Jerry (Xinyu Hou)
e8145aa779 #5592 Post keyboard events to lower level HID client 2016-11-22 15:19:58 +00:00
Jerry (Xinyu Hou)
a19ce2da96 Remove DPI manifest file 2016-11-16 17:08:59 +00:00
Jerry (Xinyu Hou)
c79ef74392 Move OpenSSL directory definiation to root CMakeLists 2016-11-16 16:55:20 +00:00
Jerry (Xinyu Hou)
f0601119ab Option to build service or not 2016-11-16 16:19:25 +00:00
Jerry (Xinyu Hou)
7c12608f20 Merge remote-tracking branch 'origin/issue5722-malformed-keys' into v1.8.6 2016-11-11 11:40:17 +00:00
Jerry (Xinyu Hou)
265cc5c687 Merge branch 'issue5699-unified-installers' into v1.8.6 2016-11-03 17:28:00 +00:00
Jerry (Xinyu Hou)
a279348cf9 Merge branch 'issue5186-different-dpi' into v1.8.6 2016-11-03 17:27:24 +00:00
Jerry (Xinyu Hou)
e6ca9e417d #5699 load deploy target on load config so dist command is aware of it 2016-11-03 16:42:38 +00:00
Andrew Nelless
f2f4b05c6f #5699 Only put MacOSX version number in filename when deploying for exact SDK 2016-11-03 14:55:36 +00:00
Jerry (Xinyu Hou)
b8233fc146 #5186 Add deprecated arguments warnings 2016-11-03 14:31:27 +00:00
Jerry (Xinyu Hou)
5cccac360c #5699 Add deploy target to GUI configure 2016-11-02 11:55:39 +00:00
Andrew Nelless
24a548273e #5722 Trim serial keys already stored 2016-11-02 11:28:04 +00:00
Andrew Nelless
1a7920f80d #5722 Make LicenseManager accept SerialKey object instead of string 2016-11-01 17:29:25 +00:00
Jerry (Xinyu Hou)
7ce6905935 Version to 1.8.6-rc1 2016-11-01 15:22:33 +00:00
Jerry (Xinyu Hou)
340ee43d90 #5699 Add Mac deploy argument in configure command
If deploy target is not specified, it would use the specified sdk
version
2016-10-31 17:40:54 +00:00
Jerry (Xinyu Hou)
514e2475c3 Merge branch 'v1.8.6' into issue5186-different-dpi 2016-10-31 16:31:30 +00:00
Andrew Nelless
96efe5fb73 Merge changes from v1.8.5 2016-10-31 16:14:39 +00:00
Andrew Nelless
6a7703f229 Merge branch 'v1.8.5' 2016-10-31 14:53:34 +00:00
Jerry (Xinyu Hou)
a18eba7520 Version to 1.8.5-stable 2016-10-31 12:45:42 +00:00
Jerry (Xinyu Hou)
20a34e5abf Update changelog for 1.8.5-stable 2016-10-31 12:45:20 +00:00
Jerry (Xinyu Hou)
771d2a419b Fix 1.8.4 changelog 2016-10-31 12:38:16 +00:00
Andrew Nelless
c9bb421fb5 Version to v1.8.5-rc2 2016-10-28 17:48:20 +01:00
Andrew Nelless
2f2dd7742f #5707 Don't send update notifications for new users 2016-10-28 17:45:58 +01:00
Andrew Nelless
3e9815dfdd #5707 Add newline to update notification string 2016-10-28 17:45:52 +01:00
Andrew Nelless
ef9842c819 #5707 Change update notification url 2016-10-28 17:45:47 +01:00
Andrew Nelless
af62174b59 #5707 Only notify activation on user action 2016-10-28 17:45:42 +01:00
Andrew Nelless
af9037276c #5707 Prefer 'update' over 'upgrade' 2016-10-28 17:45:35 +01:00
Andrew Nelless
fa7daa48f7 Revert "Update buildbot to Qt 4.8.7"
This reverts commit b7e0473cb4.
2016-10-28 17:45:34 +01:00
Andrew Nelless
73685c3d92 #5707 Tweak notify url for upgrades 2016-10-28 17:45:30 +01:00
Andrew Nelless
4206799ae3 #5707 Add from and to version numbers to version update notification 2016-10-28 17:45:26 +01:00
Andrew Nelless
2de06b9727 #5707 Add support for upgrade notifications 2016-10-28 17:45:20 +01:00
Andrew Nelless
9f1e91cc76 Remove pointless call to curl_free 2016-10-28 17:45:18 +01:00
Andrew Nelless
906fd15b4a #5707 Store and update last version uses in settings 2016-10-28 17:45:13 +01:00
Jerry (Xinyu Hou)
8d193c76b5 #5186 Apply DPI aware option in local machine rather than current user in registry 2016-10-28 06:00:46 -07:00
Jerry (Xinyu Hou)
0d4fd6dcef #5186 Reorder some functions call to make it clear 2016-10-28 06:00:11 -07:00
Jerry (Xinyu Hou)
c2372bc9a8 #5186 Remove accumulate fraction DPI calculation 2016-10-28 05:24:07 -07:00
Jerry (Xinyu Hou)
cf397a0d6f #5186 Remove Dpi calculation code 2016-10-28 04:50:06 -07:00
Jerry (Xinyu Hou)
c62c4d503d #5186 Remove dpiaware manifest 2016-10-28 03:38:08 -07:00
Jerry (Xinyu Hou)
640262dfff #5186 Only add DPI related registry key on Windows 8 or above 2016-10-26 08:43:55 -07:00
Jerry (Xinyu Hou)
6b0cd35527 #5186 Update registry keys to enable Windows 7 compatibility and disable DPI scaling 2016-10-26 08:10:09 -07:00
Andrew Nelless
b7e0473cb4 Update buildbot to Qt 4.8.7 2016-10-26 15:34:36 +01:00
Andrew Nelless
f08f0b3f37 #5657 Fix activation dialog tab order 2016-10-25 16:40:33 +01:00
Andrew Nelless
492df1f3fd #5657 Stop service and refresh license when trial expires 2016-10-25 16:27:12 +01:00
Andrew Nelless
b66043e000 #5657 Tweak plurality of trial countdown 2016-10-20 17:59:03 +01:00
Andrew Nelless
a59c437fd3 Merge icon reversion 2016-10-20 14:55:55 +01:00
Andrew Nelless
1842a68a0e #5657 Always show trial counter, fix plurality 2016-10-20 14:55:21 +01:00
Jerry (Xinyu Hou)
e17130f060 Revert "#5640 Update icon to the new hotness"
This reverts commit 833c73f1bd.
2016-10-20 14:02:47 +01:00
Jerry (Xinyu Hou)
3048ca5fc6 Revert "#5640 About dialog tweaks"
This reverts commit 03b8788660.
2016-10-20 14:02:34 +01:00
Jerry (Xinyu Hou)
bdf5546058 Revert "#5640 About dialog tweaks"
This reverts commit 9837c982cd.
2016-10-20 14:02:01 +01:00
Andrew Nelless
7bae07d34e #5657 Merge trial support 2016-10-20 11:30:25 +01:00
Andrew Nelless
868887155d #5657 Update buy now links 2016-10-20 11:30:02 +01:00
Andrew Nelless
ae590907a8 #5657 Remind users to activate all devices if they might be using SSL 2016-10-19 17:50:44 +01:00
Andrew Nelless
f2a1d962bc #5657 Fix skip activation loop 2016-10-19 17:40:34 +01:00
Andrew Nelless
e01d0ce4c7 #5657 Raise activation dialog when key expires 2016-10-19 16:01:15 +01:00
Andrew Nelless
f441c24a23 #5657 Minor activation UI tweaks 2016-10-19 11:36:48 +01:00
Jerry (Xinyu Hou)
984ca48f34 Merge remote-tracking branch 'origin/issue5620-sierra' into v1.8.5 2016-10-19 10:54:31 +01:00
Andrew Nelless
6a7d1dd43c #5657 Merge core fixes for trial support 2016-10-19 10:46:52 +01:00
Andrew Nelless
47913e57b8 #5657 Raise activation dialog when trial expires 2016-10-18 18:45:15 +01:00
Andrew Nelless
02c23905d6 #5657 Handle expired keys properly 2016-10-18 17:01:44 +01:00
Jerry (Xinyu Hou)
dc4beba9e9 #5680 Stop deleting socket twice if it's been adopted by PacketStream 2016-10-18 16:48:32 +01:00
Jerry (Xinyu Hou)
dfc7c31d67 #5657 Delay auto client adding while activation dialog is shown 2016-10-18 15:43:15 +01:00
Andrew Nelless
020b7974df #5657 Fix trial warning label and serial key serialisation 2016-10-18 15:32:59 +01:00
Josh Harris
17961501f6 Update ISSUE_TEMPLATE.md
Moved the 'Server' and 'Client' fields around
2016-10-18 15:26:56 +01:00
Andrew Nelless
e5aae66ff7 #5657 Don't clear edition when appconfig contains an invalid serial key 2016-10-18 15:13:19 +01:00
Jerry (Xinyu Hou)
880864a249 Version to 1.8.5-rc1 2016-10-18 14:57:34 +01:00
Jerry (Xinyu Hou)
45f37c508c #5657 Make serial key argument for server only 2016-10-18 14:56:48 +01:00
Jerry (Xinyu Hou)
e48be9099d #5657 Remove whitespace for serial key input 2016-10-18 13:05:29 +01:00
Jerry (Xinyu Hou)
e65631c451 #5657 Fix wrong logic about checking if serial key expired 2016-10-18 13:02:36 +01:00
Andrew Nelless
859608424d #5657 Link synergyd against Synergy shared library 2016-10-17 18:06:29 +01:00
Andrew Nelless
98610fabde #5657 Remove unused CoreInterfaces 2016-10-17 17:59:01 +01:00
Andrew Nelless
fc67cdf56e #5657 Rename SubscriptionManager to LicenseManager 2016-10-17 17:57:14 +01:00
Andrew Nelless
5a34da3ce0 #5657 Refresh UI when synergys reports trial expired 2016-10-17 17:49:14 +01:00
Andrew Nelless
99dbdc5eb3 #5657 Use SerialKey class in ServerArgs 2016-10-17 17:38:05 +01:00
Andrew Nelless
88c59b4ca6 #5657 Fix unit tests after SerialKey::isValid removal 2016-10-17 17:37:30 +01:00
Andrew Nelless
599415f047 #5657 Only check trial times when using a trial 2016-10-17 17:11:30 +01:00
Andrew Nelless
8b4d7abfb0 #5657 Remove SerialKey::m_valid 2016-10-17 17:08:26 +01:00
Andrew Nelless
c7dc198d82 #5657 Fix SerialKey whitespace 2016-10-17 16:34:44 +01:00
Andrew Nelless
b5a6ae0a94 #5657 Fix SerialKey expiring unit test 2016-10-17 16:27:40 +01:00
Andrew Nelless
7eefa49c77 #5657 Fix SerialKey construction in unit tests 2016-10-17 16:12:33 +01:00
Andrew Nelless
714b2f6440 #5657 Make trial expiry notification live 2016-10-17 15:26:42 +01:00
Andrew Nelless
e05ced287c #5657 Enable external links on trial label 2016-10-17 11:57:32 +01:00
Andrew Nelless
e14ff8935b #5657 Fix SerialKey unit test 2016-10-15 16:25:04 +01:00
Andrew Nelless
0dd0e65e2a #5657 Remove more C++11 enum qualifiers 2016-10-15 16:07:05 +01:00
Andrew Nelless
b20d04d80c #5657 Add missing include for runtime_error 2016-10-15 15:59:27 +01:00
Andrew Nelless
3ee9ac5d49 #5657 Remove C++11 enum qualifier 2016-10-15 15:49:36 +01:00
Andrew Nelless
4ad7c7fe39 #5657 Rename edition to activeLicense. WSFs 2016-10-15 15:30:28 +01:00
Andrew Nelless
3b98a7b785 #5657 Add trial label to main window 2016-10-15 14:58:03 +01:00
Andrew Nelless
1f93b4a918 #5657 Rename dayLeft to daysLeft in unit tests 2016-10-15 12:37:00 +01:00
Andrew Nelless
d244683ac4 #5657 Merge core changes 2016-10-15 12:03:55 +01:00
XinyuHou
dc31f395cc #5657 Fixed integtests using the old server constructor 2016-10-14 09:44:02 -07:00
Andrew Nelless
55414e4581 #5657 Make SubscriptionManager backward compatible 2016-10-14 17:38:31 +01:00
Jerry (Xinyu Hou)
89851fddc3 #5657 Exited server if trial is expired 2016-10-14 17:14:21 +01:00
Jerry (Xinyu Hou)
2b1b0640ea #5657 Added serial argument parsing unit test 2016-10-14 13:51:46 +01:00
Jerry (Xinyu Hou)
92b29276d0 #5657 Added serial argument in core 2016-10-14 13:51:27 +01:00
Jerry (Xinyu Hou)
1e5dfd3cb5 #5657 Added more unit tests for member functions in SerialKey 2016-10-14 12:43:58 +01:00
Jerry (Xinyu Hou)
dce4b382e6 #5657 Fixed passing in the raw serial key 2016-10-14 12:43:33 +01:00
Jerry (Xinyu Hou)
33ebe61ef2 #5657 Counted expiring within 1 day as 1 day left 2016-10-14 12:43:01 +01:00
Andrew Nelless
727fc5c220 #5659 Move activation notification to SubscriptionManager 2016-10-14 12:16:23 +01:00
Andrew Nelless
540882056f #5657 Create a global SubscriptionManager instance 2016-10-14 11:59:25 +01:00
Andrew Nelless
743e96f277 #5657 Don't store activation email 2016-10-14 11:35:33 +01:00
Andrew Nelless
fd8e778b2a #5657 Fix serial key file path in GUI 2016-10-14 11:35:33 +01:00
Jerry (Xinyu Hou)
719e64dc8f #5657 Added missing dependencies on Linux and Windows 2016-10-13 18:07:21 +01:00
Jerry (Xinyu Hou)
235f528dd9 #5657 Added unit tests for SerialKey 2016-10-13 17:55:38 +01:00
Jerry (Xinyu Hou)
2a452307cd #5657 Fleshed out the implementation of SerialKey 2016-10-13 17:55:09 +01:00
Jerry (Xinyu Hou)
92a885524b #5657 Added temporary implementation for SerialKey 2016-10-13 14:00:19 +01:00
Jerry (Xinyu Hou)
92680b2877 #5657 Extracted shared code between GUI and core 2016-10-13 13:53:09 +01:00
Jerry (Xinyu Hou)
82e55702ef #5657 Removed serial key code from syntool 2016-10-13 11:20:43 +01:00
Jerry (Xinyu Hou)
4be9fc1800 Removed unused code 2016-10-13 11:18:03 +01:00
Jerry (Xinyu Hou)
d92fcd2453 #5657 Added version 2 trial serial key support 2016-10-13 11:15:38 +01:00
Jerry (Xinyu Hou)
c7cd74ab5f Fixed code style 2016-10-13 11:11:56 +01:00
Jerry (Xinyu Hou)
817f8f2bcb Updated git ignore list 2016-10-13 11:11:37 +01:00
Andrew Nelless
c21fc4a6dd #3797 Revert to using hardcoded SDK path for buildbot 2016-10-12 16:50:11 +01:00
Andrew Nelless
5ea1fdc7c6 #5620 Remove deprecated NXClickTime call 2016-10-12 16:10:57 +01:00
Andrew Nelless
df88faaad8 #5620 Convert OSXScreen into Objective C++ 2016-10-12 15:43:01 +01:00
rishubil
d1396c9767 #3797 Fix "Unix Makefile" build on macOS 2016-10-12 15:30:58 +01:00
Andrew Nelless
2b9f48602c #5620 Make Xcode 8 happy with null cast 2016-10-12 15:09:29 +01:00
Jerry (Xinyu Hou)
a50ae2ad36 Fixed code style 2016-10-12 12:59:38 +01:00
Jerry (Xinyu Hou)
fc879323bc #5657 Removed password log in in activation window 2016-10-12 12:56:52 +01:00
Andrew Nelless
964f1aa093 Merge changes made in v1.8.4 2016-10-12 10:41:44 +01:00
Andrew Nelless
a6ff90794f v1.8.4 stable 2016-10-11 10:14:27 +01:00
Andrew Nelless
0e209aa903 Update Changelog 2016-10-11 10:13:50 +01:00
Andrew Nelless
fcd8153002 v1.8.4 rc3 2016-10-06 15:49:44 +01:00
Andrew Magill
217eb475de #5183 Accumulate fractional moves across updates. 2016-10-06 15:42:29 +01:00
Andrew Nelless
42ba77ae04 v1.8.4 rc2 2016-10-06 13:11:07 +01:00
Andrew Nelless
9ae146add0 Merge branding changes into v1.8.4 2016-10-06 13:04:28 +01:00
Andrew Nelless
ef3b79e585 Merge activation dialog branch into v1.8.4 2016-10-06 13:01:18 +01:00
Andrew Nelless
9837c982cd #5640 About dialog tweaks 2016-10-06 12:58:57 +01:00
Andrew Nelless
742cd70f98 #5627 Toggle fingerprint visibility when toggling SSL state 2016-10-06 11:29:34 +01:00
Andrew Nelless
176d7c9286 Update installer graphics 2016-10-05 22:12:00 +01:00
Andrew Nelless
03b8788660 #5640 About dialog tweaks 2016-10-05 21:53:58 +01:00
Andrew Nelless
833c73f1bd #5640 Update icon to the new hotness 2016-10-05 21:53:54 +01:00
Andrew Nelless
6892664f4a Fix cast of XRRNotifyEvent 2016-10-05 15:10:40 +01:00
Andrew Nelless
360d5a7c17 Merge Linux xrandr branch into v1.8.4 2016-10-05 15:05:31 +01:00
Andrew Nelless
dd88e324d7 #4420 Send screen shape change event on Linux (xrandr) 2016-10-05 12:54:57 +01:00
Benedikt Morbach
5b7392d302 #4420 Fix check for XRRNotifyEvent
use CheckTypeSize instead of CheckSymbolExists

From http://www.cmake.org/cmake/help/v3.0/module/CheckSymbolExists.html :
    If the symbol is a type or enum value it will not be recognized
    (consider using CheckTypeSize or CheckCSourceCompiles).
2016-10-05 12:54:57 +01:00
Andrew Nelless
26c11ec3c9 Restore horrible reinterpret_casts in OSXUchrKeyResource 2016-10-05 12:46:17 +01:00
Andrew Nelless
602fd3f649 Restore safe reinterpret_casts in OSXKeyState 2016-10-05 12:46:17 +01:00
Andrew Nelless
8072594008 Restore safe reinterpret_casts in OSXClipboardBMPConverter 2016-10-05 12:46:17 +01:00
Andrew Nelless
23cf284a66 Restore safe reinterpret_casts in MSWindowsClientTaskBarReceiver 2016-10-05 12:46:17 +01:00
Andrew Nelless
19b9be4593 Restore safe reinterpret_casts in MSWindowsScreenSaver 2016-10-05 12:46:17 +01:00
Andrew Nelless
788f6eab9f Restore safe reinterpret_casts in MSWindowsScreen 2016-10-05 12:46:17 +01:00
Andrew Nelless
2a5dc62747 Restore safe reinterpret_casts in MSWindowsDesks 2016-10-05 12:46:17 +01:00
Andrew Nelless
f7ad162634 Fix up casts in MSWindowsClipboardBitmapConverter 2016-10-05 12:46:17 +01:00
Andrew Nelless
2e30dc2c68 Restore safe reinterpret_cast of Windows thread handle 2016-10-05 12:46:17 +01:00
Andrew Nelless
702f095efd Fix cast in Windows TaskBar 2016-10-05 12:46:17 +01:00
Andrew Nelless
7e386c0bf9 Fix cast of port number in Winsock 2016-10-05 12:46:16 +01:00
Andrew Nelless
d77b5f1176 Restore safe reinterpret_casts in Windows TaskBar 2016-10-05 12:46:16 +01:00
Andrew Nelless
5a03e37d15 Restore safe reinterpret_casts in misc Windows code 2016-10-05 12:46:16 +01:00
Andrew Nelless
f1cd215f28 Restore safe reinterpret_cast in Synergy GUI 2016-10-05 12:46:16 +01:00
Andrew Nelless
0568271506 Partially remove reinterpret_casts in network tests 2016-10-05 12:46:16 +01:00
Andrew Nelless
a13dc92f2e Restore safe reinterpret_casts in SecureSocket 2016-10-05 12:46:16 +01:00
Andrew Nelless
16977788d3 Restore safe reinterpret_casts in XWindowsClipboardBMPConverter 2016-10-05 12:46:16 +01:00
Andrew Nelless
5b8fb69124 Partially de-reinterpret_cast XWindowsClipboard 2016-10-05 12:46:16 +01:00
Andrew Nelless
5272c9dde4 Restore safe reinterpret_casts in XWindowsUtil 2016-10-05 12:46:16 +01:00
Andrew Nelless
50807bfcb6 Restore safe reinterpret_casts in XWindowsScreen 2016-10-05 12:46:16 +01:00
Andrew Nelless
055370412c Restore safe reinterpret_cast in clipboard converter 2016-10-05 12:46:16 +01:00
Andrew Nelless
fb5e2bb171 Restore safe reinterpret_cast in readUInt32 2016-10-05 12:46:16 +01:00
Andrew Nelless
e81f7ab8c7 Replace unsafe casts with memcpy ops 2016-10-05 12:46:16 +01:00
Andrew Nelless
90c3dd6622 Restore evil-enabling reinterpret_cast in SocketMultiplexer 2016-10-05 12:46:16 +01:00
Andrew Nelless
0371002497 Restore use of reinterpret_cast in unicode routines 2016-10-05 12:46:16 +01:00
Andrew Nelless
f174614655 Remove bizarre cast of sockaddr to char* 2016-10-05 12:46:16 +01:00
Andrew Nelless
9ed9bde4e7 Restore use of reinterpret_cast for sockaddr_in 2016-10-05 12:46:16 +01:00
Andrew Nelless
f3d1470e58 Brutally replace all reinterpret_casts with static_casts 2016-10-05 12:46:16 +01:00
Andrew Nelless
e6a3caaf75 #5628 Fix net lib linkage on Ubuntu 2016-10-04 15:51:07 +01:00
Andrew Nelless
b345eb4067 v1.8.4-rc1 2016-10-04 15:30:53 +01:00
Andrew Nelless
0c76f9feeb Merge DPI scaling branch 2016-10-04 15:29:29 +01:00
Andrew Nelless
d99bd8e031 Merge fix for #5329 2016-10-04 15:23:27 +01:00
Andrew Nelless
c288918d68 #5629 Fix height of settings dialog 2016-10-04 15:12:27 +01:00
Andrew Nelless
002bcebbd2 #5629 Fix main window AppConfig naming conventions 2016-10-04 13:47:28 +01:00
Andrew Nelless
783056f7cc #5629 Ensure setEdition signals main UI 2016-10-04 13:41:27 +01:00
Andrew Nelless
15f2e27d18 #5629 Show the main window behind the activation dialog 2016-10-04 11:48:47 +01:00
Andrew Nelless
16ef224ba8 #5629 Save activation dialog seen state on reject 2016-10-04 11:15:53 +01:00
Andrew Nelless
603b12dc59 #5629 Trigger main window show event before opening activation dialog 2016-10-04 10:45:27 +01:00
Andrew Nelless
15a6a27dc6 #5629 Show activation dialog only after main window 2016-10-03 19:48:05 +01:00
Andrew Nelless
176d7e4725 #5617 Don't copy plugins directory on Windows 2016-10-03 19:47:55 +01:00
Andrew Nelless
912ed9be9c #5629 Ensure settings are saved when AppConfig updates them 2016-10-03 19:47:45 +01:00
Andrew Nelless
d1a180f652 #5627 Automatically generate SSL cert when enabling SSL 2016-10-03 19:47:38 +01:00
Andrew Nelless
32f143f52b #5627 Update Main Window fingerprint after SSL cert gen 2016-10-03 19:47:32 +01:00
Andrew Nelless
d6bcdcbea7 #5629 Change activation failure to a QDialog 2016-10-03 19:47:24 +01:00
Andrew Nelless
c799041ce8 #5627 Only generate an SSL certificate when it doesn't exist 2016-10-03 19:47:18 +01:00
Andrew Nelless
4924f2faff #5627 Save settings after creating MainWindow 2016-10-03 19:47:06 +01:00
Andrew Nelless
d6b7d8e357 #5627 Enable encryption for Pro users 2016-10-03 19:46:52 +01:00
Andrew Nelless
2809530793 #5629 Remove 'Run Wizard' from file menu 2016-10-03 19:46:48 +01:00
Andrew Nelless
bcf2d5de0d #5629 Trigger activation dialog if previously unseen 2016-10-03 19:46:43 +01:00
Andrew Nelless
02d75cd370 #5603 Ignore exceptions in getOSInformation() 2016-10-03 19:46:41 +01:00
Andrew Nelless
088ac82e18 #5629 Remove activation from the wizard 2016-10-03 19:46:25 +01:00
Andrew Nelless
6033f0c946 #5629 Minor grammar tweaks 2016-10-03 19:46:20 +01:00
Andrew Nelless
0f95c6e941 #5629 Complete activation support for activation dialog 2016-10-03 19:46:06 +01:00
Andrew Nelless
8788faffdd Enable Windows 7 compatibility mode for core binaries 2016-10-03 14:41:53 +01:00
Andrew Nelless
d48f6801f0 Disable DPI scaling on core binaries 2016-10-03 13:44:21 +01:00
Andrew Nelless
60a4e62779 #5629 Enable activation cancellation dialog 2016-09-29 16:17:38 +01:00
Andrew Nelless
0d5d7e11c0 #5629 Simplify Activation dialog 2016-09-29 16:16:49 +01:00
Andrew Nelless
d4646b1cc6 #5629 Add activation cancellation dialog 2016-09-29 16:14:09 +01:00
Andrew Nelless
81ae0c211a #5629 Move activation widgets to new activation dialog 2016-09-29 13:53:44 +01:00
Andrew Nelless
663e3f5854 #5629 Add rudimentary activation dialog 2016-09-29 13:45:06 +01:00
Andrew Nelless
45da1dfc7c #5628 Make enableCrypto directly enable SSL 2016-09-29 13:11:09 +01:00
Andrew Nelless
55a2d1231f #5628 Initialize SSL on secure client sockets 2016-09-29 13:11:09 +01:00
Andrew Nelless
0d84e4eed6 #5617 Make PacketStreamFilter adopt all socket types 2016-09-29 13:11:09 +01:00
Andrew Nelless
f4f57e1f95 #5617 Remove plugins from RPM spec 2016-09-29 13:11:09 +01:00
Andrew Nelless
3b5940ac18 #5628 Restore copying of SSL libs on Windows 2016-09-29 13:11:09 +01:00
Andrew Nelless
e18f8c62e7 #5617 Remove plugins support from toolchain 2016-09-29 13:11:09 +01:00
Andrew Nelless
964e6d2f12 #5617 Remove PluginManager from SettingsDialog 2016-09-29 13:11:09 +01:00
Andrew Nelless
1fceb2b646 #5617 Remove PluginManager from MainWindow 2016-09-29 13:11:05 +01:00
Andrew Nelless
5db78acab4 #5628 Link Synergy core against OpenSSL 2016-09-29 13:05:04 +01:00
Andrew Nelless
52c8763d97 #5617 Add SecureSocket to TCPSocketFactory 2016-09-29 13:05:04 +01:00
Andrew Nelless
6456271141 #5617 Remove plugin interface from Arch 2016-09-29 13:05:04 +01:00
Andrew Nelless
79fc6239fd #5617 Revert "Remove plugin interface from Arch"
This reverts commit 4613edc17ced61d6aca80cff661323ede0cb9d30.
2016-09-29 13:05:04 +01:00
Andrew Nelless
c3889667ba #5617 Remove online check for plugins 2016-09-29 13:05:04 +01:00
Andrew Nelless
5f5153f450 #5617 Remove the plugin wizard from GUI 2016-09-29 13:05:04 +01:00
Andrew Nelless
b55b8f0038 #5617 Revert "Remove plugin args from ArgParser"
This reverts commit cd58a8f0d0abe344d8e31a817386f613c7acde25.
2016-09-29 13:05:04 +01:00
Andrew Nelless
b1a991e8cd #5617 Revert "Remove plugin directory support"
This reverts commit fc697d2ab79bbd2d607c97658c986b629a1280ed.
2016-09-29 13:05:04 +01:00
Andrew Nelless
45ef3e1080 #5617 Remove plugin interface from Arch 2016-09-29 13:05:04 +01:00
Andrew Nelless
77d6b83b0c #5617 Remove stray PluginVersion includes 2016-09-29 13:05:04 +01:00
Andrew Nelless
aee8e2874e #5617 Remove plugins from Windows installer 2016-09-29 13:05:04 +01:00
Andrew Nelless
a2ad4cb0dc #5617 Remove plugin args from ArgParser 2016-09-29 13:05:04 +01:00
Andrew Nelless
011da60cca #5617 Remove plugin infra from ClientApp 2016-09-29 13:05:04 +01:00
Andrew Nelless
85227f41a1 #5617 Remove plugin infra from ServerApp 2016-09-29 13:05:04 +01:00
Andrew Nelless
f7e588dfff #5617 Remove plugin directory support 2016-09-29 13:05:03 +01:00
Andrew Nelless
dc93b063b7 #5617 Remove plugin infra from TCPSocketFactory 2016-09-29 13:05:03 +01:00
Andrew Nelless
5774f5a291 #5617 Remove plugin infra from Client 2016-09-29 13:05:03 +01:00
Andrew Nelless
27ccddbea4 #5617 Remove plugin infra from ClientListener 2016-09-29 13:05:03 +01:00
Andrew Nelless
76b2558f1a #5617 Delete the plugin infrastructure 2016-09-29 13:05:03 +01:00
Andrew Nelless
665bd91dbd #5628 Move SSL socket code from plugin to lib/net 2016-09-29 13:04:57 +01:00
Andrew Nelless
a70a2bf864 #5329 Fix build date in about dialog 2016-09-27 11:37:16 +01:00
Andrew Nelless
f58e95c96f v1.8.4 beta 2016-09-26 15:46:57 +01:00
Andrew Nelless
cb20fdcc97 Merge bonjour branch 2016-09-26 15:39:53 +01:00
Andrew Nelless
c7bf59e6c1 Merge changes from v1.8.3 2016-09-26 15:33:57 +01:00
Jerry (Xinyu Hou)
db9181bd11 Versioned to 1.8.3-stable 2016-09-26 11:58:33 +01:00
Andrew Nelless
91c01d3a45 Version 1.8.3-rc2 2016-09-26 11:58:33 +01:00
Andrew Nelless
d77f35b952 Update Changelog 2016-09-26 11:58:33 +01:00
Andrew Nelless
c418d66f60 #3305 Rename macOS MediaKeySimulator to MediaKeySupport 2016-09-26 11:58:33 +01:00
Andrew Nelless
e76b4a7747 #3305 Send macOS media key events to clients 2016-09-26 11:58:33 +01:00
Andrew Nelless
1b0d4308e2 #3305 Map brightness keys correctly on macOS servers 2016-09-26 11:58:33 +01:00
Andrew Nelless
6294679fcd #3305 Detect media keys on macOS server 2016-09-26 11:58:33 +01:00
Andrew Nelless
6d5b2707c8 #3305 Add logging for unknown macOS events 2016-09-26 11:58:33 +01:00
Xinyu Hou
a17779e7fd #123 Disabled clipboard grab mechanism when clipboard is disabled 2016-09-26 11:58:33 +01:00
Xinyu Hou
ce4effa2c8 #123 Fixed warning on Linux 2016-09-26 11:58:33 +01:00
Xinyu Hou
eafc548b97 #123 Made disable clipboard take effect on client 2016-09-26 11:58:33 +01:00
Xinyu Hou
90673e8b87 #123 Added note about disabling clipboard 2016-09-26 11:58:33 +01:00
Xinyu Hou
59e31c3f05 #123 Made clipboard name convention consistent 2016-09-26 11:58:33 +01:00
Xinyu Hou
673829f511 #123 Made disable clipboard take effect on server 2016-09-26 11:58:33 +01:00
Xinyu Hou
9c0bac7c7d Fixed indentations 2016-09-26 11:58:33 +01:00
Xinyu Hou
3c94310c9e #123 Read clipboard sharing option and pass it to all clients 2016-09-26 11:58:33 +01:00
Xinyu Hou
130458f77a #123 Added enable clipboard option in GUI 2016-09-26 11:58:33 +01:00
Xinyu Hou
d78758ab7d Fixed indentation 2016-09-26 11:58:33 +01:00
Xinyu Hou
dc80ab4023 #4740 Sent heartbeat message between each chunk message 2016-09-26 11:58:33 +01:00
Xinyu Hou
d8ace7fb4a #4740 Used global const rather than macro 2016-09-26 11:58:33 +01:00
Xinyu Hou
8ab69a22ae #4740 Forced delay on heartbeat rather than each clipboard chunk 2016-09-26 11:58:33 +01:00
Xinyu Hou
d14d907ac1 #4740 Removed clipboard interrupt code 2016-09-26 11:58:33 +01:00
Andrew Nelless
fc6ce84ee4 Don't pollute the log with clipboard data at DEBUG2 2016-09-26 11:58:33 +01:00
Xinyu Hou
ceecee0f57 #4740 Used safer static cast 2016-09-26 11:58:33 +01:00
Xinyu Hou
71741da721 #4740 Only adopted non-SSL socket 2016-09-26 11:58:33 +01:00
Xinyu Hou
07f7baf335 #4740 Passed IDataSocket directly 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
61c0bd1910 Removed unused variable 2016-09-26 11:58:33 +01:00
XinyuHou
f2846b1586 Remove disconnect on retry exceed 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
16dbb7cd6a Fixed using the wrong variable name 2016-09-26 11:58:33 +01:00
XinyuHou
a471bdcea7 Made a own copy of ClientArgs in Client 2016-09-26 11:58:33 +01:00
XinyuHou
a12ae98e9f Used parent pointer for socket accept 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
e1be5a66b7 Used correct event target 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
6d86a6033f Removed dead code 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
e0819b86cd Conflicts:
src/lib/plugin/ns/SecureSocket.cpp
2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
07902d623c Removed dead code 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
08a73218e6 Refactored secure read and write into SecureSocket 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
61b489ab3d Refactor write and read into functions 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
436e333f6f Fixed indentations 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
3df75f9601 Conflicts:
src/lib/server/ClientListener.cpp
2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
e1be67cfb6 Fixed indentations
Conflicts:
	src/lib/client/Client.h
2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
95464d97cf Conflicts:
src/lib/client/Client.cpp
	src/lib/net/TCPSocketFactory.cpp
2016-09-26 11:58:33 +01:00
XinyuHou
e32402b5c6 #4740 Moved clipboard transfering back into main thread on server 2016-09-26 11:58:33 +01:00
XinyuHou
4ad2c6b10d #4740 Moved clipboard transfering back into main thread on client 2016-09-26 11:58:33 +01:00
XinyuHou
82043ca435 #4740 Used the same chunk size for secure and non-secure sockets 2016-09-26 11:58:33 +01:00
XinyuHou
3e1a86c3c1 #5502 Reverted disabled sending clipboard on inactive grab
This reverts commit 2ad4b896f3.
2016-09-26 11:58:33 +01:00
Cédric Picard
11d5691bca Fixed memory leak in IpcReader.cpp 2016-09-26 11:58:33 +01:00
Andrew Nelless
d34a59a984 Update company name in win32 installer 2016-09-26 11:58:33 +01:00
Andrew Nelless
c3c0913633 Update company copyright notice 2016-09-26 11:58:33 +01:00
Epakai
a8472d2eb2 Add exemption for linking GPL code with OpenSSL
Per OpenSSL FAQ https://www.openssl.org/docs/faq.html#LEGAL2
Please include a blanket exception for linking with OpenSSL code.
2016-09-26 11:58:33 +01:00
Andrew Nelless
9a6f82d89d Fix typo in hm.py toolchain 2016-09-26 11:58:33 +01:00
Andrew Nelless
77a7b67431 Fix up old wiki links 2016-09-26 11:58:33 +01:00
Andrew Nelless
36be2051c2 Change company domain name 2016-09-26 11:58:33 +01:00
Andrew Nelless
7d11004575 #4768 Expand scope of X display lock in getCurrentTime() 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
e4b61cd881 Updated ChangeLog 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
10add6c231 Versioned to 1.8.3-rc1 2016-09-26 11:58:33 +01:00
XinyuHou
47ea124c77 #2765 Used EXPECT_FALSE instead of EXPECT_EQ 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
de91be1035 #2765 Added unit tests for KeyMap 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
2ffaf42faa #2765 Made index output 1 based 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
adaf325e6f #2765 Made sure extra sensitive modifier is not down on exact match 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
b80760bb2d #2765 Matched exactly only when all required modifiers are ready down 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
178b7cc673 #2765 Made sure required modifiers already down when map command keys 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
bbb652e504 #2765 Added unit test for modifier mapping 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
7a0fae2f6c #2765 Fixed wrong bit shifting to match OSX modifier mask 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
57950d39a3 Revert "Revert "Used input source ID as the key in group map #2765""
This reverts commit a70cba80ea.
2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
c772a59572 Revert "Revert "Made index 1 based in log #2765""
This reverts commit fec53e812f.
2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
f4bd2dab82 #3305 Fixed class name convention for Mac and Linux 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
cc10e319d1 #3305 Resolved namespace issue 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
b27a59fb0d #3305 Fixed class name convention from porting code 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
df8443e795 #3305 Fixed Linux key types incompatible issue 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
1a4a313ece #3305 Added mission control and launchpad support 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
ab4f59eac4 #3305 Made Mac clients aware of brightness keys 2016-09-26 11:58:33 +01:00
Xinyu Hou (Jerry)
67f14da691 #3305 Added brightness up and down support 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
b62de406e2 #3305 Refactor MockKeyState into a separate class 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
82d2a9564e #3305 Made mock match to the original KeyState 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
bd0d8e7321 #3305 Added default implementation for fakeMediaKey for Linux and Mac 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
d9a6c14170 #3305 Used Mac native way to simulate media keys 2016-09-26 11:58:33 +01:00
Andrew Nelless
e72e86c9b2 #4323 Fix build wrt ElevateMode on non-Windows platforms 2016-09-26 11:58:33 +01:00
Andrew Nelless
21df3290c2 #4323 Refactored ElevateMode into its own header 2016-09-26 11:58:33 +01:00
Andrew Nelless
9c26c7ea94 #4323 Implement Elevate tristrate in GUI 2016-09-26 11:58:33 +01:00
Andrew Nelless
3cd58f7c7d #4323 Prepare settings dialog for elevation tristate 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
312689039f Versioned to 1.8.3 2016-09-26 11:58:33 +01:00
Jerry (Xinyu Hou)
8503c3c023 Version to 1.8.2 2016-09-26 11:58:33 +01:00
Andrew Nelless
50fcdcf672 Improve GitHub issue template 2016-09-21 12:08:54 +01:00
Andrew Nelless
145e7797be Create ISSUE_TEMPLATE.md 2016-09-20 17:20:55 +01:00
Andrew Nelless
bb3be59c91 #4978 Link Bonjour statically 2016-08-09 10:04:32 +01:00
Andrew Nelless
342b3d1e8d #4978 Fixed WiX configuration order 2016-08-08 16:42:34 +01:00
Jerry (Xinyu Hou)
4ad8621adc #5389 Added qwindows.dll into installer on Windows 2016-08-08 16:42:34 +01:00
Jerry (Xinyu Hou)
9897711967 #4978 Increased wizard version 2016-08-08 16:42:34 +01:00
Jerry (Xinyu Hou)
091b7b98ef #5389 Changed expected Qt version in script 2016-08-08 16:41:01 +01:00
Andrew Nelless
f7d8ea9686 #5390 Add --skip-tests config option 2016-08-08 16:41:01 +01:00
XinyuHou
c5d5d5cba0 #4978 Made VersionHelper Windows specific 2016-08-08 16:41:01 +01:00
Andrew Nelless
e1432f670c #4978 Fixed bad casting on 64bit Windows 2016-08-08 16:41:01 +01:00
Andrew Nelless
04184b51ea #4978 Removed deprecated usage of GetVersionEx 2016-08-08 16:41:01 +01:00
Andrew Nelless
3ead310161 #4978 Fixed HANDLE string formatting on 64bit Windows 2016-08-08 16:41:01 +01:00
Andrew Nelless
bc24568a6f #4978 Removed deprecated GetVersionEx call when checking Windows version 2016-08-08 16:41:01 +01:00
Andrew Nelless
74c48c6516 #4978 Removed getOSName impl relying on deprecated GetVersionEx 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
cf1e5239cb #5389 Output GUI binary to release folder on Windows 2016-08-08 16:41:01 +01:00
Jake Petroules
485469b5cd #4978 Auto-detect Qt libraries location. 2016-08-08 16:41:01 +01:00
Jake Petroules
433cfc232c #4978 Removed obsolete code for unsupported OS versions. 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
76a776ef86 #4978 Fixed warning 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
d37d3e8944 #4978 Replaced the superseded SetWindowLong API 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
454bf4dc5f #5389 Updated Wix for Qt 5.6 and VS 2015 2016-08-08 16:41:01 +01:00
Andrew Nelless
70bdbe2736 #4978 Removed hack causing problems with VS2015 2016-08-08 16:41:01 +01:00
Andrew Nelless
cd09a36286 #4978 Fixed orphaned appendLogInfo slot 2016-08-08 16:41:01 +01:00
Andrew Nelless
38db630816 #5389 Added missing header under Qt5 2016-08-08 16:41:01 +01:00
Andrew Nelless
79a61b28f4 #5389 Added Qt5 compatibility for default file paths 2016-08-08 16:41:01 +01:00
Andrew Nelless
64dbae8918 #4978 Resolved conflict between interface macro in VS2015 2016-08-08 16:41:01 +01:00
Andrew Nelless
6c58913899 #5389 Support for building GUI with VS2015 2016-08-08 16:41:01 +01:00
Andrew Nelless
1bb1b21f77 #4978 Renamed conflicting 'Unknown' EditionType 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
25d8c5c32a #4978 Added script to support VS2015 2016-08-08 16:41:01 +01:00
Andrew Nelless
13e8047967 #4978 Conditional linking C runtime lib 2016-08-08 16:41:01 +01:00
Andrew Nelless
c2b6b60cec #4978 Compile core on VS2015 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
42494a72a5 #3305 Fixed class name convention for Mac and Linux 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
ba04f2dfc5 #3305 Resolved namespace issue 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
10a1ae8271 #3305 Fixed class name convention from porting code 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
e742269ada #3305 Fixed Linux key types incompatible issue 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
8f99911636 #3305 Added mission control and launchpad support 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
1f78fe6f6d #3305 Made Mac clients aware of brightness keys 2016-08-08 16:41:01 +01:00
Xinyu Hou (Jerry)
8058ed06a1 #3305 Added brightness up and down support 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
ebfe01cb3b #3305 Refactor MockKeyState into a separate class 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
e2459eb1b7 #3305 Made mock match to the original KeyState 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
d3814cc454 #3305 Added default implementation for fakeMediaKey for Linux and Mac 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
9115d5570b #3305 Used Mac native way to simulate media keys 2016-08-08 16:41:01 +01:00
Andrew Nelless
e1e1199a57 #4323 Fix build wrt ElevateMode on non-Windows platforms 2016-08-08 16:41:01 +01:00
Andrew Nelless
d42ea08a1d #4323 Refactored ElevateMode into its own header 2016-08-08 16:41:01 +01:00
Andrew Nelless
fa9f30ff81 #4323 Implement Elevate tristrate in GUI 2016-08-08 16:41:01 +01:00
Andrew Nelless
d1e80c668e #4323 Prepare settings dialog for elevation tristate 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
fb4590c6ac Versioned to 1.8.3 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
1e39a430e5 Version to 1.8.2 2016-08-08 16:41:01 +01:00
Jerry (Xinyu Hou)
130a248fbe Versioned 1.8.2-stable 2016-08-08 14:38:26 +01:00
Jerry (Xinyu Hou)
8901effc8b Updated ChangeLog 2016-08-08 14:38:26 +01:00
Andrew Nelless
f6e1dd51fa #4768 Workaround locking issue in X11 getCurrentTime() 2016-08-08 14:38:26 +01:00
Jerry (Xinyu Hou)
7fa92869a4 #5471 Wrapped skip explanation in wizard activation page 2016-08-08 14:38:26 +01:00
Jerry (Xinyu Hou)
03d22c3746 #5471 Fixed typo in activation wizard page 2016-08-08 14:38:26 +01:00
Andrew Nelless
8a4caba386 #5087 Ensure createBlankCursor() doesn't try to create 0x0 cursor
XQueryBestCursor sometimes returns 0 for both width and height of the
cursor pixmap. Also caused #5322 and #5068
2016-08-08 14:38:26 +01:00
Malcolm Lowe
0c4746492f Fixed issue title in ChangeLog 2016-08-08 14:38:26 +01:00
Jerry (Xinyu Hou)
2f8f5fcb4e Updated ChangeLog 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
71b2652a70 Versioned to 1.8.2-rc1 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
47ef8b09bd #4768 Reset thread when it finishes 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
804b482c5e #5471 Added some tips and size restrictions 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
725cc7a2f8 #4922 Increased server help message buffer 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
683d9b3786 Revert "Check list in a reverse order #2765"
This reverts commit 3de98a2f44a20449468496d47f5642b534a80cf6.
2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
fec53e812f Revert "Made index 1 based in log #2765"
This reverts commit 177c2764259c097d0f0f0fa6e081c42bcef91ce5.
2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
a70cba80ea Revert "Used input source ID as the key in group map #2765"
This reverts commit 4208e89eaec211d332af9ac7b977107d6712e8dd.
2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
2a3d34983f #4715 Increased wizard version number due to serial key support 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
2ad4b896f3 #4768 Disabled sending clipboard on inactive grab 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
62c9ca0a7f #5471 Redesigned serial key input 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
fd39c73bcd #5471 Made serial key form layout align to left 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
83c0dea2e4 #4792 Calculated log message size rather than using fixed size 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
18c2c90144 #3044 Stopped attach hook thread to foreground 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
9caa04237c Refined file transfer log output 2016-08-08 14:36:43 +01:00
Jerry (Xinyu Hou)
30fa5223bc #4768 Fixed race condition on active client proxy switch 2016-08-08 14:36:42 +01:00
Jerry (Xinyu Hou)
1a76acd446 #4768 Interrupted both clipboards 2016-08-08 14:36:42 +01:00
Jerry (Xinyu Hou)
518fc7a676 Versioned to 1.8.2-beta 2016-08-08 14:36:12 +01:00
Jerry (Xinyu Hou)
80292961ad Continue after close old process #5277 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
fa2a6a2169 Added restart service on failure #5277 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
17c35f53f4 Applied name convention to KeyResource #2765 2016-08-08 14:27:13 +01:00
Will Tinsdeall
47d6d1c5bc Improved grammar in connection notification dialog #4894 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
8003c4a2ad Made IKeyResource OSX specific #2765 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
6d2040b698 Reorganised KeyResource #2765 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
6d93a28c2e Used input source ID as the key in group map #2765 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
583ac1ed2d Made index 1 based in log #2765 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
7bf9ca44ae Check list in a reverse order #2765 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
7f786cc884 Refactor KeyResource into own files #2765 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
ed0888880c Rename CUCHRKeyResource to UchrKeyResource #2765 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
929431f5fc Remove support for OSX 10.4 and below #2765 2016-08-08 14:27:13 +01:00
Nigel Armstrong
6e7adeac85 Added "--enable-crypto" to help #4922 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
60b56f9e58 Switch translator back only when it's been changed #4836 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
48d24d72e6 Proofread internal information after retranslating UI #4836 2016-08-08 14:27:13 +01:00
Asbjorn Kjaer
c7e723030b Fix log string to use the re-mapped button instead of the input ID #2975 2016-08-08 14:27:13 +01:00
Asbjorn Kjaer
d93ff2f53f Fix comment #2975 2016-08-08 14:27:13 +01:00
Asbjorn Kjaer
5901fa8aed Correctly translate mouse events to the right and middle buttons #2975 2016-08-08 14:27:13 +01:00
Amanda McGlothlin
aa178a356f Updated mac app icon to match the website icon #5299 2016-08-08 14:27:13 +01:00
Will Tinsdeall
428901859e Use account in auth url #4913 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
822267d300 Fix indentation 2016-08-08 14:27:13 +01:00
Jerry (Xinyu Hou)
d196ec5e9a Updated Changelog 2016-07-14 15:01:21 +00:00
Jerry (Xinyu Hou)
6dd7f340c2 Versioned to 1.8.1-stable 2016-07-14 14:58:49 +00:00
Jerry (Xinyu Hou)
0034ca4b76 #5461 Caught all exceptions for activation 2016-07-12 06:51:09 -07:00
Xinyu Hou
2ed3d26817 Fix indentation 2016-03-15 13:24:08 -07:00
Xinyu Hou
5f6ea6054f Update changelog 2016-03-15 12:59:01 -07:00
Erik Swan
5e35fe2c1b Fix mouse speed increase with sleep on Mac server
As reported in #451, with the Mac server, sleeping and resuming (on the
server) causes the mouse speed to double on the client upon resume.

Fix by removing the CFRunLoopSource from the run loop on screen disable
before releasing it. CFRunLoopAddSource in enable() retains the
CFRunLoopSource, so even though the source is released in disable(), the
run loop still has a copy. When the server comes out of sleep and the
screen is enable()'d, another event tap and run loop source are created
and added to the run loop, so the callback is now being called twice for
every mouse movement, and so on for every additional time the server
sleeps.

This is a better approach than the fix in 267f3ac41f, because although
that fixes the issue by disabling the event tap before the event tap and
run loop source are released, a memory leak still occurs since they are
retained by the run loop.

Additional references on the behavior of CFRunLoopAddSource:
https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFRunLoopRef/index.html#//apple_ref/c/func/CFRunLoopAddSource
http://www.cocoabuilder.com/archive/cocoa/242438-trouble-with-event-taps.html
2016-03-15 12:57:54 -07:00
Jerry (Xinyu Hou)
7cbd3fdcb4 Revert "Add keepAlive message before send file/clipboard data #4768"
This reverts commit 5287c62540b277474603ea8a38c53b50cb8f4d52.
2016-03-15 12:57:39 -07:00
Jerry (Xinyu Hou)
b5b2cdfade Add keepAlive message before send file/clipboard data #4768 2016-03-15 12:57:06 -07:00
Jerry (Xinyu Hou)
5661a41d42 Fix code style 2016-03-15 12:57:06 -07:00
XinyuHou
e5c1821088 Outpup log before return #4740 2016-03-15 12:57:06 -07:00
Jerry (Xinyu Hou)
3ce078f0e8 Fix wrong elevate information #5041 2016-03-15 12:57:06 -07:00
Jerry (Xinyu Hou)
70104190e4 Add elevate log info #5041 2016-03-15 12:57:06 -07:00
Jerry (Xinyu Hou)
20d9b80291 Remove checking system clipboard formats #5041 2016-03-15 12:57:06 -07:00
Jerry (Xinyu Hou)
1ac8db56d9 Revert "Workaround for Issue #5041 - prevent synergys from shutting down when screen saver activates"
This reverts commit beac70f90c37b626cb7b0ea7bf2d18fdd3729013.
2016-03-15 12:57:06 -07:00
Jerry (Xinyu Hou)
92a3c47ed2 Revert "Issue #5041 - properly update activeDesk and activeDeskName when screen saver activates"
This reverts commit 3615add7b80838dc8b93cb89f2c8f87254db6c21.
2016-03-15 12:57:06 -07:00
Jerry (Xinyu Hou)
da5e9527a3 Revert "Refactor Issue #5041 workaround to make sure we still send the SCREENSAVER message"
This reverts commit 43ba3e889f88e526673ff70caf2b3efe26b13363.
2016-03-15 12:57:05 -07:00
Jerry (Xinyu Hou)
4d19941428 Revert "Revert to old behavior of checkDesk(), add workaround to broken EnumClipboardFormats() in the case where the server is started while the screen saver is active."
This reverts commit 38209e5079d1695ddd561f8045647e077fccff91.
2016-03-15 12:57:05 -07:00
Jerry (Xinyu Hou)
42038ce24e Revert "Minor cosmetic change - missing some debug stuff in this branch."
This reverts commit bd660fedbfbff2df1bf5921826dd7717c2839161.
2016-03-15 12:57:05 -07:00
Jerry (Xinyu Hou)
89eb64a0aa Reorder clipboard format #2909 2016-03-15 12:57:05 -07:00
Jerry (Xinyu Hou)
4344b16a20 Remove some hack code #2909 2016-03-15 12:57:05 -07:00
Jerry (Xinyu Hou)
221a9a71c4 Add comment #4827 2016-03-15 12:57:05 -07:00
Jerry (Xinyu Hou)
6d0f820db5 Fix indentations 2016-03-15 12:57:05 -07:00
Jerry (Xinyu Hou)
3067560f7b Fix indentations 2016-03-15 12:57:04 -07:00
Jerry (Xinyu Hou)
ee20d08080 Revert "Revert "Fixed using wrong local variable #4723""
This reverts commit a0beae0f4b5578a16178e6324f2d1f588caeb442.
2016-03-15 12:51:42 -07:00
Jerry (Xinyu Hou)
5fae9efe78 Revert "Revert "Added timeout for waiting active destop result #4723""
This reverts commit 0f8a5687719605af59d901f08dfbb5dde74a7dc9.
2016-03-15 12:51:42 -07:00
Jerry (Xinyu Hou)
eb36db6c26 Revert "Revert "Fix missing DLLs after install #3774""
This reverts commit b575d7ca35d51d1c28ffb84b19fdf96fc941fe41.
2016-03-15 12:51:42 -07:00
Jerry (Xinyu Hou)
2fb36c4f86 Revert "Revert "workaround for Fast cursor on any client with Mac server #451""
This reverts commit 6470240379c896ee13ee98b9a8c951d22f4351c1.
2016-03-15 12:51:22 -07:00
Nye Liu
6f904e55f1 Minor cosmetic change - missing some debug stuff in this branch. 2016-03-15 12:47:34 -07:00
Nye Liu
bab2e985a3 Revert to old behavior of checkDesk(), add workaround to broken EnumClipboardFormats() in the case where the server is started while the screen saver is active. 2016-03-15 12:47:33 -07:00
Nye Liu
425fc8b925 Refactor Issue #5041 workaround to make sure we still send the SCREENSAVER message 2016-03-15 12:47:33 -07:00
Nye Liu
9036d42469 Issue #5041 - properly update activeDesk and activeDeskName when screen saver activates
Ensure that we actually kill the server if we go from screen saver desk to real
desk.
2016-03-15 12:47:33 -07:00
Nye Liu
1fc28392d0 Add error message to help debug Issue #5041 2016-03-15 12:47:33 -07:00
Nye Liu
3e37518b92 Workaround for Issue #5041 - prevent synergys from shutting down when screen saver activates
When it is restarted, and screen saver is active, the clipboard no longer works
correctly.

The desk swap detection routine just below does not work properly when the
desktop goes from screensaver back to normal. If it did, probably this
workaround would not be needed.
2016-03-15 12:47:33 -07:00
Nye Liu
48069f1a3b Always call wait() at least once even if timeout is 0 to prevent deadlocks 2016-03-15 12:46:45 -07:00
Nye Liu
b85b9125ea Remove inadvertent additions 2016-03-15 12:46:45 -07:00
Nye Liu
8f0530c507 Add retry to CondVarBase wait(), make sure Stopwatch is started on construction (Issue #4735)
* ArchMultithreadPosix::waitCondVar() returns every 100ms, so retry until we
  hit timeout.

* Stopwatch constructor should be called with "false" (not "true") to make sure
  Stopwatch is actually running when instantiated.
2016-03-15 12:46:45 -07:00
Nye Liu
1fde0f3e71 Cosmetic whitespace, use return value of wait() directly instead of testing timer 2016-03-15 12:46:45 -07:00
Nye Liu
0d310a8464 Properly lock condVar, add timeout condition to prevent infinite loop when waiting for fillClipboard() to finish 2016-03-15 12:46:45 -07:00
Nye Liu
6c11de6a22 Fix bug #4735 - don't leave() until fillClipboard()s all complete 2016-03-15 12:46:45 -07:00
Jerry (Xinyu Hou)
7a207b4a54 Version to 1.8.1 2015-11-30 18:03:52 -08:00
Xinyu Hou
4ff3cddecf Update changelog 2015-11-30 16:45:53 -08:00
Xinyu Hou
a68a01ca0f Revert "Update search pattern for src type #5136"
This reverts commit 9152c27522.
2015-11-30 16:44:17 -08:00
Jerry (Xinyu Hou)
6b67530056 Version to 1.8.0 2015-11-30 16:40:42 -08:00
Jerry (Xinyu Hou)
097e210ad6 Version to 1.8.1 2015-11-30 16:21:29 -08:00
Jerry (Xinyu Hou)
dfd8f25991 Update changelog 2015-11-30 15:29:07 -08:00
Jerry (Xinyu Hou)
9a82a13a9a Update changelog 2015-11-30 14:17:18 -08:00
Jerry (Xinyu Hou)
9152c27522 Update search pattern for src type #5136 2015-11-30 13:55:42 -08:00
Jerry (Xinyu Hou)
0207b697e3 Remove debug logging #5030 2015-11-30 12:01:00 -08:00
Jerry (Xinyu Hou)
53906faf8f Update changelog 2015-11-30 11:36:49 -08:00
Jerry (Xinyu Hou)
42f201785c Revert "Added timeout for waiting active destop result #4723"
This reverts commit aec52c36e6.
2015-11-24 11:53:38 -08:00
Jerry (Xinyu Hou)
539ac32136 Revert "Fixed using wrong local variable #4723"
This reverts commit d7063a87c8.
2015-11-24 11:53:18 -08:00
Jerry (Xinyu Hou)
622045b396 Revert "Revert "Revert "Fix missing DLLs after install #3774"""
This reverts commit 3eb04d1b4c.
2015-11-24 11:42:17 -08:00
Jerry (Xinyu Hou)
8a2106a09e Revert "workaround for Fast cursor on any client with Mac server #451"
This reverts commit 267f3ac41f.
2015-11-24 11:40:04 -08:00
Jerry (Xinyu Hou)
3bca8deac3 Use secure URL #4715 2015-11-23 11:42:47 -08:00
Jerry (Xinyu Hou)
4f028d56f1 Version to 1.8.0 beta 2015-11-23 10:04:21 -08:00
Jerry (Xinyu Hou)
953ad5bc4a Use live URL #4715 2015-11-23 10:03:44 -08:00
Jerry (Xinyu Hou)
fbd2c1413e Merge branch 'jerry-sandbox2' 2015-11-23 09:54:05 -08:00
j2gl
5a03ece50b Update MacOS warning 2015-11-20 01:35:23 -06:00
Nick Bolton
85088baceb Update ChangeLog 2015-11-19 13:46:48 -08:00
Jerry (Xinyu Hou)
fa8a0ebbfe Make center point be aware of DPI scaling #5030 2015-11-19 13:46:48 -08:00
Jerry (Xinyu Hou)
df89859400 Fix indentation 2015-11-19 13:46:48 -08:00
Jerry (Xinyu Hou)
c259af9b41 Fix code style 2015-11-19 13:46:48 -08:00
Jerry (Xinyu Hou)
4f1f2dcff0 Use condition instead of assertion #5030 2015-11-19 13:46:48 -08:00
XinyuHou
ebec92fd5b Fix unit test failed compiling on Linux #5030 2015-11-19 13:46:47 -08:00
XinyuHou
af305ba3df Add size_t dependency #5030 2015-11-19 13:46:47 -08:00
XinyuHou
9fd210b3a5 Update git ignore list 2015-11-19 13:46:47 -08:00
Jerry (Xinyu Hou)
c23d443a9a Add unit tests for DpiHelper 2015-11-19 13:46:47 -08:00
Jerry (Xinyu Hou)
0cc831b2fb Fix code style 2015-11-19 13:46:46 -08:00
Jerry (Xinyu Hou)
c994b0a4f7 Make sure all variables are non zero #5030 2015-11-19 13:46:46 -08:00
Jerry (Xinyu Hou)
a09bfc5f07 Fix high DPI breaking edge detection and mouse delta calculation #5030 2015-11-19 13:46:46 -08:00
Jerry (Xinyu Hou)
66335cd6f8 Pass resolution and center into core on Windows #5030 2015-11-19 13:46:45 -08:00
Jerry (Xinyu Hou)
1ccc258455 Add DPI helper #5030 2015-11-19 13:46:45 -08:00
Jerry (Xinyu Hou)
4be852c2f2 Move notify into thread #4932 2015-11-19 10:48:11 -08:00
Jerry (Xinyu Hou)
e1e38bd3a2 Compress network error during notification #4932 2015-11-19 10:01:50 -08:00
Jerry (Xinyu Hou)
4b2fc8c4c9 Refactor function name #4715 2015-11-18 16:05:08 -08:00
Jerry (Xinyu Hou)
cab8a99233 Persist Profile folder #4715 2015-11-18 16:03:32 -08:00
Jerry (Xinyu Hou)
0e58bfc5fe Remove user token #4715 2015-11-18 15:09:09 -08:00
Jerry (Xinyu Hou)
b1c5a83bfb Uthe edition value in app config as default #4715 2015-11-18 15:05:05 -08:00
Jerry (Xinyu Hou)
20d4d47648 Save edition type to settings after wizard finish #4715 2015-11-18 15:03:06 -08:00
Jerry (Xinyu Hou)
4698394e21 URL encode identity and MAC address 2015-11-18 11:51:45 -08:00
Jerry (Xinyu Hou)
5f73d339aa Refactor purchase url #4716 2015-11-17 15:20:22 -08:00
Jerry (Xinyu Hou)
7ecc0457e0 Show subscription warning once a day #4716 2015-11-17 14:51:04 -08:00
Jerry (Xinyu Hou)
f8e9047c36 Rephrase and refactor serial warning message #4716 2015-11-17 14:17:00 -08:00
Jerry (Xinyu Hou)
18d23d6f89 Rephrase using serial recommendation #5020 2015-11-17 10:41:24 -08:00
Jerry (Xinyu Hou)
97809f9040 Revert "Modify regex to recognize edition from jason #4933"
This reverts commit 2fd0d5c68f.
2015-11-16 09:24:49 -08:00
Jerry (Xinyu Hou)
2fd0d5c68f Modify regex to recognize edition from jason #4933 2015-11-13 11:04:23 -08:00
Jerry (Xinyu Hou)
ad16599fa5 Fix code style 2015-11-12 12:05:37 -08:00
Jerry (Xinyu Hou)
4b7796d215 Catch exception from notification request #4932 2015-11-12 12:05:26 -08:00
Jerry (Xinyu Hou)
8c4ccdf148 Unit test for new fields in serial key #4715 2015-11-12 10:08:55 -08:00
Jerry (Xinyu Hou)
55df81b1a6 Add company and email into serial key #4715 2015-11-12 10:08:35 -08:00
Jerry (Xinyu Hou)
9eec299278 Check user type from serial key #4715 2015-11-12 09:50:30 -08:00
Jerry (Xinyu Hou)
4c1b6f3f23 Use test website #4932 2015-10-30 13:49:18 -07:00
Jerry (Xinyu Hou)
10e3917b61 Change notify failure log level #4932 2015-10-30 13:42:05 -07:00
Jerry (Xinyu Hou)
382607129c Make notify failure silent #4932 2015-10-30 12:43:28 -07:00
Jerry (Xinyu Hou)
bdc02677ec Add trial edition type #4716 2015-10-30 11:57:12 -07:00
Jerry (Xinyu Hou)
73ac3df22d Limit expired time to trial version #4716 2015-10-30 11:41:51 -07:00
Jerry (Xinyu Hou)
068b3b98ed Fix compile warnning #4933 2015-10-30 11:25:16 -07:00
Jerry (Xinyu Hou)
0a1c439535 Only send notify request on wizard finish #4932 2015-10-29 16:50:23 -07:00
Jerry (Xinyu Hou)
f03b453c6f Pass Linux OS info during notification #4932 2015-10-29 15:55:55 -07:00
Jerry (Xinyu Hou)
b4563a42c4 Use string split function in syntool #4933 2015-10-29 15:47:10 -07:00
Jerry (Xinyu Hou)
942dcabdcd Add split empty string unit test #4933 2015-10-29 15:11:09 -07:00
Jerry (Xinyu Hou)
c148fbb7f4 Fix unit tests name convention #4933 2015-10-29 13:08:00 -07:00
Jerry (Xinyu Hou)
d429988e73 Add more unit tests for split string function #4933 2015-10-29 13:00:03 -07:00
Jerry (Xinyu Hou)
1b73b8875b Add unit tests for split string function #4933 2015-10-29 12:53:15 -07:00
Jerry (Xinyu Hou)
72397137c0 Add split string function #4933 2015-10-29 12:52:55 -07:00
Jerry (Xinyu Hou)
27f83e1801 Refactor duplicated code #4933 2015-10-29 11:42:16 -07:00
Jerry (Xinyu Hou)
582629e968 Use the passed in OS info if specified #4933 2015-10-28 17:29:42 -07:00
XinyuHou
2535f3466c Check OS info from GUI #4933 2015-10-28 17:15:16 -07:00
Jerry (Xinyu Hou)
d4d5d83bb6 Check OS info from GUI #4933 2015-10-28 14:09:04 -07:00
Xinyu Hou
a4c799c285 Notify activation when skipping or using serial #4932 2015-10-27 16:31:09 -07:00
Xinyu Hou
4d20a3ce91 Add OS and arch in auth request #4933 2015-10-27 15:50:34 -07:00
Xinyu Hou
32da441fc0 Simplify OS info on Unix #4933 2015-10-27 15:45:39 -07:00
Jerry (Xinyu Hou)
19835b6aaa Allow software to be time limited with serial key #4716 2015-10-23 15:37:16 -07:00
Jerry (Xinyu Hou)
75adb5aa8d Recommend using serial key when online activation fails #5020 2015-10-23 12:13:16 -07:00
Jerry (Xinyu Hou)
98385c06e9 Use local variable instead of function parameter #5020 2015-10-23 11:59:28 -07:00
Jerry (Xinyu Hou)
da315ec164 Add unit tests for subscription manager #4715 2015-10-23 11:35:58 -07:00
Jerry (Xinyu Hou)
978c97cbc0 Refactor parse plain serial #4715 2015-10-23 11:35:57 -07:00
XinyuHou
0429986470 Add dependency for Linux #4715 2015-10-22 16:41:48 -07:00
Jerry (Xinyu Hou)
bc768cbca3 Add serial key in app settings #4715 2015-10-22 16:31:46 -07:00
Jerry (Xinyu Hou)
3bc46dca2d Use core interface to activate subscription in wizard #4715 2015-10-22 16:14:37 -07:00
Jerry (Xinyu Hou)
85ef7935cc Rename a variable 2015-10-22 16:04:05 -07:00
Jerry (Xinyu Hou)
1f54dd2d3b Remove unused code 2015-10-22 16:03:27 -07:00
Jerry (Xinyu Hou)
ca0237dcc7 Remove legacy subscription checking #4715 2015-10-21 17:48:44 -07:00
Jerry (Xinyu Hou)
a29858c439 Add subscription section in activation page #4715 2015-10-21 17:06:38 -07:00
Jerry (Xinyu Hou)
18e7004213 Add subscription functionalities in syntool #4715 2015-10-21 16:35:22 -07:00
Jerry (Xinyu Hou)
8f941f5713 Port subscription feature #4715 2015-10-21 16:00:23 -07:00
Jerry (Xinyu Hou)
83876ebed4 Removed legacy class #4696 2015-10-20 14:36:28 -07:00
Jerry (Xinyu Hou)
084e2c1e05 Refactor FileSysClient into PluginManager #4696 2015-10-19 18:07:08 -07:00
Jerry (Xinyu Hou)
6c4ee29649 Remove unused functions in WebClient #4696 2015-10-19 17:02:59 -07:00
Jerry (Xinyu Hou)
4197fb7a0e Remove unused viable #4696 2015-10-19 16:59:25 -07:00
Jerry (Xinyu Hou)
d61b532705 Add built date #4893 2015-10-19 16:06:02 -07:00
Xinyu Hou
6320156279 Add stage and revision info in about page #4893 2015-10-19 15:15:03 -07:00
Jerry (Xinyu Hou)
faa170b40d Suppress unit tests and integtests warning for Mac 10.11 2015-10-13 15:39:36 -07:00
Robby Stahl
f00f60a8fe Update mac directions to not require a root user
I updated the directions such that a clear installation path is provided that does not require the direct use of root.
2015-09-10 14:04:01 -07:00
Jerry (Xinyu Hou)
5da7290242 Stopped process before showing the fingerprint message #4901 2015-08-10 10:11:51 -07:00
Nick Bolton
588fb4b805 ChangeLog for v1.7.4-stable 2015-08-07 14:29:44 -07:00
Jerry (Xinyu Hou)
d2c94bfb04 Revert "Removed mutex locking from get and set of log level #4809"
This reverts commit 3eef49d5c9.
2015-08-06 12:57:57 -07:00
Xinyu Hou
9b09703c1a Revert "Allowed reconnect after SSL fatal error #4857"
This reverts commit cbd63e9d67ead4199d5ab49b17d68a7583421d92.
2015-08-06 12:55:59 -07:00
Nick Bolton
1b8f055ff2 ChangeLog for v1.7.4-stable 2015-08-05 11:35:14 -07:00
Xinyu Hou
95c9ffe7e8 Removed unused variable #4866 2015-08-03 16:38:42 -07:00
Jerry (Xinyu Hou)
5b1e7acca9 Plugin version to 1.3 2015-08-03 16:29:36 -07:00
Jerry (Xinyu Hou)
c55cf1936b Added plugin version header in GUI project #4866 2015-08-03 16:28:13 -07:00
Jerry (Xinyu Hou)
0f4837aa21 Fixed warning on Mac 10.6 #4866 2015-08-03 15:56:39 -07:00
Jerry (Xinyu Hou)
945ccfdb75 Refactored plugin names #4866 2015-08-03 15:56:21 -07:00
Xinyu Hou
b105bc8f42 Unified secure socket name across platforms #4866 2015-08-03 15:56:03 -07:00
Xinyu Hou
fedad2b8a1 Improved plugin version logging for Unix #4866 2015-08-03 15:55:37 -07:00
Nick Bolton
3eb1bffb70 Improved variable name for plugin loading on Windows #4866 2015-08-03 15:51:53 -07:00
Nick Bolton
cb5f0f7b12 Improved plugin version logging for Windows #4866
Conflicts:
	src/lib/arch/win32/ArchPluginWindows.cpp
2015-08-03 15:51:27 -07:00
Jerry (Xinyu Hou)
bfabd436d7 Increased wizard version to force plugin download #4866 2015-08-03 15:48:44 -07:00
Jerry (Xinyu Hou)
dc72b4e512 Changed plugin version mismatch log level to error #4866 2015-08-03 15:46:47 -07:00
Jerry (Xinyu Hou)
6602ebe435 Refactored adding plugin only after loaded #4866
Conflicts:
	src/lib/arch/unix/ArchPluginUnix.cpp
2015-08-03 15:45:31 -07:00
Xinyu Hou
a99699df7a Only loaded matching plugin on Mac #4866
Conflicts:
	src/lib/arch/unix/ArchPluginUnix.cpp
2015-08-03 15:43:54 -07:00
Jerry (Xinyu Hou)
a249c38b96 Only loaded matching plugin on Windows #4866
Conflicts:
	src/gui/gui.pro
	src/gui/src/PluginManager.cpp
	src/lib/arch/win32/ArchPluginWindows.cpp
2015-08-03 15:41:57 -07:00
Jerry (Xinyu Hou)
02902066a4 Removed the usage of old delay in GUI #4696 2015-07-31 14:15:28 -07:00
Xinyu Hou
dbdc2a1e29 Solved fingerprint message box race condition #4901 2015-07-31 14:00:26 -07:00
Xinyu Hou
0612ba585d Stopped multiple fingerprint message boxes popping up #4910 2015-07-31 14:00:26 -07:00
Jerry
d70c19b099 Stopped old process before start a new one #4908 2015-07-31 14:00:26 -07:00
Xinyu Hou
e472e47815 Stopped old process on apply button clicked #4908 2015-07-31 14:00:26 -07:00
Xinyu Hou
20cb624c3b Used timer instead of delay #4901 2015-07-31 13:59:25 -07:00
Xinyu Hou
08effbcf99 Fixed code style #4901 2015-07-31 13:59:25 -07:00
Xinyu Hou
67fbecb825 Fixed auto restart sometimes cause GUI crash #4901 2015-07-31 13:59:01 -07:00
Xinyu Hou
94664e413b Rename update zeroconf mutex 2015-07-31 13:58:47 -07:00
Jerry (Xinyu Hou)
8a8f3601c4 Deleted accidentally committed file 2015-07-31 13:58:33 -07:00
Xinyu Hou
fc600efdfe Restarted process from GUI in desktop mode #4901 2015-07-31 13:58:18 -07:00
Jerry (Xinyu Hou)
86d5567e74 Removed redundant logging #4721 2015-07-31 13:57:18 -07:00
Jerry (Xinyu Hou)
5d61996405 Fixed code style #4712 2015-07-31 13:56:58 -07:00
Xinyu Hou
1659f9f018 Added keep alive massge before each data transfer #4712 2015-07-31 13:56:33 -07:00
Jerry (Xinyu Hou)
de49b46edd Expected hasClients at least 3 times #4721 2015-07-31 13:56:19 -07:00
Jerry (Xinyu Hou)
9d44affc89 Fixed Ipc unit test intermittently fail #4721 2015-07-31 13:56:10 -07:00
Jerry (Xinyu Hou)
1369f46cee Show connected message box only when main GUI is visible #4850 2015-07-31 13:55:52 -07:00
Jerry (Xinyu Hou)
7259e71439 Reset thread back to null on finish #4712 2015-07-31 13:55:35 -07:00
Jerry (Xinyu Hou)
bfc3ac340f Fixed possible loss of data warning #4677 2015-07-31 13:55:23 -07:00
Jerry (Xinyu Hou)
a5c865913f Added expect call time for hasClients #4721 2015-07-31 13:55:09 -07:00
Jerry (Xinyu Hou)
c3d38db053 Made buffer thread wait for notify when no gui #4721 2015-07-31 13:55:00 -07:00
Jerry (Xinyu Hou)
18a6f75371 Fixed dialog too big #4852 2015-07-31 13:54:26 -07:00
Jerry (Xinyu Hou)
516c692c94 Removed unused function #4745 2015-07-31 13:54:09 -07:00
Jerry (Xinyu Hou)
5ec9ccc76e Revert "Made buffer thread wait until there is a GUI client #4721"
This reverts commit 9a4327e44236c0ac30809660dc87a97e984dc84f.
2015-07-31 13:52:56 -07:00
Jerry (Xinyu Hou)
01526bbe78 Revert "Removed unrelated checking #4721"
This reverts commit 2de276cfca71a79df31a1d4a89d412212279a1a5.
2015-07-31 13:52:47 -07:00
Xinyu Hou
5a9cbc97e3 Fixed code style
Conflicts:
	src/lib/arch/win32/ArchPluginWindows.cpp
2015-07-31 13:51:48 -07:00
Xinyu Hou
88214a0d3c Removed unrelated checking #4721 2015-07-31 13:49:42 -07:00
Xinyu Hou
afdcb9cefe Made buffer thread wait until there is a GUI client #4721
Conflicts:
	src/lib/ipc/IpcLogOutputter.cpp
2015-07-31 13:49:17 -07:00
Jerry (Xinyu Hou)
cc3dc315f9 Allowed reconnect after SSL fatal error #4857 2015-07-31 13:46:35 -07:00
Jerry (Xinyu Hou)
a44e9832c5 Refactored code order to make it more readable 2015-07-31 13:46:23 -07:00
Jerry (Xinyu Hou)
9800bec857 Made clipboard log more consistent #4712 2015-07-31 13:46:11 -07:00
Jerry (Xinyu Hou)
c2b96cfbb7 Updated comment #4750 2015-07-31 13:45:46 -07:00
Jerry (Xinyu Hou)
d51eb7b8b5 Fixed code style 2015-07-31 13:42:51 -07:00
Jerry (Xinyu Hou)
f8bb948776 Removed unused variable #4750 2015-07-31 13:42:41 -07:00
Jerry (Xinyu Hou)
0ddf544efb Used static variable than define #4750
Conflicts:
	src/lib/plugin/ns/SecureSocket.cpp
2015-07-31 13:25:03 -07:00
Jerry (Xinyu Hou)
44966ee17f Removed redundant log #4858 2015-07-31 13:22:50 -07:00
Jerry (Xinyu Hou)
4fe46e117e Shorten data transfer log #4858 2015-07-31 13:20:50 -07:00
Jerry (Xinyu Hou)
485547d6ea Reverted Notify back to note #4855 2015-07-31 13:20:35 -07:00
Jerry (Xinyu Hou)
81649376fa Revert "Added symbolic link creation to linux and macos #4696"
This reverts commit ad9cfd64af.

Conflicts:
	src/gui/src/PluginManager.cpp
2015-07-31 13:20:16 -07:00
Jerry (Xinyu Hou)
a8cf9173c8 Revert "Changed note to notify #4745"
This reverts commit 5006adedfe.

Conflicts:
	src/test/unittests/ipc/IpcLogOutputterTests.cpp
2015-07-31 13:19:17 -07:00
Jerry (Xinyu Hou)
69a6038cf9 Revert "Moved note into either warning or info #4745"
This reverts commit d3a4ce1f11.
2015-07-31 13:18:57 -07:00
Jerry (Xinyu Hou)
d8582d1093 Revert "Removed warning and error logging level in GUI #4745"
This reverts commit 756000d8a9.

Conflicts:
	src/gui/res/SettingsDialogBase.ui
	src/gui/src/AppConfig.cpp
	src/gui/src/MainWindow.cpp
2015-07-31 13:18:36 -07:00
Jerry (Xinyu Hou)
c89dc68cd7 Revert "Added warning for enable encryption #4584"
This reverts commit 8e15b77db3.
2015-07-31 13:17:36 -07:00
Jerry (Xinyu Hou)
9483fecc42 Fixed code style
Revert "Moved note into either warning or info #4745"

This reverts
commit d3a4ce1f11.

Revert "Changed note to notify #4745"

This reverts commit
5006adedfe.

Conflicts:
	src/test/unittests/ipc/IpcLogOutputterTests.cpp

Shortened transmission log #4858

Revert "Added code to throw an error if the plugin can't be deleted or
written to #4696"

This reverts commit
5696497bc0.
2015-07-31 13:17:12 -07:00
Jerry (Xinyu Hou)
41c03b8f37 Changed installer filename to use branch, stage and revision #4898 2015-07-24 15:21:57 -07:00
Jerry (Xinyu Hou)
392f2904aa Version to v1.8.0-alpha 2015-07-24 15:17:27 -07:00
Jerry (Xinyu Hou)
8ff44d276b Revert "Revert "Add drag and drop enable option to GUI settings""
This reverts commit 8676f64b96.
2015-07-09 17:05:43 -07:00
Jerry (Xinyu Hou)
3eb04d1b4c Revert "Revert "Fix missing DLLs after install #3774""
This reverts commit 7254e621e1.
2015-07-09 17:05:33 -07:00
Jerry (Xinyu Hou)
e15b175353 Merge pull request #4864 from synergy/revert-4634-sparrowt-issue3774-fix-missing-dlls
Revert "Fix missing DLLs after install #3774"
2015-07-09 17:00:08 -07:00
Jerry (Xinyu Hou)
c2841fcb58 Merge pull request #4863 from synergy/revert-4382-master
Revert "Add drag and drop enable option to GUI settings"
2015-07-09 16:56:27 -07:00
Jerry (Xinyu Hou)
7254e621e1 Revert "Fix missing DLLs after install #3774" 2015-07-09 10:00:02 -07:00
Jerry (Xinyu Hou)
8676f64b96 Revert "Add drag and drop enable option to GUI settings" 2015-07-09 09:54:57 -07:00
Nick Bolton
d961106df9 Update ChangeLog 2015-07-07 16:37:30 -07:00
Jerry (Xinyu Hou)
284b2e7f2a Revert "Versioned to 1.7.5"
This reverts commit 6e74655e78.
2015-07-07 12:15:14 -07:00
Jerry (Xinyu Hou)
cfec3a93f2 Fixed code style 2015-07-06 16:48:36 -07:00
Jerry (Xinyu Hou)
260a7337d3 Added timestamp in log #4845 2015-07-06 15:50:21 -07:00
Jerry
23739f8484 Prevented open clipboard twice #4815 2015-07-06 13:00:28 -07:00
Jerry
6e74655e78 Versioned to 1.7.5 2015-07-06 12:59:57 -07:00
Jerry (Xinyu Hou)
8a026e06bd Merge remote-tracking branch 'origin/v1.7.4-stable' 2015-06-30 15:43:39 -07:00
Jerry (Xinyu Hou)
44fa44fd1b Fixed using non existing function #4745 2015-06-30 15:05:24 -07:00
Xinyu Hou
00734c15b1 Removed notify log level in settings #4745 2015-06-30 22:45:48 +01:00
Xinyu Hou
85dc7a566e Made log consistent #4745 2015-06-30 03:37:36 +01:00
Xinyu Hou
6d5f997a1e Removed notification but use tray icon #4745 2015-06-30 01:42:08 +01:00
Jerry (Xinyu Hou)
673fba5846 Merge branch 'master' of https://github.com/synergy/synergy 2015-06-25 12:38:33 -07:00
Jerry (Xinyu Hou)
3aebb87b37 Fixed using old log level convention #4745 2015-06-25 11:25:58 -07:00
Adam Potolsky
9dc0a1d862 Added comment for clarity #4750 2015-06-25 09:54:28 -07:00
Adam Potolsky
25c1754d2d Merge branch 'master' into adam-sandbox 2015-06-25 09:46:21 -07:00
Adam Potolsky
4569de5413 Fixed misplaces statis string in windows code #4793 2015-06-25 09:44:16 -07:00
Adam Potolsky
d7043ef84b Added plugin version output to unix builds #4793 2015-06-25 09:35:56 -07:00
Adam Potolsky
55a38ff8cc removed unnecessary flag settings, fixed wrong call. #4750 2015-06-24 17:57:22 -07:00
Adam Potolsky
f10f0f13c4 retry case needs to do another job with the same parameters not just a new job #4750 2015-06-24 16:31:47 -07:00
Adam Potolsky
2df88e07c4 fixed retry logic for secure connect and accept #4750 2015-06-24 12:20:25 -07:00
Adam Potolsky
c7a4ab8fb7 Merge branch 'adam-sandbox' of https://github.com/synergy/synergy into adam-sandbox 2015-06-24 11:11:48 -07:00
Adam Potolsky
e50b239592 Changed secure connest and accept to match read/write retry logic #4750 2015-06-24 11:11:20 -07:00
Adam Potolsky
c9b60eca27 Changed secure connest and accept to match read/write retry logic #4750 2015-06-24 10:34:19 -07:00
Adam Potolsky
6442bcb8f6 Change PluginWizardPage to take and use MainWindow instead of appConfig #4823 2015-06-23 17:11:39 -07:00
Adam Potolsky
19f5ad8cab Add delay routine to MainWindow to allow sleep in a Qt friendly way #4823 2015-06-23 17:10:49 -07:00
Adam Potolsky
415ac8e1dc Updated ChangeLog for 1.7.4 release 2015-06-22 10:19:34 -07:00
kahiroka
267f3ac41f workaround for Fast cursor on any client with Mac server #451 2015-06-19 17:20:26 -07:00
Adam Potolsky
5d399c3e61 Added additional fixes to changelog 2015-06-19 16:44:55 -07:00
Adam Potolsky
121080be74 removed non-existant file from gui.pro to remove warning #4810 2015-06-18 14:45:41 -07:00
Adam Potolsky
d51e2e4fb1 Merge branch 'v1.7.4-stable' of https://github.com/synergy/synergy into v1.7.4-stable 2015-06-18 14:19:06 -07:00
Adam Potolsky
3eef49d5c9 Removed mutex locking from get and set of log level #4809 2015-06-18 14:18:05 -07:00
Jerry (Xinyu Hou)
f3472c84e2 Show notification only on Debug level or above #4745 2015-06-18 13:50:38 -07:00
Nick Bolton
ebb7edfb0f ChangeLog for v1.7.4-stable 2015-06-17 16:45:15 -07:00
Jerry (Xinyu Hou)
14046db32a Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-06-15 09:59:38 -07:00
Jerry (Xinyu Hou)
667b6f13c7 Enforced secure socket rewrite on the same buffer address #4712 2015-06-12 18:03:28 -07:00
Jerry (Xinyu Hou)
3e32d9fbee Improved secure socket intensive try operations #4796 2015-06-12 16:53:41 -07:00
Adam Potolsky
9893a018b1 Merge pull request #4634 from sparrowt/sparrowt-issue3774-fix-missing-dlls
Fix missing DLLs after install #3774
2015-06-12 16:14:15 -07:00
Adam Potolsky
768445816b Merge branch 'adam-sandbox' 2015-06-12 16:03:34 -07:00
Adam Potolsky
efab42962f Merge branch 'master' of https://github.com/synergy/synergy 2015-06-12 16:03:25 -07:00
Adam Potolsky
afb0e2a2ea Added log level protection, changed log levels for some logging #4793 2015-06-12 15:07:53 -07:00
Adam Potolsky
ad37db13a9 Merge branch 'adam-sandbox' of https://github.com/synergy/synergy into adam-sandbox
Conflicts:
	src/lib/plugin/ns/SecureSocket.cpp
2015-06-12 14:45:29 -07:00
Adam Potolsky
16a2815504 Added additional SSL logging abotu connection information as well as client and server cipher availability #4793 2015-06-12 14:40:15 -07:00
Adam Potolsky
4b0dec69bf Added additional SSL logging abotu connection information as well as client and server cipher availability #4793 2015-06-12 14:33:28 -07:00
Jerry (Xinyu Hou)
72060e59b4 Fixed send clipboard thread time issue #4749 2015-06-12 11:21:05 -07:00
Jerry (Xinyu Hou)
1e89aa37c5 Merge pull request #4382 from meowfaceman/master
Make drag and drop optional #4327
2015-06-12 19:12:57 +01:00
Adam Potolsky
5696497bc0 Added code to throw an error if the plugin can't be deleted or written to #4696 2015-06-11 17:40:26 -07:00
Adam Potolsky
6bb44fbc59 Merge pull request #4228 from galkinvv/fix2866
High client CPU usage and laggy mouse
2015-06-11 16:12:40 -07:00
Adam Potolsky
eb84d17725 Merge branch '4696' of github.com:synergy/synergy into 4696 2015-06-11 10:10:41 -07:00
Adam Potolsky
3942dc6ee8 Added stub code for linux/mac builds to match the functional ARCH code for discovering libraris in use #4793 2015-06-11 10:00:45 -07:00
Adam Potolsky
6b0f02b567 Merge branch '4696' of github.com:synergy/synergy into 4696 2015-06-10 13:25:33 -07:00
Adam Potolsky
bfd0a45d59 Added version string to plugin and added to plugin loaded message 2015-06-10 13:25:20 -07:00
Adam Potolsky
fa0dfa0ded Added ability to query lib locations to windows builds 2015-06-10 13:18:39 -07:00
Adam Potolsky
8366bb6247 Added OpenSSL version and location logging 2015-06-10 10:20:59 -07:00
Nick Bolton
f94e1e1660 Disabled intermittently failing unit test #4651 2015-06-10 07:04:58 -07:00
Jerry (Xinyu Hou)
099c984d7d Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-06-09 16:05:43 -07:00
Jerry (Xinyu Hou)
f36d257495 Updated the comments 2015-06-09 15:48:08 -07:00
Jerry (Xinyu Hou)
81acb96540 Tried to fix random unittest fail (part2) 2015-06-09 15:33:57 -07:00
Adam Potolsky
0c211e2852 Adding logging output when ssl connects for aid in debugging and support 2015-06-09 14:07:42 -07:00
Jerry (Xinyu Hou)
deb3db93e6 Tried to fix random unittest fail 2015-06-09 13:59:04 -07:00
Jerry (Xinyu Hou)
7115db1176 Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-06-09 10:59:49 -07:00
Adam Potolsky
e52d21a003 Merge branch 'master' of github.com:synergy/synergy
# Conflicts:
#	ext/toolchain/commands1.py
2015-06-09 10:55:04 -07:00
Jerry (Xinyu Hou)
552f914549 Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-06-09 10:54:33 -07:00
Adam Potolsky
c8740a4971 Added copying of MacOS plugins to Synergy bundle #4696 2015-06-09 10:19:27 -07:00
Adam Potolsky
82f822b51a Added copying of MacOS plugins to Synergy bundle #4696 2015-06-08 16:50:50 -07:00
Jerry (Xinyu Hou)
8e15b77db3 Added warning for enable encryption #4584 2015-06-08 15:39:33 -07:00
Jerry (Xinyu Hou)
756000d8a9 Removed warning and error logging level in GUI #4745 2015-06-08 14:44:31 -07:00
Jerry (Xinyu Hou)
a21e4cd73b Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-06-08 13:53:01 -07:00
Adam Potolsky
ed37eeca51 Merge branch '4696' 2015-06-08 13:24:47 -07:00
Adam Potolsky
155a8b70c4 Added version string to plugin and added to plugin loaded message 2015-06-05 17:07:47 -07:00
Adam Potolsky
2db2ffac84 Adding Windows Plugins Directory to install #4696 2015-06-05 16:55:36 -07:00
Jerry (Xinyu Hou)
5c71efebe6 Fixed integtests #4584 2015-06-05 15:23:44 -07:00
Jerry (Xinyu Hou)
756c3b4463 Inserted keep alive msg among data transfer #4584 2015-06-05 15:21:32 -07:00
Jerry (Xinyu Hou)
bbf53bb9b8 Return the same job on retry #4584 2015-06-05 15:21:26 -07:00
Jerry (Xinyu Hou)
0680c33909 Added file events #4584 2015-06-05 15:21:17 -07:00
Adam Potolsky
f230ae734e Adding install of plugins for rpm based systems #4696 2015-06-05 11:20:31 -07:00
Jerry (Xinyu Hou)
7795d68c21 Removed magic number #4712 2015-06-04 14:46:47 -07:00
Jerry (Xinyu Hou)
eb3f8aee2a Notified file transmission interrupted #4745 2015-06-04 14:43:49 -07:00
Adam Potolsky
88e5c6197d Trivial whitespace fix cause by by editor settings 2015-06-04 14:06:17 -07:00
Jerry (Xinyu Hou)
646e1b52eb Interrupted file transfer when cursor move back #4584 2015-06-04 13:09:48 -07:00
Jerry (Xinyu Hou)
e0903983ad Validated file expected size #4584 2015-06-04 10:19:36 -07:00
Jerry (Xinyu Hou)
8c64cbf54e Refactored send drag info on server #4584 2015-06-04 10:04:08 -07:00
Adam Potolsky
78f8fb45ba Fixed Installed Directory in ARCH for MacOS #4696 2015-06-04 09:58:22 -07:00
Jerry (Xinyu Hou)
ee22e688d5 Removed clipboard ignore notification #4745 2015-06-03 17:32:09 -07:00
Jerry (Xinyu Hou)
d9684d44d2 Added fake drag file list #4584 2015-06-03 16:17:26 -07:00
Jerry (Xinyu Hou)
4508e10186 Fixed IpcLogOutputterTest #4721 2015-06-03 15:23:33 -07:00
Jerry (Xinyu Hou)
7614a21aac Cleared buffer on send instead of write #4721 2015-06-03 14:45:47 -07:00
Jerry (Xinyu Hou)
c4e8dc7198 Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-06-02 15:30:33 -07:00
Adam Potolsky
4099698817 Merge branch '4696' of github.com:synergy/synergy into 4696 2015-06-02 14:29:45 -07:00
Adam Potolsky
ad9cfd64af Added symbolic link creation to linux and macos #4696 2015-06-02 14:29:01 -07:00
Adam Potolsky
0061969cf2 Updating installed dir for Linux and MacOS #4696 2015-06-02 14:28:20 -07:00
Jerry (Xinyu Hou)
22e8d3d03a Fixed clipboard transmission messing up start/stop $4745 2015-06-02 13:42:27 -07:00
Jerry (Xinyu Hou)
8d0fdee5ce Added full stop for notification #4745 2015-06-02 11:18:21 -07:00
Jerry (Xinyu Hou)
f42b756b0e Added clipboard transmission failed notification #4745 2015-06-02 11:17:04 -07:00
Jerry (Xinyu Hou)
f22d9ac477 Added clipboard transmission start notification #4745 2015-06-02 11:14:28 -07:00
Jerry (Xinyu Hou)
d9921c894c Added clipboard transmission notification #4745 2015-06-02 09:48:26 -07:00
Adam Potolsky
0d237a07bc Updating installed dir for Linux and MacOS #4696 2015-06-01 20:33:00 -07:00
Jerry (Xinyu Hou)
ce2c797f69 Made code more readable #4745 2015-06-01 16:58:21 -07:00
Jerry (Xinyu Hou)
3d55516fdf Removed unused code #4745 2015-06-01 16:56:52 -07:00
Adam Potolsky
d215c49966 Merge branch '4696' of github.com:synergy/synergy into 4696 2015-06-01 16:52:08 -07:00
Adam Potolsky
e784b48711 Added use of Installed Dir for finding plugin install directory #4696
Fixed issues with file path creation #4696
2015-06-01 16:50:05 -07:00
Adam Potolsky
c1158ea7f9 Removed speaker and system hard coded locations from code #4696
Removed previously commended out code that is unnecessary #4696
2015-06-01 16:48:12 -07:00
Adam Potolsky
4a7fdabd65 Added Installed Dir to PluginManager #4696 2015-06-01 16:46:33 -07:00
Adam Potolsky
5d770d4204 Added getInstallDir to Core Interface #4696 2015-06-01 16:43:57 -07:00
Adam Potolsky
98bb9b3fb3 Added getInstalledDir to ToolApp. #4696 2015-06-01 16:43:27 -07:00
Jerry (Xinyu Hou)
4533063768 Fixed compile error on Unix #4745 2015-06-01 16:04:13 -07:00
Jerry (Xinyu Hou)
bfe616eebe Added file transmission started notification for server #4745 2015-06-01 16:00:35 -07:00
Jerry (Xinyu Hou)
d1ca021002 Monitoring log to show notification and made icon change while transfering $4745 2015-06-01 15:59:59 -07:00
Xinyu Hou
5cbcd74028 Fixed using NOTE level logging on Mac #4745 2015-06-01 23:42:58 +01:00
Jerry (Xinyu Hou)
e7f358afb2 Added file transmission started, failed and complete notification #4745 2015-06-01 15:33:06 -07:00
Jerry (Xinyu Hou)
5006adedfe Changed note to notify #4745 2015-06-01 14:46:08 -07:00
Jerry (Xinyu Hou)
d3a4ce1f11 Moved note into either warning or info #4745 2015-06-01 14:31:32 -07:00
Jerry (Xinyu Hou)
ecf0485e8f Removed commented out code #4745 2015-06-01 12:39:30 -07:00
Jerry (Xinyu Hou)
4a27c0b05c Added drop file notification on client #4745 2015-06-01 11:57:43 -07:00
Adam Potolsky
b4c8e3c0eb Merge branch '4696' of github.com:synergy/synergy into 4696 2015-06-01 10:36:13 -07:00
Jerry (Xinyu Hou)
bd3a8e9429 Fixed unittest for ipcLogOutputter #4721 2015-05-29 17:48:53 -07:00
Jerry (Xinyu Hou)
97bac70fae Stop writing into and clear buffer when no GUI #4721 2015-05-29 16:55:22 -07:00
Adam Potolsky
4bf1eeb065 Removed unnecessary method and static data #4696 2015-05-29 16:47:51 -07:00
Adam Potolsky
1229974d2f Merge branch 'master' into 4696
Conflicts:
	src/gui/src/PluginManager.cpp
2015-05-29 16:39:31 -07:00
Adam Potolsky
e35fd80cef Fixed name for Mac and Linux Build #4696 2015-05-29 16:20:47 -07:00
Adam Potolsky
8d70075171 Replaces plugin download with install and copy functionality #4696 2015-05-29 15:57:21 -07:00
Jerry (Xinyu Hou)
9487db1672 Merge pull request #4722 from maximd/master
Fix issue synergy/synergy#4720
2015-05-28 16:58:44 -07:00
Jerry (Xinyu Hou)
d7063a87c8 Fixed using wrong local variable #4723 2015-05-27 10:32:13 -07:00
Jerry (Xinyu Hou)
aec52c36e6 Added timeout for waiting active destop result #4723 2015-05-27 10:18:45 -07:00
Jerry (Xinyu Hou)
3498d1bc8e Used synergy::string::sprintf instead of append #4690 2015-05-27 09:52:58 -07:00
Maxim Doucet
03fc9b5fa7 Fix issue synergy/synergy#4720 2015-05-27 18:34:47 +02:00
Jerry (Xinyu Hou)
d83cb23cc7 Reverted 8b9758 #4712 2015-05-26 17:25:18 -07:00
Jerry (Xinyu Hou)
907b02fb09 Used log system instead of stdout (part 2) #4690 2015-05-26 17:18:14 -07:00
Jerry (Xinyu Hou)
3788084e43 Merge branch 'jerry-sandbox' of https://github.com/synergy/synergy into jerry-sandbox 2015-05-26 17:13:09 -07:00
Jerry (Xinyu Hou)
f063b094ec Used log system instead of stdout #4690 2015-05-26 17:12:58 -07:00
Adam Potolsky
ee2ed0a31c changed synergy-plugins directory to synergy with the sub directory plugins #4696 2015-05-26 16:41:26 -07:00
Jerry (Xinyu Hou)
dba46707b2 Removed SSL chunk size limitation #4712 2015-05-26 13:31:15 -07:00
Adam Potolsky
d816ed6b43 Merge branch 'master' of github.com:synergy/synergy 2015-05-26 13:18:22 -07:00
Adam Potolsky
2d5ad45e08 Adding plugin to install for deb builds. #4696 2015-05-26 13:18:14 -07:00
Jerry (Xinyu Hou)
b34044ec6a Versioned to 1.7.4 2015-05-26 11:50:21 -07:00
Nick Bolton
efd0108597 Fixed "heads/" prepend problem for plugin upload #4695 2015-05-26 16:56:21 +01:00
Nick Bolton
d6cefa73a0 Removed test prepend string from previous commit #4695 2015-05-26 16:49:59 +01:00
Nick Bolton
5faa5178b4 Remove 'heads/' string from git branch name #4695 2015-05-26 16:49:23 +01:00
Nick Bolton
9b3d6d5665 Fake commit to force buildbot to build this branch 2015-05-26 16:31:56 +01:00
Nick Bolton
55c9f46156 Fixed version name for 1.7.1 in ChangeLog 2015-05-26 16:01:45 +01:00
Nick Bolton
ace8ffd6a8 Fixed version names in ChangeLog 2015-05-26 15:58:49 +01:00
Nick Bolton
f5d303cab2 ChangeLog for v1.7.3-stable 2015-05-26 15:58:49 +01:00
Nick Bolton
8b975878c2 Limited clipboard size to 1kb when SSL is enabled #4601
@XinyuHou I had no choice but to block clipboard data over 1kb in
size... anything over that and you get an access violation.
2015-05-26 15:04:04 +01:00
Nick Bolton
fd72bf17ce Reworded SSL errors to be more consistent #4650 2015-05-26 14:17:30 +01:00
Nick Bolton
42ed1c2f27 Increased ssl error rate limit from 50k to 100k #4650
@speaker This is nuts... my mac client now errors 50k times before it
eventually connects.
2015-05-26 14:14:24 +01:00
Nick Bolton
3dc3d5b309 Increased ssl error rate limit from 60 to 50000 #4650
@speaker, a 50k limit seems a bit insane, but it seems to be the only
way to get my Mac client to establish a connection :-/
2015-05-26 14:00:50 +01:00
Nick Bolton
e96cead732 Fixed wrong sprintf specifier used (%s instead of %d) #4650
My bad, I was being carless in 4aa57cfbdb
2015-05-26 12:19:13 +01:00
Nick Bolton
4aa57cfbdb Fixed code style, more consistent logging #4650 2015-05-25 20:24:29 +01:00
Nick Bolton
1cea4bb80f Fixed code style, use lower case for logging #4650 2015-05-25 20:20:12 +01:00
Nick Bolton
0fdcfe9b95 Fixed code style, prefer enums over macros #4650 2015-05-25 20:20:12 +01:00
Nick Bolton
3563217c7b Fixed Mac package platform variable name #4708 2015-05-25 19:54:34 +01:00
Nick Bolton
590d0482b3 Removed useless processor type return for Mac #4708 2015-05-25 19:54:21 +01:00
Nick Bolton
e8a43dd020 Simplified logic to detect Linux 64/32 deb/rpm #4565 2015-05-25 19:41:53 +01:00
Nick Bolton
e479f16705 Incremented default plugin version to 1.1 2015-05-25 18:59:58 +01:00
Nick Bolton
cae767735c Download specific plugin version on Mac #4708 2015-05-25 18:59:58 +01:00
Nick Bolton
38bcea54d8 Do nothing if plugins dir doesn't exist #4695 2015-05-25 18:17:09 +01:00
Nick Bolton
14bb44f539 Comment explaining lack of 10.7 support #4695 2015-05-25 17:41:38 +01:00
Nick Bolton
25237a14b7 Revert "Allowed Mac OS X 10.7 to build ns plugin #4695"
This reverts commit a900543c1d.
2015-05-25 17:40:36 +01:00
Nick Bolton
8ed3d79cc2 Only upload plugin if file exists #4695
Some platforms (e.g. Mac 10.6) don't build the plugin
2015-05-25 16:57:28 +01:00
Nick Bolton
a900543c1d Allowed Mac OS X 10.7 to build ns plugin #4695 2015-05-25 16:53:46 +01:00
Nick Bolton
b4b5ce6483 Missing change from last commit, print error #4695 2015-05-25 16:23:21 +01:00
Nick Bolton
d278c2d8d4 Swallow mkd fail in case nlst doesn't work #4695 2015-05-25 16:22:45 +01:00
Nick Bolton
91d05c29db Upload 'ns' to plugins dir (create if not exists) #4695 2015-05-25 16:05:16 +01:00
Nick Bolton
e4959a7661 Removed angry files accidentally uploaded
I'm having a bad day
2015-05-25 15:44:18 +01:00
Nick Bolton
cbb4cec841 Fixed bad indentation for getLinuxPlatform() #4695
Caused by 16d9bd8f0d
2015-05-25 15:28:32 +01:00
Nick Bolton
b71c298163 Changed sleep time to 100ms for unit test (hack) #4651 2015-05-25 15:25:14 +01:00
Nick Bolton
16d9bd8f0d Fixed messed up indentation in commands1.py #4695 2015-05-25 15:19:54 +01:00
Nick Bolton
74dda188dc Reintroduced accidentally removed functions #4695 2015-05-25 15:17:18 +01:00
Nick Bolton
6ba2ddeb7d Added ns upload support to distftp step #4695
Needed to refactor the 'figure out platform and ext' code.
2015-05-25 15:07:32 +01:00
Nick Bolton
d175ad5c70 Moved installer output to Release build config dir #4706
Missing change from last commit
2015-05-25 14:55:03 +01:00
Nick Bolton
6788f3db39 Moved installer output to Release build config dir #4706 2015-05-25 14:21:09 +01:00
Nick Bolton
18344e6b52 Copy ns plugin to debug dir when in debug mode #4704 2015-05-25 13:08:47 +01:00
Nick Bolton
f322a79760 Copy plugins to config dir on Mac #4703 2015-05-25 13:07:36 +01:00
Jerry (Xinyu Hou)
b1f2abbaae Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-05-22 16:39:33 -07:00
Xinyu Hou
fb3252efef Added a way to interrupt sending clipboard/file #4601 2015-05-23 00:34:00 +01:00
Adam Potolsky
905dbfee90 Fixed order of initializers for mac build #4697 2015-05-22 16:26:40 -07:00
Adam Potolsky
773530506e Merge branch 'master' of https://github.com/synergy/synergy 2015-05-22 16:10:29 -07:00
Adam Potolsky
35e09c46b9 Changed secureSocket routines to return a status, and modify an argument for num of bytes handled #4697 2015-05-22 16:09:59 -07:00
Jerry (Xinyu Hou)
ff9ad5554a Used different chunk size for SSL and non-SSL socket #4601 2015-05-22 13:30:50 -07:00
Jerry (Xinyu Hou)
36ddc4f1c1 Fixed indentation 2015-05-22 13:10:22 -07:00
Jerry (Xinyu Hou)
625feab104 Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-05-22 12:40:24 -07:00
Jerry (Xinyu Hou)
c1d859e35a Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-05-22 11:28:39 -07:00
Jerry (Xinyu Hou)
a81b88c730 Refactored file assemble and send code #4601 2015-05-22 11:27:57 -07:00
Adam Potolsky
7b718dc586 Forgot to change linux specific variable name #4697 2015-05-22 11:17:10 -07:00
Adam Potolsky
86ad2bf080 Merge branch 'master' of https://github.com/synergy/synergy 2015-05-22 10:56:33 -07:00
Adam Potolsky
5b3fa48902 Made socket self-aware of when it is in a fatal state #4697
Added code to cleanly terminate connection on fatal socket state #4697
2015-05-22 10:56:13 -07:00
Jerry (Xinyu Hou)
1df566d241 Refactored duplicated code #4601 2015-05-21 17:50:55 -07:00
Jerry (Xinyu Hou)
1c28444cf6 Refactored duplicated code #4601 2015-05-21 16:04:50 -07:00
Jerry (Xinyu Hou)
342a345d1f Fixed code style 2015-05-21 15:35:36 -07:00
Jerry (Xinyu Hou)
257c19ecc4 Deprecated and moved clipboard functionality into new protocol #4601 2015-05-21 15:34:28 -07:00
Adam Potolsky
e4f86a8934 Adding pass/fail retry logic to connection attempts #4697 #4650 2015-05-21 15:22:39 -07:00
Jerry (Xinyu Hou)
8b49eb6595 Removed unused function #4601 2015-05-21 15:19:00 -07:00
Jerry (Xinyu Hou)
c22e327eed Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-05-21 11:37:42 -07:00
Nick Bolton
0de7a08b4c Updated wizard version to '4' to force plugin download #4529 2015-05-21 16:49:07 +01:00
Adam Potolsky
18d85f1b6b Merge branch 'master' of https://github.com/synergy/synergy 2015-05-20 16:56:32 -07:00
Adam Potolsky
68ecdc0753 Added additional logging to help debug potential problems related to performance and SSL WAIT states #4650 2015-05-20 16:54:42 -07:00
Jerry (Xinyu Hou)
7dbe30cb61 Fixed Linux uses wrong clipboard event #4601 2015-05-20 14:43:58 -07:00
Adam Potolsky
ad86041433 Added code to test for and error out of max retry condition #4650 2015-05-20 14:27:25 -07:00
Adam Potolsky
1af9d58a9b Changed conditional to match coding standard #4650 2015-05-20 14:14:30 -07:00
Adam Potolsky
81a70135bd Added concept of a max retry count to SecureSocket class #4650 2015-05-20 13:50:18 -07:00
Adam Potolsky
994a9433fe Converting retry to a counter #4650 2015-05-20 12:08:25 -07:00
Xinyu Hou
3e9fc89d96 Modified server to use correct clipboard format #4601 2015-05-20 19:54:56 +01:00
Xinyu Hou
490667e21b Used StreamChunker to send clipboard in chunks #4601 2015-05-20 19:54:17 +01:00
Xinyu Hou
cf5347c8f6 Sent clipboard on a thread #4601 2015-05-20 19:53:30 +01:00
Xinyu Hou
49ac320f97 Refactored clipboard event into ClipboardEvent #4601 2015-05-20 19:09:54 +01:00
Nick Bolton
950219b39e Fixed init order warning on Mac #4624 2015-05-20 17:51:52 +01:00
Nick Bolton
561204b2a7 Disabled threading on most IPC logging tests #4624
Threading was making it very hard to reliably run the IPC logging tests
(many timing issues), so I disabled threading for most of the tests.
2015-05-20 17:42:07 +01:00
Nick Bolton
89a977da66 Positive tests for IPC logging #4624
So far I had only tested what happens when the limits are exceeded.
These new tests are for when usage is within limits.
2015-05-20 16:16:22 +01:00
Nick Bolton
a710b2752b Reintroduced sleep for really fast computers #4624 2015-05-20 16:07:09 +01:00
Nick Bolton
9636af61d6 Solution attempt for timing bugs in write_bufferRateLimit
It's probably better to wait until the buffer is sent, rather than
waiting until its empty. To test the output it has to be sent, but
because of timing, it may be emptied at any point.
2015-05-20 15:51:07 +01:00
Nick Bolton
f1af62927e Stopped Unix plugin loader from throwing #4661
Tested on Mac OS X only
2015-05-20 15:24:10 +01:00
Nick Bolton
4746347fe7 Revert "Stopped Unix plugin loader from throwing #4661"
This reverts commit 1fd5883620.
2015-05-20 15:23:41 +01:00
Jerry (Xinyu Hou)
a6dfbbe021 Validated received clipboard data size #4601 2015-05-19 14:28:38 -07:00
Jerry (Xinyu Hou)
2c74a7f5c1 Added stringToSizeType and its unittest #4601 2015-05-19 14:23:43 -07:00
Jerry (Xinyu Hou)
c032091dd5 Added send clipboard finish log #4601 2015-05-19 13:51:13 -07:00
Jerry (Xinyu Hou)
00ceda55dc Merge remote-tracking branch 'origin/master' into jerry-sandbox 2015-05-19 11:37:45 -07:00
Jerry (Xinyu Hou)
eaff6f50f8 Added sending clipboard chunks handling #4601 2015-05-19 10:54:02 -07:00
Jerry (Xinyu Hou)
6e7b3d87c5 Added changes for StreamChunker that is left from last commit #4601 2015-05-19 09:37:15 -07:00
Jerry (Xinyu Hou)
c674642181 Used StreamChunker for clipboard and file transfer #4601
Clipboard is not handled at this point
2015-05-19 09:30:35 -07:00
Nick Bolton
1fd5883620 Stopped Unix plugin loader from throwing #4661
Tested on Mac OS X only
2015-05-19 14:47:16 +01:00
Nick Bolton
11a7d2c4c2 Stopped Windows plugin loader from throwing #4661
System error message hidden with 'SetErrorMode(SEM_FAILCRITICALERRORS)'
2015-05-19 14:40:33 +01:00
Nick Bolton
46527ded56 Limited Windows service log file size to 1MB #4677
Oversized file is renamed to .1 to keep old log files in case needed,
but the old file will eventually be overwritten on 2nd recycle
2015-05-19 14:04:02 +01:00
Nick Bolton
2cce60f672 Fixed sleep timing on IPC log rate limit unit tests #4624
Still a little hacky, but seems stable on my dev machine
2015-05-19 10:41:04 +01:00
Nick Bolton
efa358f917 Added comment about hacky log line #4690
@XinyuHou, when adding hacks, please annotate with a comment
2015-05-19 10:28:02 +01:00
Jerry (Xinyu Hou)
70be9cd97f Refactored intToString #4601 2015-05-18 11:27:54 -07:00
Jerry (Xinyu Hou)
af73e8280d Increased protocol version number to 1.6 #4601 2015-05-18 11:25:58 -07:00
Nick Bolton
62a501066f Disabled IPC logging tests for Mac and Linux #4624
This is a bit hacky, but IPC logging isn't used on Mac and Linux anyway,
and we're hopefully going to remove it.
2015-05-18 18:19:43 +01:00
Jerry (Xinyu Hou)
30f96b9fbb Renamed FileChunker to StreamChunker #4601 2015-05-18 10:17:22 -07:00
Nick Bolton
9f577ca4f3 Added rate limiting to IPC logging #4624 2015-05-18 18:06:58 +01:00
Nick Bolton
b27b236c07 Disabled failing IPC tests for Mac #4651 2015-05-18 16:39:54 +01:00
Nick Bolton
984c5885f7 Fixed Mac build by hacking out mutex close #4651 2015-05-18 16:09:09 +01:00
Jerry (Xinyu Hou)
4c36c08099 Send clipboard data in a thread #4601 2015-05-16 00:06:38 +01:00
Jerry (Xinyu Hou)
44089d55e8 Send clipboard data in small chunks without using thread #4601 2015-05-15 22:28:43 +01:00
Nick Bolton
e60b3a6feb Added truncating to IPC log buffer queue #4651
When the IPC log buffer is too large, the oldest log line is removed
when a new log line is added.
2015-05-15 15:04:16 +01:00
Nick Bolton
aac59fbf7e File missing from last commit #4651 2015-05-15 14:44:25 +01:00
Nick Bolton
2e3769c7a6 Added failing test for IpcLogOutputter::write(...) #4651
- Changed behavior of close() to stop the buffer thread
- Fixed code style in IpcLogOutputter.cpp
- Changed MAX_SEND macro to enum
- Added Doxygen @name sections
2015-05-15 14:43:42 +01:00
Jerry (Xinyu Hou)
08aee6cba7 Fixed cast error from pointer to small type on Unix #4601 2015-05-14 14:39:03 -07:00
Jerry (Xinyu Hou)
220b6befab Used a thread to send clipboard data #4601 2015-05-14 13:51:21 -07:00
Nick Bolton
134a15ea8d Modified IpcServer to be mockable #4651
Also started IpcLogOutputterTests
2015-05-14 18:01:39 +01:00
Adam Potolsky
8c82996fc4 Merge pull request #4608 from legonigel/master
Rename license to LICENSE closes #4487
2015-05-08 09:06:06 -07:00
Tom Sparrow
9b87ca3807 Fix missing DLLs after install #3774
The CompanionFile attribute was causing the installer to be confused:
 Won't Overwrite; Won't patch; Existing file is unversioned but modified
and hence not install a bunch of these DLLs in some cases.
2015-05-08 00:54:09 +01:00
XinyuHou
b7dfd100d9 Version to 1.7.3 2015-05-07 16:35:21 +01:00
XinyuHou
2483a2a479 Fixed tab indentation in ChangeLog 2015-05-07 13:22:56 +01:00
XinyuHou
728e9cda8c Updated ChangeLog for 1.7.2 2015-05-07 11:55:49 +01:00
XinyuHou
1c5ade982e Merge branch 'build_using_openssl_binaries' 2015-05-07 10:26:59 +01:00
Nigel Armstrong
d71304ee55 Modified header of every file COPYING to LICENSE
Modified to match the updated name of the license file
2015-05-06 22:12:44 -04:00
Nigel Armstrong
e920d5efae Rename license to LICENSE closes #4487 2015-05-06 22:07:36 -04:00
XinyuHou
be1769e4a5 Fixed Mac crashes instantly on syntool segfault #4581 2015-05-06 16:36:49 +01:00
XinyuHou
932b0f0c55 Fixed GUI doesn't start after install on Windows #4607 2015-05-06 16:19:51 +01:00
Nick Bolton
50c8f87a6a Updated translation files 2015-05-06 15:28:19 +01:00
XinyuHou
9e9e1362ac Fixed typo and regenerated master ts #4596 2015-05-06 14:25:18 +01:00
Jerry (Xinyu Hou)
02bfeff1b2 Merge pull request #4596 from joweiser/patch-1
Typo 'occurred' in WebClient.cpp
2015-05-06 14:00:07 +01:00
XinyuHou
b35911eaf2 Updated ignore list 2015-05-06 13:22:34 +01:00
XinyuHou
68edff43cd Merge branch 'pr-jpmcmu-macosx-sticky-key-fix' 2015-05-06 13:20:54 +01:00
XinyuHou
1f0adb0d7b Fixed warning on Linux #4570 2015-05-06 12:11:12 +01:00
XinyuHou
c168721d2f Added deprecated args handling #4570 2015-05-06 11:57:42 +01:00
Adam Potolsky
c3f003bf5b Adding new binary installer locations to make files #4587 2015-05-01 16:56:45 -07:00
Adam Potolsky
fcf68d1ce4 Adding OSX binaries and headers for compilation from binaries #4587 2015-05-01 16:55:29 -07:00
Adam Potolsky
a88bf3d3f0 Merge branch 'master' of https://github.com/synergy/synergy into build_using_openssl_binaries 2015-04-30 09:31:55 -07:00
Johannes Weiser
82bb539d5e Typo in WebClient.cpp 2015-04-29 22:18:15 +02:00
Adam Potolsky
54ca552aa6 added gvim swap files to gitignore 2015-04-29 11:42:15 -07:00
Adam Potolsky
5266d94faa Added code to fetch openssl libs from archetecture specific location #4587 2015-04-29 11:35:12 -07:00
Adam Potolsky
fb1a4456a6 Correcting binaries for #4587 2015-04-29 11:02:49 -07:00
Adam Potolsky
503a6e26bf Added variable to define location of windows binaries #4587 2015-04-29 10:27:41 -07:00
Adam Potolsky
b7d869c7a7 Added additional required files #4587 2015-04-29 10:26:40 -07:00
Adam Potolsky
39c26f38f1 Removed wrong libs and replaced them with correct ones #4587 2015-04-29 10:26:25 -07:00
XinyuHou
4af987e8de Made secure socket logging more user friendly #4558 2015-04-29 13:25:01 +01:00
XinyuHou
88a8099881 Merge branch 'jerry-sandbox' 2015-04-29 12:57:42 +01:00
Xinyu Hou
783673127f Reverted to legacy Mac deployment and signing #4591 2015-04-29 12:22:39 +01:00
Adam Potolsky
e8b4017960 Changing ns plugin to use new binaries instead of older source directory. #4587 2015-04-28 11:55:59 -07:00
Adam Potolsky
db631ac61d Checking in Win32 and Win64 binaries #4587 2015-04-28 11:55:16 -07:00
Adam Potolsky
25cce186dd Adding VIM temp files to the gitignore 2015-04-28 10:37:40 -07:00
Adam Potolsky
99e84b82f9 adding genlist to the usage output (#4586) 2015-04-28 10:37:20 -07:00
Xinyu Hou
a1977fa009 Updated ignore list 2015-04-28 13:22:02 +01:00
XinyuHou
a597596654 Merge branch 'MacOSX-Sticky-Key-Fix' of https://github.com/jpmcmu/synergy into pr-jpmcmu-macosx-sticky-key-fix 2015-04-24 12:34:08 +01:00
XinyuHou
c7b444a762 Modified auto hide feature #4569
Made auto hide on startup and added an info masseage on first connection
2015-04-23 17:32:18 +01:00
XinyuHou
fb76dee8cc Reintroduced GUI auto-hide setting (disabled by default) #4569 2015-04-23 15:37:07 +01:00
XinyuHou
fb6186304b Dropped SSLv3 support #4567 2015-04-23 13:02:42 +01:00
XinyuHou
decf7ca313 Removed unused dependency #4520 2015-04-23 13:02:42 +01:00
XinyuHou
a7848d6cd2 Made comment more clear #4567 2015-04-23 13:02:42 +01:00
jpmcmu
8cd256a0b2 Removed stray character. 2015-04-23 07:04:29 -04:00
jpmcmu
9978a85a4f Added modifier flags to mouse events as a fix for sticky keys. 2015-04-22 19:33:25 -04:00
jpmcmu
1a05bed6da Merge branch 'master' into MacOSX-Sticky-Key-Fix 2015-04-22 19:19:00 -04:00
jpmcmu
abfe8f5b78 Merge remote-tracking branch 'synergy/master' 2015-04-22 19:14:22 -04:00
jpmcmu
564d9b894e Added entry into gitignore for Samba temporary files 2015-04-22 19:13:41 -04:00
Nick Bolton
c4f7c9be70 Version to 1.7.2 2015-04-21 18:49:49 +01:00
Nick Bolton
366f813a2c ChangeLog for v1.7.1-stable 2015-04-21 18:46:32 +01:00
XinyuHou
363dc78ca8 Updated local fingerprint after wizard is finished #4557 2015-04-21 17:56:01 +01:00
XinyuHou
018480412a Stopped retry when fatal error happened in secure socket #4553 2015-04-21 16:54:49 +01:00
Xinyu Hou
423d698436 Fixed secure socket using old trusted fingerprint path #4525 2015-04-21 16:46:05 +01:00
Nick Bolton
f56d06d95d Disabled auto-hide feature #4390 2015-04-21 16:25:55 +01:00
Nick Bolton
d184be31b5 Fixed: SSL dir not created on Mac #4551 2015-04-21 14:48:28 +01:00
Nick Bolton
dbc5da7a48 Refactored certificate class (part 2) #4549 2015-04-21 12:55:45 +01:00
Nick Bolton
7e239c6f71 Refactored certificate class
Split `generateCertificate` into separtate `generateFingerprint`
function, renamed a few functions, removed some unused functions.
2015-04-20 19:26:41 +01:00
Nick Bolton
a894615ca7 Fixed ns plugin using old certificate path #4525 2015-04-20 19:08:03 +01:00
Nick Bolton
f997aea8e7 Moved SSL generate code as is into new class #4549 2015-04-20 18:51:22 +01:00
Nick Bolton
2a2d095527 Merge branch 'master' of https://github.com/synergy/synergy 2015-04-20 16:53:34 +01:00
Nick Bolton
aa9504f43e Changed filenames in app data directory #4525
- Changed `ssl` to `SSL`
- Moved pem file to `SSL`
2015-04-20 16:40:50 +01:00
Nick Bolton
97060d9698 Removed unused SSL download code #4546 2015-04-20 16:31:36 +01:00
Nick Bolton
a649a0e3df Reduced code duplication in fingerprint logic #4548 2015-04-20 16:28:26 +01:00
XinyuHou
5e2b8a5048 Fixed #4537 by add file error checking 2015-04-20 16:16:53 +01:00
Nick Bolton
80fd3cc01b Refactored fingerprint file path logic #4525 2015-04-20 15:58:11 +01:00
Nick Bolton
36a6bb9218 Removed OpenSSL download from plugin manager #4546 2015-04-20 15:27:24 +01:00
XinyuHou
cf6a6bcd48 Removed dead code #4527 2015-04-20 14:57:59 +01:00
Xinyu Hou
e6e3eae0a9 Disabled reconnect after fingerprint failed #4527 2015-04-20 14:43:39 +01:00
Nick Bolton
453638fa39 Added OpenSSL component to installer #4546 2015-04-20 14:35:52 +01:00
Nick Bolton
05b833d1b6 Added OpenSSL config file #4546 2015-04-20 14:35:29 +01:00
XinyuHou
365d16c94b Added more status details #4537 2015-04-17 16:33:43 +01:00
XinyuHou
586a893201 Made retry secure write/read use the exactly last parameters #4539 2015-04-17 14:01:35 +01:00
XinyuHou
951cbe9a62 Enable network security checkbox only when ns plugin exists #4540 2015-04-16 17:15:58 +01:00
XinyuHou
59d013ac6a Show fingerprint only when file exists #4526 2015-04-16 17:12:42 +01:00
XinyuHou
88538e5ee6 Resolve #4526 added local fingerprint in server GUI 2015-04-16 15:10:33 +01:00
XinyuHou
7ab1081b3f Fixed server crash caused by double delete a socket #4535 2015-04-16 11:55:05 +01:00
Nick Bolton
7c6561b3da Fixed #4528 - invalid/misleading log line 2015-04-15 15:17:30 +01:00
Nick Bolton
14bf90264e Renamed function, was reserved keyword on Mac #4522 2015-04-15 14:49:05 +01:00
Nick Bolton
c7de2da062 Comment out unused fingerprint filename consts #4522
Causing compile to fail on Mac (fails on warnings)
2015-04-15 14:33:26 +01:00
Nick Bolton
407f92e9d4 Removed --certificate-fingerprint argument #4522
Used profile dir for fingerprint file path instead
2015-04-15 14:16:28 +01:00
Nick Bolton
6580ad0015 Merge branch 'master' of https://github.com/synergy/synergy 2015-04-15 13:40:55 +01:00
XinyuHou
2752d24dc4 Merge branch 'jerry-sandbox' 2015-04-15 13:33:39 +01:00
Xinyu Hou
e405ec25e3 Always log out server fingerprint #4522 2015-04-15 13:25:18 +01:00
Nick Bolton
689737ee7a Fingerprint file check and trust logic #4522
Also refactored the 'get profile dir' code to use the core interface
(reduce code duplication)
2015-04-15 13:09:22 +01:00
Xinyu Hou
52d9b1beed Logged out new fingerprint when not match #4522 2015-04-15 13:06:49 +01:00
Xinyu Hou
1e2b822226 Removed unused variable 2015-04-14 17:52:24 +01:00
XinyuHou
fa1ea0022b Fixed code style 2015-04-14 17:52:15 +01:00
XinyuHou
f60e98c8cd Fixed error from merge 2015-04-14 17:52:08 +01:00
XinyuHou
916a4c75af Refactored no or wrong ssl certificate error handling #4410
Conflicts:
	src/lib/net/TCPListenSocket.cpp
	src/lib/plugin/ns/SecureListenSocket.cpp
	src/lib/plugin/ns/SecureSocket.cpp
	src/lib/plugin/ns/SecureSocket.h
2015-04-14 17:52:00 +01:00
XinyuHou
dd574c4f2c Added unit tests for string operations 2015-04-14 17:51:50 +01:00
XinyuHou
28eb85660f Fixed error from merge 2015-04-14 17:51:41 +01:00
XinyuHou
b4665b9cd5 Passed args into client and socket
Conflicts:
	src/lib/client/Client.cpp
	src/lib/client/Client.h
	src/lib/synergy/ClientApp.cpp
	src/test/integtests/net/NetworkTests.cpp
2015-04-14 17:51:31 +01:00
Xinyu Hou
39e183da3e Refactored string operations
Conflicts:
	src/lib/base/String.cpp
2015-04-14 17:51:19 +01:00
XinyuHou
cb0f0dd06d Improved fingerprint verification #4522
Conflicts:
	src/lib/plugin/ns/SecureSocket.cpp
	src/lib/plugin/ns/SecureSocket.h
	src/lib/synergy/ClientApp.cpp
2015-04-14 17:50:49 +01:00
XinyuHou
b24eb2b724 Removed test string #4522 2015-04-14 17:50:36 +01:00
XinyuHou
71dc472a64 Fixed code style 2015-04-14 17:49:56 +01:00
XinyuHou
b8ba37b4f4 Made callback function global #4522 2015-04-14 17:49:33 +01:00
Xinyu Hou
5dfe4aa0b5 Added verification of server certificate fingerprint #4522
Conflicts:
	src/lib/mt/Thread.cpp
	src/lib/plugin/ns/SecureSocket.cpp
	src/lib/synergy/ClientArgs.cpp
2015-04-14 17:46:58 +01:00
Nick Bolton
07b1ea203f Message box asking user to verify fingerprint #4522 2015-04-14 17:29:08 +01:00
Nick Bolton
6e2ccb8f8d Merge pull request #4422 from legonigel/shortcut_fix
Changed server shortcut on GUI main window
Fixes #4367
2015-03-28 08:56:36 +00:00
Nick Bolton
0008ad2778 Merge pull request #4462 from synergy/pr-jpmcmu-tripple-click-fix
Double click breaks dragging and tripple click on Mac #3784
2015-03-28 08:53:40 +00:00
Nick Bolton
f80050bea4 Merge remote-tracking branch 'origin/master' into pr-jpmcmu-tripple-click-fix 2015-03-22 00:22:16 +00:00
Nick Bolton
be06c198d4 Merge branch '1.6.3-stable' 2015-03-21 23:51:27 +00:00
Nick Bolton
9706252fb9 Only trust errors for macdeployqt 5+ #4464 2015-03-21 22:01:49 +00:00
Nick Bolton
162ed1fef5 Disabled code signing for old Qt versions #4464 2015-03-21 21:15:53 +00:00
Nick Bolton
a833611804 Updated ChangeLog for 1.6.3 2015-03-21 20:01:13 +00:00
Nick Bolton
0edb3a74b3 Fixed #4465 - Added syntool sign call 2015-03-21 19:59:07 +00:00
Nick Bolton
2e060cc2f3 ChangeLog for 1.6.3 2015-03-21 19:35:59 +00:00
Nick Bolton
dcf8a9f5f0 Changed use of popen to getstatusoutput #4464
The getstatusoutput function seems easier to use
2015-03-21 19:05:43 +00:00
Nick Bolton
88d85204db Fixed distftp source file path #4464 2015-03-21 18:57:09 +00:00
Nick Bolton
ccaf4a8ef3 Removed toolchain code to skip packages #4407 2015-03-21 18:39:06 +00:00
Nick Bolton
e0cb5bda6e Separated post back build into release and debug #4464
Also related to #4463
2015-03-21 18:38:25 +00:00
Nick Bolton
9b2fd85f58 Merge branch '1.6.3-stable'
Conflicts:
	ext/toolchain/commands1.py
	src/lib/plugin/ns/SecureListenSocket.h
2015-03-21 15:57:48 +00:00
James McMullan
1bbd086a17 MacOSX Double / Triple Click Fix
This patch corrects issues with double click and adds triple click to
MacOSX. Double click was functioning but double clicking and then
dragging would not work.
2015-03-21 13:41:00 +00:00
Nick Bolton
ecd51d231b Revert "Revert "Revert "Merge branch 'bug3784-MacOSXDoubleTripleClickFix' of https://github.com/jpmcmu/synergy into jpmcmu-tripple-click-fix"""
This reverts commit 7f721ee7b1.
2015-03-21 13:38:20 +00:00
Nick Bolton
7f721ee7b1 Revert "Revert "Merge branch 'bug3784-MacOSXDoubleTripleClickFix' of https://github.com/jpmcmu/synergy into jpmcmu-tripple-click-fix""
This reverts commit 32323bc0d1.
2015-03-21 11:42:37 +00:00
Nick Bolton
32323bc0d1 Revert "Merge branch 'bug3784-MacOSXDoubleTripleClickFix' of https://github.com/jpmcmu/synergy into jpmcmu-tripple-click-fix"
This reverts commit b5effc0591, reversing
changes made to 297100c88a.
2015-03-21 11:36:38 +00:00
Nick Bolton
b5effc0591 Merge branch 'bug3784-MacOSXDoubleTripleClickFix' of https://github.com/jpmcmu/synergy into jpmcmu-tripple-click-fix 2015-03-21 11:08:53 +00:00
Nick Bolton
0b4d480bcc Removed remnants of synmacph tool (part 3) #4398 2015-03-20 15:11:22 +00:00
Nick Bolton
3deb5492d6 Removed remnants of synmacph tool (part 2) #4398 2015-03-20 15:11:22 +00:00
Nick Bolton
c05d7fad36 Removed remnants of synmacph tool #4398 2015-03-20 15:11:22 +00:00
Nick Bolton
f5cac2846e Removed obsolete code and used Qt to codesign #4397 2015-03-20 14:43:27 +00:00
Nick Bolton
3b44f9d6c5 Added ignore for OpenSSL
This is to stop buildbot from wiping out the openssl dir when switching.
2015-03-20 14:06:48 +00:00
Nick Bolton
297100c88a Merge remote-tracking branch 'origin/1.6.3-stable' 2015-03-20 13:01:12 +00:00
Nick Bolton
14241362ca Removed legacy file remover script 2015-03-20 13:00:21 +00:00
Nick Bolton
69f4a444fd Merge remote-tracking branch 'origin/1.6.3-stable' 2015-03-20 12:59:54 +00:00
Nick Bolton
cf21deb29c Removed test file 2015-03-20 12:59:13 +00:00
Nick Bolton
c2b1674977 Merge 1.6.3-stable 2015-03-20 12:51:56 +00:00
XinyuHou
d3b3513f4b Resolve #4455 replaced version with branch name 2015-03-20 12:24:37 +00:00
XinyuHou
486bea0d02 Resolve #4455 replaced version with branch name 2015-03-20 12:22:56 +00:00
XinyuHou
acb4442259 Version to 1.6.3 2015-03-20 12:18:49 +00:00
legonigel
3c89d60ccb Fix #4349
Fixes issue #4349 in MSWindowsDesks.cpp by using HWND_TOP instead of HWND_TOPMOST. All credit for this fix goes to @gitscrubz and @dubuaych.
2015-03-20 11:41:37 +00:00
XinyuHou
5aaaa784ab Merge branch 'legonigel-focus_fix_gitscrubz' 2015-03-20 11:39:34 +00:00
legonigel
447169df32 Fix #4349
Fixes issue #4349 in MSWindowsDesks.cpp by using HWND_TOP instead of HWND_TOPMOST. All credit for this fix goes to @gitscrubz and @dubuaych.
2015-03-20 03:12:50 -04:00
legonigel
393ac100c8 Changed shortcut on main window gui for server
The shortcut for the server checkbox on the main gui is now Alt-V. This deconflicts the start/stop button.
Fixes #4367
2015-03-09 11:47:13 -04:00
Nick Bolton
702d79570d Merge pull request #4414 from JoshMcCullough/4389
Fixed #4389 - removed unused include from platform/MSWindowsScreen.
2015-03-09 10:55:43 +00:00
Josh McCullough
4ac8f61a54 Fixed #4389 - removed unused include from platform/MSWindowsScreen. 2015-03-06 18:10:39 -05:00
Nick Bolton
3dcd36b10e Removed toolchain code to skip packages #4407 2015-03-05 17:30:08 +00:00
Nick Bolton
4fc46a17ef Version to 1.7.1 2015-03-04 17:09:23 +00:00
Nick Bolton
0da87304a5 ChangeLog for 1.7.0 2015-03-04 17:07:11 +00:00
Nick Bolton
2feb916f2f Unfucked --enable-drag-drop arg parse #4168 2015-03-04 15:10:03 +00:00
Nick Bolton
3364d38498 Removed unused retry variables #4313 2015-03-04 14:07:43 +00:00
Nick Bolton
b4a1c3627f Improved SSL error handling for accept/connect socket #4313 2015-03-04 13:59:53 +00:00
Nick Bolton
501dc6c886 More user-friendly SSL errors, and rate limited failure #4313 2015-03-04 13:42:19 +00:00
Nick Bolton
9cdff4a910 Removed throw from checkResult (causes client to freeze) #4313 2015-03-04 12:26:54 +00:00
Nick Bolton
87a81adeb4 Improved SLL error messages and throw on cert error #4313 2015-03-04 12:15:56 +00:00
Nick Bolton
55de0746dc Copy all plugin files to bin dir (including symbols) #4168 2015-03-04 12:03:38 +00:00
Nick Bolton
a2524d9f57 Make profile dir hack Windows only #4168 2015-03-04 11:51:56 +00:00
Nick Bolton
719e8f6b56 Revert "More robust secure socket error handling #4313"
This reverts commit 40fa58de8c.
2015-03-04 11:43:52 +00:00
Nick Bolton
1c2576b8d7 Revert "Rephrased "crypto disabled" log, changed to error #4313"
This reverts commit a6b5c872f5.
2015-03-04 11:43:45 +00:00
Nick Bolton
6ef41522b7 Revert "Fixed: Exception was not thrown on secure accept/connect #4313"
This reverts commit c5ed03a8a0.
2015-03-04 11:43:42 +00:00
Nick Bolton
cfd21216cd Fixed: Plugins dir may change depending on user #4168 2015-03-04 11:15:07 +00:00
Nick Bolton
c5ed03a8a0 Fixed: Exception was not thrown on secure accept/connect #4313 2015-03-04 10:14:21 +00:00
Nick Bolton
a6b5c872f5 Rephrased "crypto disabled" log, changed to error #4313 2015-03-04 09:00:01 +00:00
Nick Bolton
065960926c Made OpenSSL config file location Windows-only #4313 2015-03-03 19:51:41 +00:00
Nick Bolton
40fa58de8c More robust secure socket error handling #4313 2015-03-03 19:21:14 +00:00
Nick Bolton
b6a3788fea Removed remnants of synmacph tool (part 3) #4398 2015-03-03 18:06:02 +00:00
Nick Bolton
7add4f4d3f Fixed: Compile errors on Linux #4168 2015-03-03 17:29:52 +00:00
Nick Bolton
b8a5abc19f Download and extract OpenSSL dependencies #4313 2015-03-03 11:42:26 +00:00
Nick Bolton
c181d5f480 Fixed #4358 - Corrected typo 2015-03-03 09:23:06 +00:00
Nick Bolton
68a49e0a3a Fixed: Code style for "OpenSSL" should be "OpenSsl" #4313 2015-03-03 08:38:27 +00:00
Nick Bolton
f8847bfde8 Changed OpenSSL to SSL in GUI settings #4313 2015-03-03 08:36:01 +00:00
Nick Bolton
bce1d5be64 Fixed: Plugin manager doesn't download openssl.exe #4313
Refactored use of DataDownloader in PluginManager
2015-03-03 08:27:39 +00:00
Nick Bolton
450435d062 Removed remnants of synmacph tool (part 2) #4398 2015-03-02 18:06:23 +00:00
Nick Bolton
5767790e1e Removed remnants of synmacph tool #4398 2015-03-02 17:50:42 +00:00
Nick Bolton
3f3d452821 Removed obsolete symlink and move functions #4397 2015-03-02 17:44:54 +00:00
Nick Bolton
24aa95a1d5 Removed obsolete code and used Qt to codesign #4397 2015-03-02 17:31:43 +00:00
Nick Bolton
6e7b9491d4 Fixed: Incorrect log level used #4168 2015-02-26 16:44:15 +00:00
Nick Bolton
6971f4551d Merge branch 'master' of https://github.com/synergy/synergy 2015-02-26 12:31:19 +00:00
Nick Bolton
454c2ff826 Added openssl 1.0.1 dependency to deb installer #4313 2015-02-26 12:30:58 +00:00
Michael Wilson
9314e64ce3 Drag/drop enabling is configurable in the GUI. 2015-02-26 02:01:00 -05:00
Nick Bolton
dd57a93345 Added OpenSSL DLLs to Windows installer #4313
libeay32.dll
ssleay32.dll
2015-02-26 00:04:17 +00:00
Nick Bolton
bcf1a1c4d4 Added extra logging to plugin loaders #4168 2015-02-26 00:03:24 +00:00
Nick Bolton
64c350fd96 Fixed: Plugin manager doesn't detect wow64 #4168 2015-02-25 21:22:43 +00:00
Nick Bolton
e4199b976e Improved wording for enable OpenSSL setting #4313 2015-02-25 18:15:38 +00:00
Nick Bolton
eb1083ec45 Fixed: Missing 'else if' on arg parsing #4168 2015-02-25 17:44:17 +00:00
Nick Bolton
a1bfddeb5b Changed plugin manager to use installed arch #4168
Using the processor arch to figure out which plugin to downloa is not
the best idea, since a user could install 32-bit Synergy on 64-bit
Windows.
2015-02-25 17:43:48 +00:00
Nick Bolton
40d304dc24 Refactored "syntool" usage into CoreInterface #4168 2015-02-25 17:19:33 +00:00
Nick Bolton
595e403c87 Fixed: Spinner doesn't stop when no plugins #4168
Also refactored duplicate code
2015-02-25 08:35:07 +00:00
Nick Bolton
c300b65662 Fixed: Plugin downloader freezes if no plugins #4168 2015-02-25 08:17:16 +00:00
Nick Bolton
a30a685ed2 Improved wording on plugin downloader #4168
Also used translate function on strings
2015-02-25 08:16:24 +00:00
Nick Bolton
3a0068ec2e Fixed: Plugin downloader fails if no plugins #4168 2015-02-24 21:19:52 +00:00
Nick Bolton
9de8e42e1b upgraded openssl to 1.0.2 2015-02-23 15:47:39 +00:00
Nick Bolton
5e580e5266 Improved use of English on activate screen #4168 2015-02-20 19:58:37 -05:00
Adam Potolsky
bca57674d0 Added patch that will better detect which Linux distribution is used when determining which plugins to URL to generate. 2015-02-14 19:25:22 -08:00
Adam Potolsky
b9e178a9ee Fixed compiler warning on non-windows systems. 2015-02-14 19:22:08 -08:00
XinyuHou
226f2c966a assigned arch static instance instead of create a new one #4313 2015-02-13 15:58:54 +00:00
Xinyu Hou
4014176d8e Revert "created new instance of arch in plugin #4313"
This reverts commit 8e4f758cb1.
2015-02-13 14:26:03 +00:00
Xinyu Hou
9f1255d986 Revert "did not pass arch into plugins #4313"
This reverts commit 0f686ff308.
2015-02-13 14:25:29 +00:00
XinyuHou
0f686ff308 did not pass arch into plugins #4313 2015-02-13 12:42:23 +00:00
XinyuHou
8e4f758cb1 created new instance of arch in plugin #4313 2015-02-13 12:35:12 +00:00
XinyuHou
d642714fe8 add padlock icon when use secure connection #4313 2015-02-13 10:14:11 +00:00
XinyuHou
629f4b1781 used live url for openssl binary #4168 2015-02-12 17:40:38 +00:00
XinyuHou
4cd20d97ea changed profile directory on mac #4168 2015-02-12 16:52:34 +00:00
XinyuHou
81bb74a24b greyed out network security group when no plugin available #4168 2015-02-12 16:49:18 +00:00
XinyuHou
6cf40afcd7 added copyright #4168 2015-02-12 16:20:03 +00:00
XinyuHou
14bd991b24 productized setting dialog #4168 2015-02-12 16:18:44 +00:00
XinyuHou
c4c0fc8a08 added enable crypto argument to synergys/c #4313 2015-02-12 15:50:08 +00:00
XinyuHou
bbcca144f5 hacked avoid syntool sigsegv on linux #4168 2015-02-11 17:32:18 +00:00
XinyuHou
b9c5eb2e6f added certificate generate #4168 2015-02-11 17:28:56 +00:00
XinyuHou
03ee40891e Merge branch 'master' of github.com:synergy/synergy 2015-02-11 11:13:17 +00:00
XinyuHou
80343c41eb deleted old home brew crypto #4313 2015-02-11 11:12:54 +00:00
Xinyu Hou
028757e4e0 fixed compile warning on Mac 10.6 and below #4313 2015-02-10 17:48:30 +00:00
XinyuHou
4fcec1d217 limited ns pluging to Mac 10.8 and above #4168 2015-02-10 16:20:49 +00:00
XinyuHou
7d5df54bd0 fixed copy command for libns on Linux #4168 2015-02-10 13:07:52 +00:00
XinyuHou
31440b1a8a added const cast #4168 2015-02-10 12:22:30 +00:00
XinyuHou
98716f4e78 fixed compile error on ubuntu64 #4168 2015-02-10 12:13:59 +00:00
XinyuHou
3c4b6163e3 Merge remote-tracking branch 'origin/jerry-sandbox' 2015-02-10 10:28:45 +00:00
XinyuHou
b178d33d62 added plugin downloading from servere #4168 2015-02-09 15:37:47 +00:00
XinyuHou
05e6cb6254 queried plugin list from server #4168 2015-02-06 10:39:58 +00:00
XinyuHou
82b932b1c4 added download plugin page in wizard #4168 2015-02-05 15:52:50 +00:00
XinyuHou
aa46fe91a7 added activate page in wizard #4168 2015-02-05 14:17:34 +00:00
XinyuHou
097f4c4c1f Revert "added login window #4168"
This reverts commit ccc5834757.
2015-02-05 11:44:33 +00:00
XinyuHou
c25b6a8bf6 Revert "stored user email, token and type in settings #4168"
This reverts commit 319de60286.
2015-02-05 11:44:31 +00:00
XinyuHou
f4f7315a54 Revert "added copy right #4168"
This reverts commit e2fb03b8ce.
2015-02-05 11:44:28 +00:00
XinyuHou
fc04901cda Revert "moved gui into main subfolder #4168"
This reverts commit 39f98d8133.
2015-02-05 11:44:23 +00:00
XinyuHou
26fb6b77db Revert "updated ignore list #4168"
This reverts commit afc2a4d1a0.
2015-02-05 11:44:19 +00:00
XinyuHou
db1a611171 Revert "added plugin manager gui #4168"
This reverts commit bfa9bab78d.
2015-02-05 11:44:14 +00:00
XinyuHou
c34928b7c8 Revert "seperated login result and edition type #4168"
This reverts commit da68664bda.
2015-02-05 11:44:10 +00:00
XinyuHou
c81fa7db52 Revert "changed login window to dialog #4168"
This reverts commit d1c1d79453.
2015-02-05 11:44:04 +00:00
XinyuHou
52005f0905 Revert "changed plugin manager gui from window to dialog #4168"
This reverts commit 1132da4598.
2015-02-05 11:43:54 +00:00
XinyuHou
a0090c69ba wq
Revert "fixed plugin gui compile error on mac #4168"

This reverts commit f6d4cf1c38.
2015-02-05 11:42:08 +00:00
Xinyu Hou
f6d4cf1c38 fixed plugin gui compile error on mac #4168 2015-02-04 19:11:54 +00:00
XinyuHou
1132da4598 changed plugin manager gui from window to dialog #4168 2015-02-04 18:17:06 +00:00
XinyuHou
d1c1d79453 changed login window to dialog #4168 2015-02-04 17:30:06 +00:00
XinyuHou
da68664bda seperated login result and edition type #4168 2015-02-04 15:07:52 +00:00
XinyuHou
bfa9bab78d added plugin manager gui #4168 2015-02-04 14:09:03 +00:00
XinyuHou
afc2a4d1a0 updated ignore list #4168 2015-02-04 14:05:02 +00:00
XinyuHou
39f98d8133 moved gui into main subfolder #4168 2015-02-04 14:04:30 +00:00
XinyuHou
5f33a21878 deleted secure socket when close client time out #4313 2015-02-02 16:06:51 +00:00
XinyuHou
3aa6bed669 handled SSL connect failed on client side #4313 2015-02-02 15:33:40 +00:00
XinyuHou
10e6b5ad63 removed client connection when SSL handshake failed #4313 2015-02-02 14:18:34 +00:00
XinyuHou
e2fb03b8ce added copy right #4168 2015-02-02 10:52:40 +00:00
XinyuHou
319de60286 stored user email, token and type in settings #4168 2015-01-30 17:38:12 +00:00
XinyuHou
ccc5834757 added login window #4168 2015-01-30 16:04:27 +00:00
XinyuHou
ad230d46e6 handled secure socket exception #4313 2015-01-29 16:16:45 +00:00
XinyuHou
767802f111 removed loop accept and connect and added more debug info #4313 2015-01-29 15:40:30 +00:00
XinyuHou
d15c99f41d rearranged the deletion orders of clientlistener and server #4313 2015-01-28 17:34:19 +00:00
XinyuHou
4e42b9fdbd fixed memory leak and validate ssl #4313 2015-01-28 17:33:10 +00:00
XinyuHou
622e40e5d7 managed secure socket allocation and deallocation #4313 2015-01-28 13:07:03 +00:00
XinyuHou
d80aa7c938 resolve #4337 removed IStreamFilterFactory dead code 2015-01-27 11:33:06 +00:00
XinyuHou
a53dae9be3 added assersions before lib func invoking and adjust log level #4313 2015-01-27 11:04:23 +00:00
XinyuHou
85813fd49b added plugin unload and cleanup #4313 2015-01-27 10:42:10 +00:00
XinyuHou
10cddb97a8 fixed misused read and write #4313 2015-01-26 13:23:11 +00:00
XinyuHou
06253c965b resolve #4328 by moving plugin into lib folder 2015-01-20 16:18:51 +00:00
XinyuHou
a98c4bd02a made init function signature consistent #4313 2015-01-20 16:00:15 +00:00
Xinyu Hou
141b778477 refactored SecureSocket to use interface #4313 2015-01-14 17:25:53 +00:00
XinyuHou
be2b87fd39 fixed code style 2015-01-12 10:51:16 +00:00
XinyuHou
f973d1498d dropped prefix C 2015-01-12 10:33:29 +00:00
XinyuHou
7bff958422 added pluging loader for unix #4313 2015-01-09 13:47:35 +00:00
XinyuHou
1d7eb3f5cb updated pluging loader for Windows #4313 2015-01-09 13:46:35 +00:00
XinyuHou
9835c7206d Version to 1.7.0 2015-01-07 11:56:28 +00:00
XinyuHou
de8fe7e2a5 fixed compiler cast warning in drag info class 2015-01-06 14:51:37 +00:00
XinyuHou
95a1752396 ported secure socket class from enterprise to ns plugin #4313 2015-01-06 14:20:05 +00:00
XinyuHou
12c2acf37a ignored openssl output dir 2015-01-06 14:15:13 +00:00
XinyuHou
2c14967552 added openssl library for windows and mac 2015-01-06 14:14:20 +00:00
XinyuHou
a0f2261931 added new ns plugin #4313 2015-01-06 13:52:11 +00:00
James McMullan
56b54da915 MacOSX Double / Triple Click Fix
This patch corrects issues with double click and adds triple click to
MacOSX. Double click was functioning but double clicking and then
dragging would not work.
2014-12-04 15:15:38 -05:00
Vasily Galkin
06df954366 fix removing jobs for closed sockets from m_socketJobs (patch by Brian Vincent from synergy issue tracker #2866) 2014-11-14 18:29:28 +04:00
1161 changed files with 171099 additions and 74014 deletions

30
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,30 @@
### Operating Systems ###
Server: microOS Tiara
Client: Applesoft Windy OS 10
**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 ;)
### Barrier Version ###
1.9.π
**READ ME, DELETE ME**: Go to the 'Help' (on Windows) or 'Barrier' (on macOS) menu and then 'About Barrier' 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://github.com/debauchee/barrier/
### 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. ...
### 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 Barrier entirely? Yes/No
Put anything else you can think of here.

27
.gitignore vendored
View File

@@ -1,15 +1,34 @@
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*
/src/gui/tmp
/src/gui/ui_*
src/gui/gui.pro.user
src/gui/gui.pro.user*
src/gui/.qmake.stash
src/setup/win32/synergy.suo
src/gui/.rnd
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

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[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

13
.lvimrc
View File

@@ -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

7
Build.properties Normal file
View File

@@ -0,0 +1,7 @@
#
# Barrier build parameters
#
BARRIER_VERSION_MAJOR = 2
BARRIER_VERSION_MINOR = 3
BARRIER_VERSION_PATCH = 4
BARRIER_VERSION_STAGE = snapshot

View File

@@ -1,11 +1,12 @@
# synergy -- mouse and keyboard sharing utility
# Copyright (C) 2012 Synergy Si Ltd.
# 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 COPYING that should have accompanied this file.
#
# 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,345 +15,419 @@
# 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 6)
set(VERSION_REV 3)
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)
# 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)
include_directories (BEFORE SYSTEM ./ext/gtest/include)
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")
# For config.h, detect the libraries, functions, etc.
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckFunctionExists)
include (CheckTypeSize)
include (CheckIncludeFileCXX)
include (CheckSymbolExists)
include (CheckCSourceCompiles)
include (FindPkgConfig)
# For config.h, detect the libraries, functions, etc.
include(CheckIncludeFiles)
include(CheckLibraryExists)
include(CheckFunctionExists)
include(CheckTypeSize)
include(CheckIncludeFileCXX)
include(CheckSymbolExists)
include(CheckCSourceCompiles)
check_include_file_cxx (istream HAVE_ISTREAM)
check_include_file_cxx (ostream HAVE_OSTREAM)
check_include_file_cxx (sstream HAVE_SSTREAM)
check_include_file_cxx(istream HAVE_ISTREAM)
check_include_file_cxx(ostream HAVE_OSTREAM)
check_include_file_cxx(sstream HAVE_SSTREAM)
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_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_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)
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)
# 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)
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)
check_c_source_compiles (
"#include <arpa/inet.h>\n int main() { inet_aton (0, 0); }"
HAVE_INET_ATON_ADV)
if (HAVE_INET_ATON_ADV)
# Override the previous fail.
set(HAVE_INET_ATON 1)
set (CMAKE_REQUIRED_LIBRARIES)
# 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)
if (HAVE_INET_ATON_ADV)
# Override the previous fail.
set (HAVE_INET_ATON 1)
endif()
# 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()
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
check_library_exists("pthread" pthread_create "" HAVE_PTHREAD)
if (HAVE_PTHREAD)
list(APPEND libs pthread)
else()
message(FATAL_ERROR "Missing library: pthread")
endif()
# 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)
# 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}")
# curl is used on both Linux and Mac
find_package (CURL)
if (CURL_FOUND)
include_directories(${CURL_INCLUDE_DIRS})
list (APPEND libs ${CURL_LIBRARIES})
if (NOT (OSX_TARGET_MAJOR EQUAL 10))
message(FATAL_ERROR "Mac OS X target must be 10.x")
endif ()
else()
message (FATAL_ERROR "Missing library: curl")
endif()
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;x86_64"
CACHE STRING "" FORCE)
endif()
set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
if (APPLE)
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
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()
# add include dir for bsd (posix uses /usr/include/)
set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/local/include")
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()
set(XKBlib "X11/Xlib.h;X11/XKBlib.h")
check_symbol_exists("XRRNotifyEvent" "${XKBlib};X11/extensions/Xrandr.h" HAVE_X11_EXTENSIONS_XRANDR_H)
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 ()
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)
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)
if (HAVE_X11_EXTENSIONS_DPMS_H)
# Assume that function prototypes declared, when include exists.
set(HAVE_DPMS_PROTOTYPES 1)
endif()
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 (NOT HAVE_X11_XKBLIB_H)
message(FATAL_ERROR "Missing header: " ${XKBlib})
endif()
if (HAVE_X11_EXTENSIONS_DPMS_H)
# Assume that function prototypes declared, when include exists.
set (HAVE_DPMS_PROTOTYPES 1)
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 (NOT HAVE_X11_XKBLIB_H)
message (FATAL_ERROR "Missing header: " ${XKBlib})
endif()
if (HAVE_ICE)
if (BARRIER_BUILD_GUI AND NOT HAVE_DNSSD)
message (FATAL_ERROR "Missing header: dns_sd.h")
endif()
# Assume we have SM if we have ICE.
set(HAVE_SM 1)
list(APPEND libs SM 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)
endif()
if (HAVE_ICE)
if (HAVE_Xtst)
# Assume we have SM if we have ICE.
set (HAVE_SM 1)
list (APPEND libs SM ICE)
# Xtxt depends on X11.
set(HAVE_X11)
list(APPEND libs Xtst X11)
endif()
else()
if (HAVE_Xtst)
message(FATAL_ERROR "Missing library: Xtst")
# Xtxt depends on X11.
set (HAVE_X11 1)
list (APPEND libs Xtst X11)
endif()
else()
if (HAVE_Xext)
list(APPEND libs Xext)
endif()
message (FATAL_ERROR "Missing library: Xtst")
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()
# this was outside of the linux scope,
# not sure why, moving it back inside.
if(HAVE_Xi)
list(APPEND libs Xi)
endif()
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()
# 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)
if (HAVE_Xrandr)
list (APPEND libs Xrandr)
endif()
# For config.h, save the results based on a template (config.h.in).
configure_file(res/config.h.in ${root_dir}/config.h)
# this was outside of the linux scope,
# not sure why, moving it back inside.
if (HAVE_Xi)
list (APPEND libs Xi)
endif()
add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
endif()
if (APPLE)
add_definitions(-DWINAPI_CARBON=1 -D_THREAD_SAFE)
else (APPLE)
add_definitions(-DWINAPI_XWINDOWS=1)
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 (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)
else() # not-unix
# 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)
list(APPEND libs Wtsapi32 Userenv Wininet comsuppw Shlwapi)
add_definitions (-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
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()
if (APPLE)
add_definitions (-DWINAPI_CARBON=1 -D_THREAD_SAFE)
else()
add_definitions (-DWINAPI_XWINDOWS=1)
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 (
/DWIN32
/D_WINDOWS
/D_CRT_SECURE_NO_WARNINGS
/DBARRIER_VERSION=\"${BARRIER_VERSION}\"
/D_XKEYCHECK_H
)
endif()
add_subdirectory(src)
add_subdirectory(ext)
#
# 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()
if (WIN32)
# TODO: consider using /analyze to uncover potential bugs in the source code.
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(BREW_PROGRAM "brew")
find_program(PORT_PROGRAM "port")
if (IS_DIRECTORY /opt/local AND PORT_PROGRAM)
# macports
set (OPENSSL_ROOT /opt/local)
# /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")
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
)
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()
add_subdirectory (src)

View File

@@ -1 +0,0 @@
Compiling: http://synergy-project.org/wiki/Compiling

217
ChangeLog
View File

@@ -1,3 +1,219 @@
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 #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
=============
Bug #2765 - A letter appears on macOS clients when the spacebar is pressed
Bug #3241 - Windows UAC disconnects clients when elevated
Bug #4740 - Linux client crashes with "Assertion '!m_open' failed"
Bug #4879 - Memory leak caused by IpcReader
Bug #5373 - Tab behaves like shift tab on client
Bug #5502 - Copy and paste from server to client doesn't work
Enhancement #123 - Option to disable clipboard sharing
Enhancement #3305 - Media key support on macOS
Enhancement #4323 - Make automatic elevation on Windows optional
v1.8.2-stable
=============
Bug #3044 - Unable to drag-select in MS Office
Bug #4768 - Copy paste causes 'server is dead' error on switching
Bug #4792 - Server logging crashes when switching with clipboard data
Bug #2975 - Middle click does not close Chrome tab on Mac client
Bug #5087 - Linux client fails to start due to invalid cursor size
Bug #5471 - Serial key textbox on activation screen overflows on Mac
Bug #4836 - Stop button resets to Start when settings dialog canceled
Enhancement #5277 - Auto restart service when synwinhk.dll fails on Windows
Enhancement #4913 - Future-proof GUI login by using newer auth URL
Enhancement #4922 - Add --enable-crypto argument to help text
Enhancement #5299 - High resolution App icon on Mac
Enhancement #4894 - Improve grammar in connection notification dialog
v1.8.1-stable
=============
Bug #5461 - GUI crash during activation on Mac
v1.8.0-beta
=============
Enhancement #4696 - Include 'ns' plugin in installers (instead of wizard download)
Enhancement #4715 - Activation dialog which also accepts a serial key
Enhancement #5020 - Recommend using serial key when online activation fails
Enhancement #4893 - Show detailed version info on GUI about screen
Enhancement #4327 - GUI setting to disable drag and drop feature
Enhancement #4793 - Additional logging to output OpenSSL version
Enhancement #4932 - Notify activation system when wizard finishes
Enhancement #4716 - Allow software to be time limited with serial key
v1.7.6-stable
=============
Bug #451 - Fast cursor on any client with Mac server
Bug #5041 - Copying from the Chrome web browser doesn't work
Bug #4735 - Clipboard doesn't work from client to server
Bug #2909 - Clipboard copies only plaintext between Mac and Windows
Bug #4353 - Large clipboard causes crash
Bug #3774 - Missing MinGW dependencies after install on Windows
Bug #4723 - Waiting for active desktop result freezes Windows service
v1.7.5-stable
=============
Bug #5030 - Display scaling breaks edge detection on Windows
Bug #5064 - Compile fails on Mac OS X 10.11 (unused typedef)
v1.7.4-stable
=============
Bug #4721 - High CPU usage for Windows service
Bug #4750 - SSL connect error 'passive ssl error limit'
Bug #4584 - Drag and drop with SSL causes crash
Bug #4749 - Clipboard thread race condition causes assertion failure
Bug #4720 - Plugin download shows 'Could not get Linux package type' error
Bug #4712 - Unable to send clipboard with size above 1KB when using SSL
Bug #4642 - Connecting causes SSL23_GET_SERVER_HELLO error
Bug #4690 - Log line 'activeDesktop' does not use logging system
Bug #4866 - Wrong ns plugin version can be loaded
Enhancement #4901 - Auto restart when running from GUI in desktop mode
Enhancement #4845 - Add timestamp to log output
Enhancement #4898 - Move version stage name to build config
v1.7.3-stable
=============
Bug #4565 - Incorrect plugin downloads on Debian and Mint
Bug #4677 - Windows service log file grows to very large size
Bug #4651 - High logging rate causes Windows service to crash
Bug #4650 - SSL error log message repeats excessively and freezes cursor
Bug #4624 - Runaway logging causes GUI to freeze
Bug #4617 - Windows service randomly stops after 'ssl handshake failure' error
Bug #4601 - Large clipboard data with SSL causes 'protocol is shutdown' error
Bug #4593 - Locking Windows server causes SSL_ERROR_SSL to repeat
Bug #4577 - Memory leak in GUI on Windows caused by logging
Bug #4538 - Windows service crashes intermittently with no error
Bug #4341 - GUI freezes on first load when reading log
Bug #4566 - Client or server crashes with 'ssl handshake failure' error
Bug #4706 - Installer is not output to build config dir on Windows
Bug #4704 - Plugin 'ns' release build is overwritten with debug version on Linux
Bug #4703 - Plugins are not built to config directory on Mac
Bug #4697 - Timing can allow an SSL socket to be used after cleanup call
Enhancement #4661 - Log error but do not crash when failing to load plugins
Enhancement #4708 - Download ns plugin for specific Mac versions
Enhancement #4587 - Include OpenSSL binaries in source for easier building
Enhancement #4695 - Automatically upload plugins as Buildbot step
v1.7.2-stable
=============
Bug #4564 - Modifier keys often stuck down on Mac client
Bug #4581 - Starting GUI on Mac crashes instantly on syntool segfault
Bug #4520 - Laggy or sluggish cursor (ping spikes) on Mac when using WiFi
Bug #4607 - GUI doesn't start after install on Windows
Enhancement #4412 - Automate extract and compile for OpenSSL
Enhancement #4567 - SSL plugin should use TLSv1_method() minimum
Enhancement #4591 - Revert to legacy Mac deployment and signing
Enhancement #4569 - Reintroduce GUI auto-hide setting (disabled by default)
Enhancement #4570 - Make `--crypto-pass` show deprecated message
Enhancement #4596 - Typo 'occurred' in WebClient.cpp
v1.7.1-stable
=============
Bug #3784 - Double click & drag doesn't select words on client
Bug #3052 - Triple-click (select line) does not work
Bug #4367 - Duplicate Alt-S Keyboard Shortcuts on Gui
Bug #4554 - Server unable to accept new SSL connection
Bug #4553 - SSL handshake failure error causes GUI to crash
Bug #4551 - Plugin wizard doesn't create SSL directory
Bug #4548 - Severe code duplication in fingerprint logic
Bug #4547 - Windows server crashes when client fingerprint dialog open
Bug #4539 - Mac client dies when server has SSL_ERROR_SSL
Bug #4537 - Plugin wizard doesn't complete but finish button enabled
Bug #4535 - Server crashes on shut down after multiple connections failed
Bug #4528 - Error SSL_ERROR_SSL is logged on unknown error
Bug #4527 - Server fingerprint dialog on client GUI keeps showing
Bug #4469 - GUI crashes on Windows when generating certificate
Bug #4410 - SSL_ERROR_SSL (unknown protocol) on Mac client
Bug #4409 - SSL_ERROR_SSL (unknown alert type) on Windows 8.1 client
Bug #4557 - GUI doesn't show local fingerprint on fresh install
Enhancement #4522 - SSL server fingerprint verification from client
Enhancement #4526 - Display local fingerprint on server GUI
Enhancement #4549 - Extract SSL certificate and fingerprint generate function
Enhancement #4546 - Redistribute OpenSSL on Windows with installer
Enhancement #4540 - Enable Network Security checkbox only when ns plugin exists
Enhancement #4525 - Reorganize app data directory
Enhancement #4390 - Disable GUI auto-hide by default
v1.7.0-beta
===========
Enhancement #4313 - SSL encrypted secure connection
Enhancement #4168 - Plugin manager for GUI
Enhancement #4307 - Always show client auto-detect dialog
Enhancement #4397 - Modernize Mac build script (deployment and signing)
Enhancement #4398 - Remove obsolete Mac database cleaner
Enhancement #4337 - Remove IStreamFilterFactory dead code
1.6.3
=====
Bug #4349 - Mouse click does not always bring window to front
Bug #4463 - Unidentified developer error on Mac OS X
Bug #4464 - Code signing verify failure not reported on Mac build
Bug #4465 - Binary (syntool) is not code signed on Windows
Enhancement #4455 - Replace version with branch name in package filename
1.6.2
=====
Bug #4227 - Helper tool crashes when service checks elevation state
@@ -207,3 +423,4 @@ Feature #3119: Mac OS X secondary screen
Task #2905: Unit tests: Clipboard classes
Task #3072: Downgrade Linux build machines
Task #3090: CXWindowsKeyState integ test args wrong

View File

@@ -1,2 +0,0 @@
Help: http://synergy-project.org/help/
Wiki: http://synergy-project.org/wiki/

View File

@@ -1,8 +1,11 @@
synergy -- mouse and keyboard sharing utility
Copyright (C) 2012-2014 Synergy Si Ltd.
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
that compiling, linking, and/or using OpenSSL is allowed.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

16
README
View File

@@ -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:
http://synergy-project.org/wiki/Compiling
Happy hacking!

79
README.md Normal file
View File

@@ -0,0 +1,79 @@
# 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 freenode
#### CI Build Status
Master branch overall build status: [![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)
|Platform |Build Status|
| --:|:-- |
|Linux |[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Linux%20Build)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Mac |[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Mac%20Build)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Windows Debug |[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Windows%20Build&configuration=Windows%20Build%20Debug)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Windows Release|[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Windows%20Build&configuration=Windows%20Build%20Release%20with%20Release%20Installer)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Snap |[![Snap Status](https://build.snapcraft.io/badge/debauchee/barrier.svg)](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.
### 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 machine A to control machine B (or more). It's that simple.
### 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.
### 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 Freenode 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.
## Distro specific packages
While not a comprehensive list, repology provides a decent list of distro
specific packages.
[![Packaging status](https://repology.org/badge/vertical-allrepos/barrier.svg)](https://repology.org/project/barrier/versions)
### FAQ
Q: Does drag and drop work on linux?
A: No
Q: What OSes are supported?
A:
- Windows 7, 8, 8.1, and 10
- MacOS/OS X
- Linux
- FreeBSD
- OpenBSD
Q: Are 32-bit versions of Windows supported?
A: No

59
RELEASING.md Normal file
View File

@@ -0,0 +1,59 @@
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: Push git tag
--------------------
Pull the merge commit created on the `master` branch during the step 2.
Create a tag:
git tag -s v${VERSION} -m v${VERSION}
Push the tag:
git push origin master --tags
Step 5: 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 oldest 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).

1
_config.yml Normal file
View File

@@ -0,0 +1 @@
theme: jekyll-theme-slate

117
azure-pipelines.yml Normal file
View File

@@ -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)

View File

@@ -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

View File

@@ -0,0 +1,12 @@
$ErrorActionPreference = "Stop"
New-Item -Force -ItemType Directory -Path ".\deps\"
$Wc = New-Object System.Net.WebClient
$Wc.DownloadFile('https://github.com/nelsonjchen/mDNSResponder/releases/download/v2019.05.08.1/x64_RelWithDebInfo.zip', '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'

View File

@@ -0,0 +1,26 @@
$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'
$Wc = New-Object System.Net.WebClient
$Wc.DownloadFile("https://github.com/nelsonjchen/qli-installer/archive/v$qli_install_version.zip", '.\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 = "http://mirrors.ocf.berkeley.edu/qt/online/qtsdkrepository/"
python .\deps\qli-installer\qli-installer.py $qt_version windows desktop win64_msvc2017_64
Write-Output 'Installed QT Installer'

34
build_installer.bat Normal file
View File

@@ -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=

92
clean_build.bat Normal file
View File

@@ -0,0 +1,92 @@
@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
echo @msbuild barrier.sln /p:Platform="x64" /p:Configuration=%B_BUILD_TYPE% /m %B_BUILD_OPTIONS% > make.bat
call make.bat
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 confiuration 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%

32
clean_build.sh Executable file
View File

@@ -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"

9
cmake/Package.cmake Normal file
View File

@@ -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()

95
cmake/Version.cmake Normal file
View File

@@ -0,0 +1,95 @@
cmake_minimum_required (VERSION 3.4)
set (BARRIER_VERSION_MAJOR 2)
set (BARRIER_VERSION_MINOR 3)
set (BARRIER_VERSION_PATCH 4)
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_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()

2
configure vendored
View File

@@ -1,2 +0,0 @@
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .

260
debian/changelog vendored Normal file
View File

@@ -0,0 +1,260 @@
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

1
debian/compat vendored Normal file
View File

@@ -0,0 +1 @@
9

17
debian/control vendored Normal file
View File

@@ -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/

5
debian/copyright vendored Normal file
View File

@@ -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

5
debian/rules vendored Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/make -f
%:
dh $@ --buildsystem=cmake --builddirectory=build -Pbuild/debian --parallel

1
debian/source/format vendored Normal file
View File

@@ -0,0 +1 @@
3.0 (native)

80
dist/inno/barrier.iss.in vendored Normal file
View File

@@ -0,0 +1,80 @@
#define MyAppName "Barrier"
#define MyAppVersion "@BARRIER_VERSION@"
#define MyAppPublisher "Debauchee Open Source Group"
#define MyAppURL "https://github.com/debauchee/barrier/wiki"
#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={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
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-{#MyAppVersion}
SetupIconFile=@CMAKE_CURRENT_SOURCE_DIR@/res/barrier.ico
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64 ia64
#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: files; Name: "{app}\barrierd.log"
[UninstallRun]
Filename: {sys}\sc.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;

49
dist/inno/scripts/isxdl/english.ini vendored Normal file
View File

@@ -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:

BIN
dist/inno/scripts/isxdl/isxdl.dll vendored Normal file

Binary file not shown.

14
dist/inno/scripts/isxdl/isxdl.iss vendored Normal file
View File

@@ -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]

18
dist/inno/scripts/lang/english.iss vendored Normal file
View File

@@ -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]

6
dist/inno/scripts/products.iss vendored Normal file
View File

@@ -0,0 +1,6 @@
#include "isxdl\isxdl.iss"
[Code]
#include "products.pas"
[Setup]

329
dist/inno/scripts/products.pas vendored Normal file
View File

@@ -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;

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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.9.0</string>
</dict>
</plist>

View File

@@ -0,0 +1 @@
APPLSYN1

Binary file not shown.

73
dist/macos/bundle/build_dist.sh.in vendored Executable file
View File

@@ -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

83
dist/macos/bundle/build_installer.sh.in vendored Executable file
View File

@@ -0,0 +1,83 @@
#!/bin/sh
# add warning for users running manually
function 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_DMB created successfully"

49
dist/macos/bundle/reref_dylibs.sh vendored Executable file
View File

@@ -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
function 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

105
dist/rpm/barrier.spec.in vendored Normal file
View File

@@ -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

View File

@@ -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

31
dist/wix/Barrier.wixproj vendored Normal file
View File

@@ -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>

25
dist/wix/Include.wxi.in vendored Normal file
View File

@@ -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>

103
dist/wix/Product.wxs vendored Normal file
View File

@@ -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>

9
doc/MacReadme.txt Executable file → Normal file
View File

@@ -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://synergy-project.org/help/

View File

@@ -34,7 +34,7 @@
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Synergy</value>
<value type="QString">Barrier</value>
</data>
</qtcreator>
<?xml version="1.0" encoding="UTF-8"?>
@@ -73,7 +73,7 @@
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Synergy</value>
<value type="QString">Barrier</value>
</data>
</qtcreator>
<?xml version="1.0" encoding="UTF-8"?>
@@ -112,7 +112,7 @@
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Synergy</value>
<value type="QString">Barrier</value>
</data>
</qtcreator>
<?xml version="1.0" encoding="UTF-8"?>
@@ -151,7 +151,7 @@
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Synergy</value>
<value type="QString">Barrier</value>
</data>
</qtcreator>
<?xml version="1.0" encoding="UTF-8"?>
@@ -190,7 +190,7 @@
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Synergy</value>
<value type="QString">Barrier</value>
</data>
</qtcreator>
<?xml version="1.0" encoding="UTF-8"?>
@@ -229,6 +229,6 @@
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Synergy</value>
<value type="QString">Barrier</value>
</data>
</qtcreator>

10
doc/UpdateManpages.txt Normal file
View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

73
doc/barrierc.1 Normal file
View File

@@ -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.3.4-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

87
doc/barriers.1 Normal file
View File

@@ -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.3.4-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

View File

@@ -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.

View File

@@ -2,16 +2,16 @@
<!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. -->
<!-- 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.synergy-project.org.synergyc.plist</string>
<string>org.debauchee.com.barrierc.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>/usr/bin/barrierc</string>
<!-- Replace this IP with the IP of your barriers server -->
<string>192.168.0.2</string>
</array>
<key>RunAtLoad</key>

View File

@@ -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.synergy-project.org.synergys.plist</string>
<string>org.debauchee.com.barriers.plist</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/synergys</string>
<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/>

View File

@@ -0,0 +1,32 @@
Release notes
=============
[comment]: <> (towncrier release notes start)
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.
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.

View File

@@ -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 %}

View File

@@ -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

View File

@@ -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

View File

@@ -1,96 +0,0 @@
# synergy -- mouse and keyboard sharing utility
# Copyright (C) 2013 Synergy Si Ltd.
#
# 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 COPYING 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/>.
set(cryptopp_dir cryptopp562)
# only compile the crypto++ files we need.
set(cryptopp_src
${cryptopp_dir}/3way.cpp
${cryptopp_dir}/algparam.cpp
${cryptopp_dir}/asn.cpp
${cryptopp_dir}/authenc.cpp
${cryptopp_dir}/basecode.cpp
${cryptopp_dir}/cpu.cpp
${cryptopp_dir}/cryptlib.cpp
${cryptopp_dir}/des.cpp
${cryptopp_dir}/dessp.cpp
${cryptopp_dir}/dll.cpp
${cryptopp_dir}/ec2n.cpp
${cryptopp_dir}/ecp.cpp
${cryptopp_dir}/filters.cpp
${cryptopp_dir}/fips140.cpp
${cryptopp_dir}/gcm.cpp
${cryptopp_dir}/gf2n.cpp
${cryptopp_dir}/gfpcrypt.cpp
${cryptopp_dir}/hex.cpp
${cryptopp_dir}/hmac.cpp
${cryptopp_dir}/hrtimer.cpp
${cryptopp_dir}/integer.cpp
${cryptopp_dir}/iterhash.cpp
${cryptopp_dir}/misc.cpp
${cryptopp_dir}/modes.cpp
${cryptopp_dir}/mqueue.cpp
${cryptopp_dir}/nbtheory.cpp
${cryptopp_dir}/oaep.cpp
${cryptopp_dir}/osrng.cpp
${cryptopp_dir}/pubkey.cpp
${cryptopp_dir}/queue.cpp
${cryptopp_dir}/randpool.cpp
${cryptopp_dir}/rdtables.cpp
${cryptopp_dir}/rijndael.cpp
${cryptopp_dir}/rng.cpp
${cryptopp_dir}/sha.cpp
)
# if 64-bit windows, compile asm file.
if (CMAKE_CL_64)
list(APPEND cryptopp_src ${cryptopp_dir}/x64dll.asm ${cryptopp_dir}/x64masm.asm)
add_custom_command(OUTPUT $(IntDir)x64dll.obj
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64dll.obj /Zi
"${CMAKE_CURRENT_SOURCE_DIR}/${cryptopp_dir}/x64dll.asm"
MAIN_DEPENDENCY ${cryptopp_dir}/x64dll.asm
VERBATIM)
add_custom_command(OUTPUT $(IntDir)x64masm.obj
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64masm.obj /Zi
"${CMAKE_CURRENT_SOURCE_DIR}/${cryptopp_dir}/x64masm.asm"
MAIN_DEPENDENCY ${cryptopp_dir}/x64masm.asm
VERBATIM)
endif()
if (UNIX)
add_definitions(-DCRYPTOPP_DISABLE_ASM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -pipe")
if (APPLE)
if (DARWIN_VERSION GREATER 10)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tautological-compare")
endif()
else()
set(CRYPTOPP_ARCH "native")
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^arm.*")
set(CRYPTOPP_ARCH "armv6zk")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${CRYPTOPP_ARCH}")
endif()
endif()
add_library(cryptopp STATIC ${cryptopp_src})
if (UNIX)
# ignore warnings in crypto++
set_target_properties(cryptopp PROPERTIES COMPILE_FLAGS "-w")
endif()

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
ext/gmock Submodule

Submodule ext/gmock added at 7d33fee11e

Binary file not shown.

1
ext/gtest Submodule

Submodule ext/gtest added at 800f5422ac

Binary file not shown.

125
ext/openssl/LICENSE Normal file
View File

@@ -0,0 +1,125 @@
LICENSE ISSUES
==============
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts.
OpenSSL License
---------------
/* ====================================================================
* Copyright (c) 1998-2016 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).
*
*/
Original SSLeay License
-----------------------
/* 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.]
*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,149 @@
/* crypto/aes/aes.h */
/* ====================================================================
* Copyright (c) 1998-2002 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.
* ====================================================================
*
*/
#ifndef HEADER_AES_H
# define HEADER_AES_H
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_AES
# error AES is disabled.
# endif
# include <stddef.h>
# define AES_ENCRYPT 1
# define AES_DECRYPT 0
/*
* Because array size can't be a const in C, the following two are macros.
* Both sizes are in bytes.
*/
# define AES_MAXNR 14
# define AES_BLOCK_SIZE 16
#ifdef __cplusplus
extern "C" {
#endif
/* This should be a hidden type, but EVP requires that the size be known */
struct aes_key_st {
# ifdef AES_LONG
unsigned long rd_key[4 * (AES_MAXNR + 1)];
# else
unsigned int rd_key[4 * (AES_MAXNR + 1)];
# endif
int rounds;
};
typedef struct aes_key_st AES_KEY;
const char *AES_options(void);
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
void AES_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);
void AES_decrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key, const int enc);
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num);
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char ivec[AES_BLOCK_SIZE],
unsigned char ecount_buf[AES_BLOCK_SIZE],
unsigned int *num);
/* NB: the IV is _two_ blocks long */
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
/* NB: the IV is _four_ blocks long */
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
const AES_KEY *key2, const unsigned char *ivec,
const int enc);
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out,
const unsigned char *in, unsigned int inlen);
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out,
const unsigned char *in, unsigned int inlen);
#ifdef __cplusplus
}
#endif
#endif /* !HEADER_AES_H */

View File

@@ -0,0 +1,129 @@
#define APPLINK_STDIN 1
#define APPLINK_STDOUT 2
#define APPLINK_STDERR 3
#define APPLINK_FPRINTF 4
#define APPLINK_FGETS 5
#define APPLINK_FREAD 6
#define APPLINK_FWRITE 7
#define APPLINK_FSETMOD 8
#define APPLINK_FEOF 9
#define APPLINK_FCLOSE 10 /* should not be used */
#define APPLINK_FOPEN 11 /* solely for completeness */
#define APPLINK_FSEEK 12
#define APPLINK_FTELL 13
#define APPLINK_FFLUSH 14
#define APPLINK_FERROR 15
#define APPLINK_CLEARERR 16
#define APPLINK_FILENO 17 /* to be used with below */
#define APPLINK_OPEN 18 /* formally can't be used, as flags can vary */
#define APPLINK_READ 19
#define APPLINK_WRITE 20
#define APPLINK_LSEEK 21
#define APPLINK_CLOSE 22
#define APPLINK_MAX 22 /* always same as last macro */
#ifndef APPMACROS_ONLY
# include <stdio.h>
# include <io.h>
# include <fcntl.h>
static void *app_stdin(void)
{
return stdin;
}
static void *app_stdout(void)
{
return stdout;
}
static void *app_stderr(void)
{
return stderr;
}
static int app_feof(FILE *fp)
{
return feof(fp);
}
static int app_ferror(FILE *fp)
{
return ferror(fp);
}
static void app_clearerr(FILE *fp)
{
clearerr(fp);
}
static int app_fileno(FILE *fp)
{
return _fileno(fp);
}
static int app_fsetmod(FILE *fp, char mod)
{
return _setmode(_fileno(fp), mod == 'b' ? _O_BINARY : _O_TEXT);
}
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllexport)
void **
# if defined(__BORLANDC__)
/*
* __stdcall appears to be the only way to get the name
* decoration right with Borland C. Otherwise it works
* purely incidentally, as we pass no parameters.
*/
__stdcall
# else
__cdecl
# endif
OPENSSL_Applink(void)
{
static int once = 1;
static void *OPENSSL_ApplinkTable[APPLINK_MAX + 1] =
{ (void *)APPLINK_MAX };
if (once) {
OPENSSL_ApplinkTable[APPLINK_STDIN] = app_stdin;
OPENSSL_ApplinkTable[APPLINK_STDOUT] = app_stdout;
OPENSSL_ApplinkTable[APPLINK_STDERR] = app_stderr;
OPENSSL_ApplinkTable[APPLINK_FPRINTF] = fprintf;
OPENSSL_ApplinkTable[APPLINK_FGETS] = fgets;
OPENSSL_ApplinkTable[APPLINK_FREAD] = fread;
OPENSSL_ApplinkTable[APPLINK_FWRITE] = fwrite;
OPENSSL_ApplinkTable[APPLINK_FSETMOD] = app_fsetmod;
OPENSSL_ApplinkTable[APPLINK_FEOF] = app_feof;
OPENSSL_ApplinkTable[APPLINK_FCLOSE] = fclose;
OPENSSL_ApplinkTable[APPLINK_FOPEN] = fopen;
OPENSSL_ApplinkTable[APPLINK_FSEEK] = fseek;
OPENSSL_ApplinkTable[APPLINK_FTELL] = ftell;
OPENSSL_ApplinkTable[APPLINK_FFLUSH] = fflush;
OPENSSL_ApplinkTable[APPLINK_FERROR] = app_ferror;
OPENSSL_ApplinkTable[APPLINK_CLEARERR] = app_clearerr;
OPENSSL_ApplinkTable[APPLINK_FILENO] = app_fileno;
OPENSSL_ApplinkTable[APPLINK_OPEN] = _open;
OPENSSL_ApplinkTable[APPLINK_READ] = _read;
OPENSSL_ApplinkTable[APPLINK_WRITE] = _write;
OPENSSL_ApplinkTable[APPLINK_LSEEK] = _lseek;
OPENSSL_ApplinkTable[APPLINK_CLOSE] = _close;
once = 0;
}
return OPENSSL_ApplinkTable;
}
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,579 @@
/* crypto/asn1/asn1_mac.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.]
*/
#ifndef HEADER_ASN1_MAC_H
# define HEADER_ASN1_MAC_H
# include <openssl/asn1.h>
#ifdef __cplusplus
extern "C" {
#endif
# ifndef ASN1_MAC_ERR_LIB
# define ASN1_MAC_ERR_LIB ERR_LIB_ASN1
# endif
# define ASN1_MAC_H_err(f,r,line) \
ERR_PUT_error(ASN1_MAC_ERR_LIB,(f),(r),__FILE__,(line))
# define M_ASN1_D2I_vars(a,type,func) \
ASN1_const_CTX c; \
type ret=NULL; \
\
c.pp=(const unsigned char **)pp; \
c.q= *(const unsigned char **)pp; \
c.error=ERR_R_NESTED_ASN1_ERROR; \
if ((a == NULL) || ((*a) == NULL)) \
{ if ((ret=(type)func()) == NULL) \
{ c.line=__LINE__; goto err; } } \
else ret=(*a);
# define M_ASN1_D2I_Init() \
c.p= *(const unsigned char **)pp; \
c.max=(length == 0)?0:(c.p+length);
# define M_ASN1_D2I_Finish_2(a) \
if (!asn1_const_Finish(&c)) \
{ c.line=__LINE__; goto err; } \
*(const unsigned char **)pp=c.p; \
if (a != NULL) (*a)=ret; \
return(ret);
# define M_ASN1_D2I_Finish(a,func,e) \
M_ASN1_D2I_Finish_2(a); \
err:\
ASN1_MAC_H_err((e),c.error,c.line); \
asn1_add_error(*(const unsigned char **)pp,(int)(c.q- *pp)); \
if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \
return(NULL)
# define M_ASN1_D2I_start_sequence() \
if (!asn1_GetSequence(&c,&length)) \
{ c.line=__LINE__; goto err; }
/* Begin reading ASN1 without a surrounding sequence */
# define M_ASN1_D2I_begin() \
c.slen = length;
/* End reading ASN1 with no check on length */
# define M_ASN1_D2I_Finish_nolen(a, func, e) \
*pp=c.p; \
if (a != NULL) (*a)=ret; \
return(ret); \
err:\
ASN1_MAC_H_err((e),c.error,c.line); \
asn1_add_error(*pp,(int)(c.q- *pp)); \
if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \
return(NULL)
# define M_ASN1_D2I_end_sequence() \
(((c.inf&1) == 0)?(c.slen <= 0): \
(c.eos=ASN1_const_check_infinite_end(&c.p,c.slen)))
/* Don't use this with d2i_ASN1_BOOLEAN() */
# define M_ASN1_D2I_get(b, func) \
c.q=c.p; \
if (func(&(b),&c.p,c.slen) == NULL) \
{c.line=__LINE__; goto err; } \
c.slen-=(c.p-c.q);
/* Don't use this with d2i_ASN1_BOOLEAN() */
# define M_ASN1_D2I_get_x(type,b,func) \
c.q=c.p; \
if (((D2I_OF(type))func)(&(b),&c.p,c.slen) == NULL) \
{c.line=__LINE__; goto err; } \
c.slen-=(c.p-c.q);
/* use this instead () */
# define M_ASN1_D2I_get_int(b,func) \
c.q=c.p; \
if (func(&(b),&c.p,c.slen) < 0) \
{c.line=__LINE__; goto err; } \
c.slen-=(c.p-c.q);
# define M_ASN1_D2I_get_opt(b,func,type) \
if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \
== (V_ASN1_UNIVERSAL|(type)))) \
{ \
M_ASN1_D2I_get(b,func); \
}
# define M_ASN1_D2I_get_int_opt(b,func,type) \
if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \
== (V_ASN1_UNIVERSAL|(type)))) \
{ \
M_ASN1_D2I_get_int(b,func); \
}
# define M_ASN1_D2I_get_imp(b,func, type) \
M_ASN1_next=(_tmp& V_ASN1_CONSTRUCTED)|type; \
c.q=c.p; \
if (func(&(b),&c.p,c.slen) == NULL) \
{c.line=__LINE__; M_ASN1_next_prev = _tmp; goto err; } \
c.slen-=(c.p-c.q);\
M_ASN1_next_prev=_tmp;
# define M_ASN1_D2I_get_IMP_opt(b,func,tag,type) \
if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == \
(V_ASN1_CONTEXT_SPECIFIC|(tag)))) \
{ \
unsigned char _tmp = M_ASN1_next; \
M_ASN1_D2I_get_imp(b,func, type);\
}
# define M_ASN1_D2I_get_set(r,func,free_func) \
M_ASN1_D2I_get_imp_set(r,func,free_func, \
V_ASN1_SET,V_ASN1_UNIVERSAL);
# define M_ASN1_D2I_get_set_type(type,r,func,free_func) \
M_ASN1_D2I_get_imp_set_type(type,r,func,free_func, \
V_ASN1_SET,V_ASN1_UNIVERSAL);
# define M_ASN1_D2I_get_set_opt(r,func,free_func) \
if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \
V_ASN1_CONSTRUCTED|V_ASN1_SET)))\
{ M_ASN1_D2I_get_set(r,func,free_func); }
# define M_ASN1_D2I_get_set_opt_type(type,r,func,free_func) \
if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \
V_ASN1_CONSTRUCTED|V_ASN1_SET)))\
{ M_ASN1_D2I_get_set_type(type,r,func,free_func); }
# define M_ASN1_I2D_len_SET_opt(a,f) \
if ((a != NULL) && (sk_num(a) != 0)) \
M_ASN1_I2D_len_SET(a,f);
# define M_ASN1_I2D_put_SET_opt(a,f) \
if ((a != NULL) && (sk_num(a) != 0)) \
M_ASN1_I2D_put_SET(a,f);
# define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \
if ((a != NULL) && (sk_num(a) != 0)) \
M_ASN1_I2D_put_SEQUENCE(a,f);
# define M_ASN1_I2D_put_SEQUENCE_opt_type(type,a,f) \
if ((a != NULL) && (sk_##type##_num(a) != 0)) \
M_ASN1_I2D_put_SEQUENCE_type(type,a,f);
# define M_ASN1_D2I_get_IMP_set_opt(b,func,free_func,tag) \
if ((c.slen != 0) && \
(M_ASN1_next == \
(V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\
{ \
M_ASN1_D2I_get_imp_set(b,func,free_func,\
tag,V_ASN1_CONTEXT_SPECIFIC); \
}
# define M_ASN1_D2I_get_IMP_set_opt_type(type,b,func,free_func,tag) \
if ((c.slen != 0) && \
(M_ASN1_next == \
(V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\
{ \
M_ASN1_D2I_get_imp_set_type(type,b,func,free_func,\
tag,V_ASN1_CONTEXT_SPECIFIC); \
}
# define M_ASN1_D2I_get_seq(r,func,free_func) \
M_ASN1_D2I_get_imp_set(r,func,free_func,\
V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL);
# define M_ASN1_D2I_get_seq_type(type,r,func,free_func) \
M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\
V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL)
# define M_ASN1_D2I_get_seq_opt(r,func,free_func) \
if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \
V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\
{ M_ASN1_D2I_get_seq(r,func,free_func); }
# define M_ASN1_D2I_get_seq_opt_type(type,r,func,free_func) \
if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \
V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\
{ M_ASN1_D2I_get_seq_type(type,r,func,free_func); }
# define M_ASN1_D2I_get_IMP_set(r,func,free_func,x) \
M_ASN1_D2I_get_imp_set(r,func,free_func,\
x,V_ASN1_CONTEXT_SPECIFIC);
# define M_ASN1_D2I_get_IMP_set_type(type,r,func,free_func,x) \
M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\
x,V_ASN1_CONTEXT_SPECIFIC);
# define M_ASN1_D2I_get_imp_set(r,func,free_func,a,b) \
c.q=c.p; \
if (d2i_ASN1_SET(&(r),&c.p,c.slen,(char *(*)())func,\
(void (*)())free_func,a,b) == NULL) \
{ c.line=__LINE__; goto err; } \
c.slen-=(c.p-c.q);
# define M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,a,b) \
c.q=c.p; \
if (d2i_ASN1_SET_OF_##type(&(r),&c.p,c.slen,func,\
free_func,a,b) == NULL) \
{ c.line=__LINE__; goto err; } \
c.slen-=(c.p-c.q);
# define M_ASN1_D2I_get_set_strings(r,func,a,b) \
c.q=c.p; \
if (d2i_ASN1_STRING_SET(&(r),&c.p,c.slen,a,b) == NULL) \
{ c.line=__LINE__; goto err; } \
c.slen-=(c.p-c.q);
# define M_ASN1_D2I_get_EXP_opt(r,func,tag) \
if ((c.slen != 0L) && (M_ASN1_next == \
(V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \
{ \
int Tinf,Ttag,Tclass; \
long Tlen; \
\
c.q=c.p; \
Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \
if (Tinf & 0x80) \
{ c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \
c.line=__LINE__; goto err; } \
if (Tinf == (V_ASN1_CONSTRUCTED+1)) \
Tlen = c.slen - (c.p - c.q) - 2; \
if (func(&(r),&c.p,Tlen) == NULL) \
{ c.line=__LINE__; goto err; } \
if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \
Tlen = c.slen - (c.p - c.q); \
if(!ASN1_const_check_infinite_end(&c.p, Tlen)) \
{ c.error=ERR_R_MISSING_ASN1_EOS; \
c.line=__LINE__; goto err; } \
}\
c.slen-=(c.p-c.q); \
}
# define M_ASN1_D2I_get_EXP_set_opt(r,func,free_func,tag,b) \
if ((c.slen != 0) && (M_ASN1_next == \
(V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \
{ \
int Tinf,Ttag,Tclass; \
long Tlen; \
\
c.q=c.p; \
Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \
if (Tinf & 0x80) \
{ c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \
c.line=__LINE__; goto err; } \
if (Tinf == (V_ASN1_CONSTRUCTED+1)) \
Tlen = c.slen - (c.p - c.q) - 2; \
if (d2i_ASN1_SET(&(r),&c.p,Tlen,(char *(*)())func, \
(void (*)())free_func, \
b,V_ASN1_UNIVERSAL) == NULL) \
{ c.line=__LINE__; goto err; } \
if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \
Tlen = c.slen - (c.p - c.q); \
if(!ASN1_check_infinite_end(&c.p, Tlen)) \
{ c.error=ERR_R_MISSING_ASN1_EOS; \
c.line=__LINE__; goto err; } \
}\
c.slen-=(c.p-c.q); \
}
# define M_ASN1_D2I_get_EXP_set_opt_type(type,r,func,free_func,tag,b) \
if ((c.slen != 0) && (M_ASN1_next == \
(V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \
{ \
int Tinf,Ttag,Tclass; \
long Tlen; \
\
c.q=c.p; \
Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \
if (Tinf & 0x80) \
{ c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \
c.line=__LINE__; goto err; } \
if (Tinf == (V_ASN1_CONSTRUCTED+1)) \
Tlen = c.slen - (c.p - c.q) - 2; \
if (d2i_ASN1_SET_OF_##type(&(r),&c.p,Tlen,func, \
free_func,b,V_ASN1_UNIVERSAL) == NULL) \
{ c.line=__LINE__; goto err; } \
if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \
Tlen = c.slen - (c.p - c.q); \
if(!ASN1_check_infinite_end(&c.p, Tlen)) \
{ c.error=ERR_R_MISSING_ASN1_EOS; \
c.line=__LINE__; goto err; } \
}\
c.slen-=(c.p-c.q); \
}
/* New macros */
# define M_ASN1_New_Malloc(ret,type) \
if ((ret=(type *)OPENSSL_malloc(sizeof(type))) == NULL) \
{ c.line=__LINE__; goto err2; }
# define M_ASN1_New(arg,func) \
if (((arg)=func()) == NULL) return(NULL)
# define M_ASN1_New_Error(a) \
/*- err: ASN1_MAC_H_err((a),ERR_R_NESTED_ASN1_ERROR,c.line); \
return(NULL);*/ \
err2: ASN1_MAC_H_err((a),ERR_R_MALLOC_FAILURE,c.line); \
return(NULL)
/*
* BIG UGLY WARNING! This is so damn ugly I wanna puke. Unfortunately, some
* macros that use ASN1_const_CTX still insist on writing in the input
* stream. ARGH! ARGH! ARGH! Let's get rid of this macro package. Please? --
* Richard Levitte
*/
# define M_ASN1_next (*((unsigned char *)(c.p)))
# define M_ASN1_next_prev (*((unsigned char *)(c.q)))
/*************************************************/
# define M_ASN1_I2D_vars(a) int r=0,ret=0; \
unsigned char *p; \
if (a == NULL) return(0)
/* Length Macros */
# define M_ASN1_I2D_len(a,f) ret+=f(a,NULL)
# define M_ASN1_I2D_len_IMP_opt(a,f) if (a != NULL) M_ASN1_I2D_len(a,f)
# define M_ASN1_I2D_len_SET(a,f) \
ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET);
# define M_ASN1_I2D_len_SET_type(type,a,f) \
ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SET, \
V_ASN1_UNIVERSAL,IS_SET);
# define M_ASN1_I2D_len_SEQUENCE(a,f) \
ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \
IS_SEQUENCE);
# define M_ASN1_I2D_len_SEQUENCE_type(type,a,f) \
ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SEQUENCE, \
V_ASN1_UNIVERSAL,IS_SEQUENCE)
# define M_ASN1_I2D_len_SEQUENCE_opt(a,f) \
if ((a != NULL) && (sk_num(a) != 0)) \
M_ASN1_I2D_len_SEQUENCE(a,f);
# define M_ASN1_I2D_len_SEQUENCE_opt_type(type,a,f) \
if ((a != NULL) && (sk_##type##_num(a) != 0)) \
M_ASN1_I2D_len_SEQUENCE_type(type,a,f);
# define M_ASN1_I2D_len_IMP_SET(a,f,x) \
ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET);
# define M_ASN1_I2D_len_IMP_SET_type(type,a,f,x) \
ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \
V_ASN1_CONTEXT_SPECIFIC,IS_SET);
# define M_ASN1_I2D_len_IMP_SET_opt(a,f,x) \
if ((a != NULL) && (sk_num(a) != 0)) \
ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \
IS_SET);
# define M_ASN1_I2D_len_IMP_SET_opt_type(type,a,f,x) \
if ((a != NULL) && (sk_##type##_num(a) != 0)) \
ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \
V_ASN1_CONTEXT_SPECIFIC,IS_SET);
# define M_ASN1_I2D_len_IMP_SEQUENCE(a,f,x) \
ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \
IS_SEQUENCE);
# define M_ASN1_I2D_len_IMP_SEQUENCE_opt(a,f,x) \
if ((a != NULL) && (sk_num(a) != 0)) \
ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \
IS_SEQUENCE);
# define M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(type,a,f,x) \
if ((a != NULL) && (sk_##type##_num(a) != 0)) \
ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \
V_ASN1_CONTEXT_SPECIFIC, \
IS_SEQUENCE);
# define M_ASN1_I2D_len_EXP_opt(a,f,mtag,v) \
if (a != NULL)\
{ \
v=f(a,NULL); \
ret+=ASN1_object_size(1,v,mtag); \
}
# define M_ASN1_I2D_len_EXP_SET_opt(a,f,mtag,tag,v) \
if ((a != NULL) && (sk_num(a) != 0))\
{ \
v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL,IS_SET); \
ret+=ASN1_object_size(1,v,mtag); \
}
# define M_ASN1_I2D_len_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \
if ((a != NULL) && (sk_num(a) != 0))\
{ \
v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL, \
IS_SEQUENCE); \
ret+=ASN1_object_size(1,v,mtag); \
}
# define M_ASN1_I2D_len_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \
if ((a != NULL) && (sk_##type##_num(a) != 0))\
{ \
v=i2d_ASN1_SET_OF_##type(a,NULL,f,tag, \
V_ASN1_UNIVERSAL, \
IS_SEQUENCE); \
ret+=ASN1_object_size(1,v,mtag); \
}
/* Put Macros */
# define M_ASN1_I2D_put(a,f) f(a,&p)
# define M_ASN1_I2D_put_IMP_opt(a,f,t) \
if (a != NULL) \
{ \
unsigned char *q=p; \
f(a,&p); \
*q=(V_ASN1_CONTEXT_SPECIFIC|t|(*q&V_ASN1_CONSTRUCTED));\
}
# define M_ASN1_I2D_put_SET(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SET,\
V_ASN1_UNIVERSAL,IS_SET)
# define M_ASN1_I2D_put_SET_type(type,a,f) \
i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET)
# define M_ASN1_I2D_put_IMP_SET(a,f,x) i2d_ASN1_SET(a,&p,f,x,\
V_ASN1_CONTEXT_SPECIFIC,IS_SET)
# define M_ASN1_I2D_put_IMP_SET_type(type,a,f,x) \
i2d_ASN1_SET_OF_##type(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET)
# define M_ASN1_I2D_put_IMP_SEQUENCE(a,f,x) i2d_ASN1_SET(a,&p,f,x,\
V_ASN1_CONTEXT_SPECIFIC,IS_SEQUENCE)
# define M_ASN1_I2D_put_SEQUENCE(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SEQUENCE,\
V_ASN1_UNIVERSAL,IS_SEQUENCE)
# define M_ASN1_I2D_put_SEQUENCE_type(type,a,f) \
i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \
IS_SEQUENCE)
# define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \
if ((a != NULL) && (sk_num(a) != 0)) \
M_ASN1_I2D_put_SEQUENCE(a,f);
# define M_ASN1_I2D_put_IMP_SET_opt(a,f,x) \
if ((a != NULL) && (sk_num(a) != 0)) \
{ i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \
IS_SET); }
# define M_ASN1_I2D_put_IMP_SET_opt_type(type,a,f,x) \
if ((a != NULL) && (sk_##type##_num(a) != 0)) \
{ i2d_ASN1_SET_OF_##type(a,&p,f,x, \
V_ASN1_CONTEXT_SPECIFIC, \
IS_SET); }
# define M_ASN1_I2D_put_IMP_SEQUENCE_opt(a,f,x) \
if ((a != NULL) && (sk_num(a) != 0)) \
{ i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \
IS_SEQUENCE); }
# define M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(type,a,f,x) \
if ((a != NULL) && (sk_##type##_num(a) != 0)) \
{ i2d_ASN1_SET_OF_##type(a,&p,f,x, \
V_ASN1_CONTEXT_SPECIFIC, \
IS_SEQUENCE); }
# define M_ASN1_I2D_put_EXP_opt(a,f,tag,v) \
if (a != NULL) \
{ \
ASN1_put_object(&p,1,v,tag,V_ASN1_CONTEXT_SPECIFIC); \
f(a,&p); \
}
# define M_ASN1_I2D_put_EXP_SET_opt(a,f,mtag,tag,v) \
if ((a != NULL) && (sk_num(a) != 0)) \
{ \
ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \
i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SET); \
}
# define M_ASN1_I2D_put_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \
if ((a != NULL) && (sk_num(a) != 0)) \
{ \
ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \
i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SEQUENCE); \
}
# define M_ASN1_I2D_put_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \
if ((a != NULL) && (sk_##type##_num(a) != 0)) \
{ \
ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \
i2d_ASN1_SET_OF_##type(a,&p,f,tag,V_ASN1_UNIVERSAL, \
IS_SEQUENCE); \
}
# define M_ASN1_I2D_seq_total() \
r=ASN1_object_size(1,ret,V_ASN1_SEQUENCE); \
if (pp == NULL) return(r); \
p= *pp; \
ASN1_put_object(&p,1,ret,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL)
# define M_ASN1_I2D_INF_seq_start(tag,ctx) \
*(p++)=(V_ASN1_CONSTRUCTED|(tag)|(ctx)); \
*(p++)=0x80
# define M_ASN1_I2D_INF_seq_end() *(p++)=0x00; *(p++)=0x00
# define M_ASN1_I2D_finish() *pp=p; \
return(r);
int asn1_GetSequence(ASN1_const_CTX *c, long *length);
void asn1_add_error(const unsigned char *address, int offset);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,973 @@
/* asn1t.h */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
* 2000.
*/
/* ====================================================================
* Copyright (c) 2000-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
* 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).
*
*/
#ifndef HEADER_ASN1T_H
# define HEADER_ASN1T_H
# include <stddef.h>
# include <openssl/e_os2.h>
# include <openssl/asn1.h>
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
# undef OPENSSL_EXTERN
# define OPENSSL_EXTERN OPENSSL_EXPORT
# endif
/* ASN1 template defines, structures and functions */
#ifdef __cplusplus
extern "C" {
#endif
# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr))
/* Macros for start and end of ASN1_ITEM definition */
# define ASN1_ITEM_start(itname) \
OPENSSL_GLOBAL const ASN1_ITEM itname##_it = {
# define ASN1_ITEM_end(itname) \
};
# else
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr()))
/* Macros for start and end of ASN1_ITEM definition */
# define ASN1_ITEM_start(itname) \
const ASN1_ITEM * itname##_it(void) \
{ \
static const ASN1_ITEM local_it = {
# define ASN1_ITEM_end(itname) \
}; \
return &local_it; \
}
# endif
/* Macros to aid ASN1 template writing */
# define ASN1_ITEM_TEMPLATE(tname) \
static const ASN1_TEMPLATE tname##_item_tt
# define ASN1_ITEM_TEMPLATE_END(tname) \
;\
ASN1_ITEM_start(tname) \
ASN1_ITYPE_PRIMITIVE,\
-1,\
&tname##_item_tt,\
0,\
NULL,\
0,\
#tname \
ASN1_ITEM_end(tname)
/* This is a ASN1 type which just embeds a template */
/*-
* This pair helps declare a SEQUENCE. We can do:
*
* ASN1_SEQUENCE(stname) = {
* ... SEQUENCE components ...
* } ASN1_SEQUENCE_END(stname)
*
* This will produce an ASN1_ITEM called stname_it
* for a structure called stname.
*
* If you want the same structure but a different
* name then use:
*
* ASN1_SEQUENCE(itname) = {
* ... SEQUENCE components ...
* } ASN1_SEQUENCE_END_name(stname, itname)
*
* This will create an item called itname_it using
* a structure called stname.
*/
# define ASN1_SEQUENCE(tname) \
static const ASN1_TEMPLATE tname##_seq_tt[]
# define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
# define ASN1_SEQUENCE_END_name(stname, tname) \
;\
ASN1_ITEM_start(tname) \
ASN1_ITYPE_SEQUENCE,\
V_ASN1_SEQUENCE,\
tname##_seq_tt,\
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
NULL,\
sizeof(stname),\
#stname \
ASN1_ITEM_end(tname)
# define ASN1_NDEF_SEQUENCE(tname) \
ASN1_SEQUENCE(tname)
# define ASN1_NDEF_SEQUENCE_cb(tname, cb) \
ASN1_SEQUENCE_cb(tname, cb)
# define ASN1_SEQUENCE_cb(tname, cb) \
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \
ASN1_SEQUENCE(tname)
# define ASN1_BROKEN_SEQUENCE(tname) \
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \
ASN1_SEQUENCE(tname)
# define ASN1_SEQUENCE_ref(tname, cb, lck) \
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), lck, cb, 0}; \
ASN1_SEQUENCE(tname)
# define ASN1_SEQUENCE_enc(tname, enc, cb) \
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc)}; \
ASN1_SEQUENCE(tname)
# define ASN1_NDEF_SEQUENCE_END(tname) \
;\
ASN1_ITEM_start(tname) \
ASN1_ITYPE_NDEF_SEQUENCE,\
V_ASN1_SEQUENCE,\
tname##_seq_tt,\
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
NULL,\
sizeof(tname),\
#tname \
ASN1_ITEM_end(tname)
# define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname)
# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
# define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
# define ASN1_SEQUENCE_END_ref(stname, tname) \
;\
ASN1_ITEM_start(tname) \
ASN1_ITYPE_SEQUENCE,\
V_ASN1_SEQUENCE,\
tname##_seq_tt,\
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
&tname##_aux,\
sizeof(stname),\
#stname \
ASN1_ITEM_end(tname)
# define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \
;\
ASN1_ITEM_start(tname) \
ASN1_ITYPE_NDEF_SEQUENCE,\
V_ASN1_SEQUENCE,\
tname##_seq_tt,\
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
&tname##_aux,\
sizeof(stname),\
#stname \
ASN1_ITEM_end(tname)
/*-
* This pair helps declare a CHOICE type. We can do:
*
* ASN1_CHOICE(chname) = {
* ... CHOICE options ...
* ASN1_CHOICE_END(chname)
*
* This will produce an ASN1_ITEM called chname_it
* for a structure called chname. The structure
* definition must look like this:
* typedef struct {
* int type;
* union {
* ASN1_SOMETHING *opt1;
* ASN1_SOMEOTHER *opt2;
* } value;
* } chname;
*
* the name of the selector must be 'type'.
* to use an alternative selector name use the
* ASN1_CHOICE_END_selector() version.
*/
# define ASN1_CHOICE(tname) \
static const ASN1_TEMPLATE tname##_ch_tt[]
# define ASN1_CHOICE_cb(tname, cb) \
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \
ASN1_CHOICE(tname)
# define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)
# define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)
# define ASN1_CHOICE_END_selector(stname, tname, selname) \
;\
ASN1_ITEM_start(tname) \
ASN1_ITYPE_CHOICE,\
offsetof(stname,selname) ,\
tname##_ch_tt,\
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
NULL,\
sizeof(stname),\
#stname \
ASN1_ITEM_end(tname)
# define ASN1_CHOICE_END_cb(stname, tname, selname) \
;\
ASN1_ITEM_start(tname) \
ASN1_ITYPE_CHOICE,\
offsetof(stname,selname) ,\
tname##_ch_tt,\
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
&tname##_aux,\
sizeof(stname),\
#stname \
ASN1_ITEM_end(tname)
/* This helps with the template wrapper form of ASN1_ITEM */
# define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \
(flags), (tag), 0,\
#name, ASN1_ITEM_ref(type) }
/* These help with SEQUENCE or CHOICE components */
/* used to declare other types */
# define ASN1_EX_TYPE(flags, tag, stname, field, type) { \
(flags), (tag), offsetof(stname, field),\
#field, ASN1_ITEM_ref(type) }
/* used when the structure is combined with the parent */
# define ASN1_EX_COMBINE(flags, tag, type) { \
(flags)|ASN1_TFLG_COMBINE, (tag), 0, NULL, ASN1_ITEM_ref(type) }
/* implicit and explicit helper macros */
# define ASN1_IMP_EX(stname, field, type, tag, ex) \
ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | ex, tag, stname, field, type)
# define ASN1_EXP_EX(stname, field, type, tag, ex) \
ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | ex, tag, stname, field, type)
/* Any defined by macros: the field used is in the table itself */
# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }
# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }
# else
# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
# endif
/* Plain simple type */
# define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type)
/* OPTIONAL simple type */
# define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
/* IMPLICIT tagged simple type */
# define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0)
/* IMPLICIT tagged OPTIONAL simple type */
# define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
/* Same as above but EXPLICIT */
# define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0)
# define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
/* SEQUENCE OF type */
# define ASN1_SEQUENCE_OF(stname, field, type) \
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
/* OPTIONAL SEQUENCE OF */
# define ASN1_SEQUENCE_OF_OPT(stname, field, type) \
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
/* Same as above but for SET OF */
# define ASN1_SET_OF(stname, field, type) \
ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
# define ASN1_SET_OF_OPT(stname, field, type) \
ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */
# define ASN1_IMP_SET_OF(stname, field, type, tag) \
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
# define ASN1_EXP_SET_OF(stname, field, type, tag) \
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
# define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
# define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
# define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
# define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
# define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
# define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
/* EXPLICIT using indefinite length constructed form */
# define ASN1_NDEF_EXP(stname, field, type, tag) \
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF)
/* EXPLICIT OPTIONAL using indefinite length constructed form */
# define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF)
/* Macros for the ASN1_ADB structure */
# define ASN1_ADB(name) \
static const ASN1_ADB_TABLE name##_adbtbl[]
# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
# define ASN1_ADB_END(name, flags, field, app_table, def, none) \
;\
static const ASN1_ADB name##_adb = {\
flags,\
offsetof(name, field),\
app_table,\
name##_adbtbl,\
sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\
def,\
none\
}
# else
# define ASN1_ADB_END(name, flags, field, app_table, def, none) \
;\
static const ASN1_ITEM *name##_adb(void) \
{ \
static const ASN1_ADB internal_adb = \
{\
flags,\
offsetof(name, field),\
app_table,\
name##_adbtbl,\
sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\
def,\
none\
}; \
return (const ASN1_ITEM *) &internal_adb; \
} \
void dummy_function(void)
# endif
# define ADB_ENTRY(val, template) {val, template}
# define ASN1_ADB_TEMPLATE(name) \
static const ASN1_TEMPLATE name##_tt
/*
* This is the ASN1 template structure that defines a wrapper round the
* actual type. It determines the actual position of the field in the value
* structure, various flags such as OPTIONAL and the field name.
*/
struct ASN1_TEMPLATE_st {
unsigned long flags; /* Various flags */
long tag; /* tag, not used if no tagging */
unsigned long offset; /* Offset of this field in structure */
# ifndef NO_ASN1_FIELD_NAMES
const char *field_name; /* Field name */
# endif
ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */
};
/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */
# define ASN1_TEMPLATE_item(t) (t->item_ptr)
# define ASN1_TEMPLATE_adb(t) (t->item_ptr)
typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;
typedef struct ASN1_ADB_st ASN1_ADB;
struct ASN1_ADB_st {
unsigned long flags; /* Various flags */
unsigned long offset; /* Offset of selector field */
STACK_OF(ASN1_ADB_TABLE) **app_items; /* Application defined items */
const ASN1_ADB_TABLE *tbl; /* Table of possible types */
long tblcount; /* Number of entries in tbl */
const ASN1_TEMPLATE *default_tt; /* Type to use if no match */
const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */
};
struct ASN1_ADB_TABLE_st {
long value; /* NID for an object or value for an int */
const ASN1_TEMPLATE tt; /* item for this value */
};
/* template flags */
/* Field is optional */
# define ASN1_TFLG_OPTIONAL (0x1)
/* Field is a SET OF */
# define ASN1_TFLG_SET_OF (0x1 << 1)
/* Field is a SEQUENCE OF */
# define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
/*
* Special case: this refers to a SET OF that will be sorted into DER order
* when encoded *and* the corresponding STACK will be modified to match the
* new order.
*/
# define ASN1_TFLG_SET_ORDER (0x3 << 1)
/* Mask for SET OF or SEQUENCE OF */
# define ASN1_TFLG_SK_MASK (0x3 << 1)
/*
* These flags mean the tag should be taken from the tag field. If EXPLICIT
* then the underlying type is used for the inner tag.
*/
/* IMPLICIT tagging */
# define ASN1_TFLG_IMPTAG (0x1 << 3)
/* EXPLICIT tagging, inner tag from underlying type */
# define ASN1_TFLG_EXPTAG (0x2 << 3)
# define ASN1_TFLG_TAG_MASK (0x3 << 3)
/* context specific IMPLICIT */
# define ASN1_TFLG_IMPLICIT ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT
/* context specific EXPLICIT */
# define ASN1_TFLG_EXPLICIT ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT
/*
* If tagging is in force these determine the type of tag to use. Otherwise
* the tag is determined by the underlying type. These values reflect the
* actual octet format.
*/
/* Universal tag */
# define ASN1_TFLG_UNIVERSAL (0x0<<6)
/* Application tag */
# define ASN1_TFLG_APPLICATION (0x1<<6)
/* Context specific tag */
# define ASN1_TFLG_CONTEXT (0x2<<6)
/* Private tag */
# define ASN1_TFLG_PRIVATE (0x3<<6)
# define ASN1_TFLG_TAG_CLASS (0x3<<6)
/*
* These are for ANY DEFINED BY type. In this case the 'item' field points to
* an ASN1_ADB structure which contains a table of values to decode the
* relevant type
*/
# define ASN1_TFLG_ADB_MASK (0x3<<8)
# define ASN1_TFLG_ADB_OID (0x1<<8)
# define ASN1_TFLG_ADB_INT (0x1<<9)
/*
* This flag means a parent structure is passed instead of the field: this is
* useful is a SEQUENCE is being combined with a CHOICE for example. Since
* this means the structure and item name will differ we need to use the
* ASN1_CHOICE_END_name() macro for example.
*/
# define ASN1_TFLG_COMBINE (0x1<<10)
/*
* This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes
* indefinite length constructed encoding to be used if required.
*/
# define ASN1_TFLG_NDEF (0x1<<11)
/* This is the actual ASN1 item itself */
struct ASN1_ITEM_st {
char itype; /* The item type, primitive, SEQUENCE, CHOICE
* or extern */
long utype; /* underlying type */
const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains
* the contents */
long tcount; /* Number of templates if SEQUENCE or CHOICE */
const void *funcs; /* functions that handle this type */
long size; /* Structure size (usually) */
# ifndef NO_ASN1_FIELD_NAMES
const char *sname; /* Structure name */
# endif
};
/*-
* These are values for the itype field and
* determine how the type is interpreted.
*
* For PRIMITIVE types the underlying type
* determines the behaviour if items is NULL.
*
* Otherwise templates must contain a single
* template and the type is treated in the
* same way as the type specified in the template.
*
* For SEQUENCE types the templates field points
* to the members, the size field is the
* structure size.
*
* For CHOICE types the templates field points
* to each possible member (typically a union)
* and the 'size' field is the offset of the
* selector.
*
* The 'funcs' field is used for application
* specific functions.
*
* For COMPAT types the funcs field gives a
* set of functions that handle this type, this
* supports the old d2i, i2d convention.
*
* The EXTERN type uses a new style d2i/i2d.
* The new style should be used where possible
* because it avoids things like the d2i IMPLICIT
* hack.
*
* MSTRING is a multiple string type, it is used
* for a CHOICE of character strings where the
* actual strings all occupy an ASN1_STRING
* structure. In this case the 'utype' field
* has a special meaning, it is used as a mask
* of acceptable types using the B_ASN1 constants.
*
* NDEF_SEQUENCE is the same as SEQUENCE except
* that it will use indefinite length constructed
* encoding if requested.
*
*/
# define ASN1_ITYPE_PRIMITIVE 0x0
# define ASN1_ITYPE_SEQUENCE 0x1
# define ASN1_ITYPE_CHOICE 0x2
# define ASN1_ITYPE_COMPAT 0x3
# define ASN1_ITYPE_EXTERN 0x4
# define ASN1_ITYPE_MSTRING 0x5
# define ASN1_ITYPE_NDEF_SEQUENCE 0x6
/*
* Cache for ASN1 tag and length, so we don't keep re-reading it for things
* like CHOICE
*/
struct ASN1_TLC_st {
char valid; /* Values below are valid */
int ret; /* return value */
long plen; /* length */
int ptag; /* class value */
int pclass; /* class value */
int hdrlen; /* header length */
};
/* Typedefs for ASN1 function pointers */
typedef ASN1_VALUE *ASN1_new_func(void);
typedef void ASN1_free_func(ASN1_VALUE *a);
typedef ASN1_VALUE *ASN1_d2i_func(ASN1_VALUE **a, const unsigned char **in,
long length);
typedef int ASN1_i2d_func(ASN1_VALUE *a, unsigned char **in);
typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it, int tag, int aclass, char opt,
ASN1_TLC *ctx);
typedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
const ASN1_ITEM *it, int tag, int aclass);
typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
typedef int ASN1_ex_print_func(BIO *out, ASN1_VALUE **pval,
int indent, const char *fname,
const ASN1_PCTX *pctx);
typedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont,
int *putype, const ASN1_ITEM *it);
typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont,
int len, int utype, char *free_cont,
const ASN1_ITEM *it);
typedef int ASN1_primitive_print(BIO *out, ASN1_VALUE **pval,
const ASN1_ITEM *it, int indent,
const ASN1_PCTX *pctx);
typedef struct ASN1_COMPAT_FUNCS_st {
ASN1_new_func *asn1_new;
ASN1_free_func *asn1_free;
ASN1_d2i_func *asn1_d2i;
ASN1_i2d_func *asn1_i2d;
} ASN1_COMPAT_FUNCS;
typedef struct ASN1_EXTERN_FUNCS_st {
void *app_data;
ASN1_ex_new_func *asn1_ex_new;
ASN1_ex_free_func *asn1_ex_free;
ASN1_ex_free_func *asn1_ex_clear;
ASN1_ex_d2i *asn1_ex_d2i;
ASN1_ex_i2d *asn1_ex_i2d;
ASN1_ex_print_func *asn1_ex_print;
} ASN1_EXTERN_FUNCS;
typedef struct ASN1_PRIMITIVE_FUNCS_st {
void *app_data;
unsigned long flags;
ASN1_ex_new_func *prim_new;
ASN1_ex_free_func *prim_free;
ASN1_ex_free_func *prim_clear;
ASN1_primitive_c2i *prim_c2i;
ASN1_primitive_i2c *prim_i2c;
ASN1_primitive_print *prim_print;
} ASN1_PRIMITIVE_FUNCS;
/*
* This is the ASN1_AUX structure: it handles various miscellaneous
* requirements. For example the use of reference counts and an informational
* callback. The "informational callback" is called at various points during
* the ASN1 encoding and decoding. It can be used to provide minor
* customisation of the structures used. This is most useful where the
* supplied routines *almost* do the right thing but need some extra help at
* a few points. If the callback returns zero then it is assumed a fatal
* error has occurred and the main operation should be abandoned. If major
* changes in the default behaviour are required then an external type is
* more appropriate.
*/
typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,
void *exarg);
typedef struct ASN1_AUX_st {
void *app_data;
int flags;
int ref_offset; /* Offset of reference value */
int ref_lock; /* Lock type to use */
ASN1_aux_cb *asn1_cb;
int enc_offset; /* Offset of ASN1_ENCODING structure */
} ASN1_AUX;
/* For print related callbacks exarg points to this structure */
typedef struct ASN1_PRINT_ARG_st {
BIO *out;
int indent;
const ASN1_PCTX *pctx;
} ASN1_PRINT_ARG;
/* For streaming related callbacks exarg points to this structure */
typedef struct ASN1_STREAM_ARG_st {
/* BIO to stream through */
BIO *out;
/* BIO with filters appended */
BIO *ndef_bio;
/* Streaming I/O boundary */
unsigned char **boundary;
} ASN1_STREAM_ARG;
/* Flags in ASN1_AUX */
/* Use a reference count */
# define ASN1_AFLG_REFCOUNT 1
/* Save the encoding of structure (useful for signatures) */
# define ASN1_AFLG_ENCODING 2
/* The Sequence length is invalid */
# define ASN1_AFLG_BROKEN 4
/* operation values for asn1_cb */
# define ASN1_OP_NEW_PRE 0
# define ASN1_OP_NEW_POST 1
# define ASN1_OP_FREE_PRE 2
# define ASN1_OP_FREE_POST 3
# define ASN1_OP_D2I_PRE 4
# define ASN1_OP_D2I_POST 5
# define ASN1_OP_I2D_PRE 6
# define ASN1_OP_I2D_POST 7
# define ASN1_OP_PRINT_PRE 8
# define ASN1_OP_PRINT_POST 9
# define ASN1_OP_STREAM_PRE 10
# define ASN1_OP_STREAM_POST 11
# define ASN1_OP_DETACHED_PRE 12
# define ASN1_OP_DETACHED_POST 13
/* Macro to implement a primitive type */
# define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
# define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \
ASN1_ITEM_start(itname) \
ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \
ASN1_ITEM_end(itname)
/* Macro to implement a multi string type */
# define IMPLEMENT_ASN1_MSTRING(itname, mask) \
ASN1_ITEM_start(itname) \
ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \
ASN1_ITEM_end(itname)
/* Macro to implement an ASN1_ITEM in terms of old style funcs */
# define IMPLEMENT_COMPAT_ASN1(sname) IMPLEMENT_COMPAT_ASN1_type(sname, V_ASN1_SEQUENCE)
# define IMPLEMENT_COMPAT_ASN1_type(sname, tag) \
static const ASN1_COMPAT_FUNCS sname##_ff = { \
(ASN1_new_func *)sname##_new, \
(ASN1_free_func *)sname##_free, \
(ASN1_d2i_func *)d2i_##sname, \
(ASN1_i2d_func *)i2d_##sname, \
}; \
ASN1_ITEM_start(sname) \
ASN1_ITYPE_COMPAT, \
tag, \
NULL, \
0, \
&sname##_ff, \
0, \
#sname \
ASN1_ITEM_end(sname)
# define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \
ASN1_ITEM_start(sname) \
ASN1_ITYPE_EXTERN, \
tag, \
NULL, \
0, \
&fptrs, \
0, \
#sname \
ASN1_ITEM_end(sname)
/* Macro to implement standard functions in terms of ASN1_ITEM structures */
# define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
# define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
# define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \
IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
# define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \
pre stname *fname##_new(void) \
{ \
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
} \
pre void fname##_free(stname *a) \
{ \
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
}
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \
stname *fname##_new(void) \
{ \
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
} \
void fname##_free(stname *a) \
{ \
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
}
# define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
{ \
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\
} \
int i2d_##fname(stname *a, unsigned char **out) \
{ \
return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\
}
# define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \
int i2d_##stname##_NDEF(stname *a, unsigned char **out) \
{ \
return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\
}
/*
* This includes evil casts to remove const: they will go away when full ASN1
* constification is done.
*/
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
{ \
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\
} \
int i2d_##fname(const stname *a, unsigned char **out) \
{ \
return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\
}
# define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \
stname * stname##_dup(stname *x) \
{ \
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
}
# define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \
IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)
# define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \
int fname##_print_ctx(BIO *out, stname *x, int indent, \
const ASN1_PCTX *pctx) \
{ \
return ASN1_item_print(out, (ASN1_VALUE *)x, indent, \
ASN1_ITEM_rptr(itname), pctx); \
}
# define IMPLEMENT_ASN1_FUNCTIONS_const(name) \
IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name)
# define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname) \
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
/* external definitions for primitive types */
DECLARE_ASN1_ITEM(ASN1_BOOLEAN)
DECLARE_ASN1_ITEM(ASN1_TBOOLEAN)
DECLARE_ASN1_ITEM(ASN1_FBOOLEAN)
DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
DECLARE_ASN1_ITEM(CBIGNUM)
DECLARE_ASN1_ITEM(BIGNUM)
DECLARE_ASN1_ITEM(LONG)
DECLARE_ASN1_ITEM(ZLONG)
DECLARE_STACK_OF(ASN1_VALUE)
/* Functions used internally by the ASN1 code */
int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
int ASN1_template_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_TEMPLATE *tt);
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it, int tag, int aclass, char opt,
ASN1_TLC *ctx);
int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
const ASN1_ITEM *it, int tag, int aclass);
int ASN1_template_i2d(ASN1_VALUE **pval, unsigned char **out,
const ASN1_TEMPLATE *tt);
void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype,
const ASN1_ITEM *it);
int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
int utype, char *free_cont, const ASN1_ITEM *it);
int asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it);
int asn1_set_choice_selector(ASN1_VALUE **pval, int value,
const ASN1_ITEM *it);
ASN1_VALUE **asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt,
int nullerr);
int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it);
void asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it);
void asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval,
const ASN1_ITEM *it);
int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen,
const ASN1_ITEM *it);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,883 @@
/* crypto/bio/bio.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.]
*/
#ifndef HEADER_BIO_H
# define HEADER_BIO_H
# include <openssl/e_os2.h>
# ifndef OPENSSL_NO_FP_API
# include <stdio.h>
# endif
# include <stdarg.h>
# include <openssl/crypto.h>
# ifndef OPENSSL_NO_SCTP
# ifndef OPENSSL_SYS_VMS
# include <stdint.h>
# else
# include <inttypes.h>
# endif
# endif
#ifdef __cplusplus
extern "C" {
#endif
/* These are the 'types' of BIOs */
# define BIO_TYPE_NONE 0
# define BIO_TYPE_MEM (1|0x0400)
# define BIO_TYPE_FILE (2|0x0400)
# define BIO_TYPE_FD (4|0x0400|0x0100)
# define BIO_TYPE_SOCKET (5|0x0400|0x0100)
# define BIO_TYPE_NULL (6|0x0400)
# define BIO_TYPE_SSL (7|0x0200)
# define BIO_TYPE_MD (8|0x0200)/* passive filter */
# define BIO_TYPE_BUFFER (9|0x0200)/* filter */
# define BIO_TYPE_CIPHER (10|0x0200)/* filter */
# define BIO_TYPE_BASE64 (11|0x0200)/* filter */
# define BIO_TYPE_CONNECT (12|0x0400|0x0100)/* socket - connect */
# define BIO_TYPE_ACCEPT (13|0x0400|0x0100)/* socket for accept */
# define BIO_TYPE_PROXY_CLIENT (14|0x0200)/* client proxy BIO */
# define BIO_TYPE_PROXY_SERVER (15|0x0200)/* server proxy BIO */
# define BIO_TYPE_NBIO_TEST (16|0x0200)/* server proxy BIO */
# define BIO_TYPE_NULL_FILTER (17|0x0200)
# define BIO_TYPE_BER (18|0x0200)/* BER -> bin filter */
# define BIO_TYPE_BIO (19|0x0400)/* (half a) BIO pair */
# define BIO_TYPE_LINEBUFFER (20|0x0200)/* filter */
# define BIO_TYPE_DGRAM (21|0x0400|0x0100)
# ifndef OPENSSL_NO_SCTP
# define BIO_TYPE_DGRAM_SCTP (24|0x0400|0x0100)
# endif
# define BIO_TYPE_ASN1 (22|0x0200)/* filter */
# define BIO_TYPE_COMP (23|0x0200)/* filter */
# define BIO_TYPE_DESCRIPTOR 0x0100/* socket, fd, connect or accept */
# define BIO_TYPE_FILTER 0x0200
# define BIO_TYPE_SOURCE_SINK 0x0400
/*
* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
* BIO_set_fp(in,stdin,BIO_NOCLOSE);
*/
# define BIO_NOCLOSE 0x00
# define BIO_CLOSE 0x01
/*
* These are used in the following macros and are passed to BIO_ctrl()
*/
# define BIO_CTRL_RESET 1/* opt - rewind/zero etc */
# define BIO_CTRL_EOF 2/* opt - are we at the eof */
# define BIO_CTRL_INFO 3/* opt - extra tit-bits */
# define BIO_CTRL_SET 4/* man - set the 'IO' type */
# define BIO_CTRL_GET 5/* man - get the 'IO' type */
# define BIO_CTRL_PUSH 6/* opt - internal, used to signify change */
# define BIO_CTRL_POP 7/* opt - internal, used to signify change */
# define BIO_CTRL_GET_CLOSE 8/* man - set the 'close' on free */
# define BIO_CTRL_SET_CLOSE 9/* man - set the 'close' on free */
# define BIO_CTRL_PENDING 10/* opt - is their more data buffered */
# define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */
# define BIO_CTRL_DUP 12/* man - extra stuff for 'duped' BIO */
# define BIO_CTRL_WPENDING 13/* opt - number of bytes still to write */
/* callback is int cb(BIO *bio,state,ret); */
# define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */
# define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */
# define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */
/* dgram BIO stuff */
# define BIO_CTRL_DGRAM_CONNECT 31/* BIO dgram special */
# define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected
* socket to be passed in */
# define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */
# define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */
# define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */
# define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */
# define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */
# define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation tiemd out */
/* #ifdef IP_MTU_DISCOVER */
# define BIO_CTRL_DGRAM_MTU_DISCOVER 39/* set DF bit on egress packets */
/* #endif */
# define BIO_CTRL_DGRAM_QUERY_MTU 40/* as kernel for current MTU */
# define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
# define BIO_CTRL_DGRAM_GET_MTU 41/* get cached value for MTU */
# define BIO_CTRL_DGRAM_SET_MTU 42/* set cached value for MTU.
* want to use this if asking
* the kernel fails */
# define BIO_CTRL_DGRAM_MTU_EXCEEDED 43/* check whether the MTU was
* exceed in the previous write
* operation */
# define BIO_CTRL_DGRAM_GET_PEER 46
# define BIO_CTRL_DGRAM_SET_PEER 44/* Destination for the data */
# define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45/* Next DTLS handshake timeout
* to adjust socket timeouts */
# define BIO_CTRL_DGRAM_SET_DONT_FRAG 48
# define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
# ifndef OPENSSL_NO_SCTP
/* SCTP stuff */
# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
# define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
# define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
# define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
# define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
# define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
# define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
# define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
# define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
# define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
# define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
# endif
/* modifiers */
# define BIO_FP_READ 0x02
# define BIO_FP_WRITE 0x04
# define BIO_FP_APPEND 0x08
# define BIO_FP_TEXT 0x10
# define BIO_FLAGS_READ 0x01
# define BIO_FLAGS_WRITE 0x02
# define BIO_FLAGS_IO_SPECIAL 0x04
# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)
# define BIO_FLAGS_SHOULD_RETRY 0x08
# ifndef BIO_FLAGS_UPLINK
/*
* "UPLINK" flag denotes file descriptors provided by application. It
* defaults to 0, as most platforms don't require UPLINK interface.
*/
# define BIO_FLAGS_UPLINK 0
# endif
/* Used in BIO_gethostbyname() */
# define BIO_GHBN_CTRL_HITS 1
# define BIO_GHBN_CTRL_MISSES 2
# define BIO_GHBN_CTRL_CACHE_SIZE 3
# define BIO_GHBN_CTRL_GET_ENTRY 4
# define BIO_GHBN_CTRL_FLUSH 5
/* Mostly used in the SSL BIO */
/*-
* Not used anymore
* #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
* #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
* #define BIO_FLAGS_PROTOCOL_STARTUP 0x40
*/
# define BIO_FLAGS_BASE64_NO_NL 0x100
/*
* This is used with memory BIOs: it means we shouldn't free up or change the
* data in any way.
*/
# define BIO_FLAGS_MEM_RDONLY 0x200
typedef struct bio_st BIO;
void BIO_set_flags(BIO *b, int flags);
int BIO_test_flags(const BIO *b, int flags);
void BIO_clear_flags(BIO *b, int flags);
# define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
# define BIO_set_retry_special(b) \
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))
# define BIO_set_retry_read(b) \
BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
# define BIO_set_retry_write(b) \
BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
/* These are normally used internally in BIOs */
# define BIO_clear_retry_flags(b) \
BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
# define BIO_get_retry_flags(b) \
BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
/* These should be used by the application to tell why we should retry */
# define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
# define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
# define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
# define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS)
# define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
/*
* The next three are used in conjunction with the BIO_should_io_special()
* condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
* *reason); will walk the BIO stack and return the 'reason' for the special
* and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
* the code.
*/
/*
* Returned from the SSL bio when the certificate retrieval code had an error
*/
# define BIO_RR_SSL_X509_LOOKUP 0x01
/* Returned from the connect BIO when a connect would have blocked */
# define BIO_RR_CONNECT 0x02
/* Returned from the accept BIO when an accept would have blocked */
# define BIO_RR_ACCEPT 0x03
/* These are passed by the BIO callback */
# define BIO_CB_FREE 0x01
# define BIO_CB_READ 0x02
# define BIO_CB_WRITE 0x03
# define BIO_CB_PUTS 0x04
# define BIO_CB_GETS 0x05
# define BIO_CB_CTRL 0x06
/*
* The callback is called before and after the underling operation, The
* BIO_CB_RETURN flag indicates if it is after the call
*/
# define BIO_CB_RETURN 0x80
# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)
# define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN))
# define BIO_cb_post(a) ((a)&BIO_CB_RETURN)
long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
int, long, long);
void BIO_set_callback(BIO *b,
long (*callback) (struct bio_st *, int, const char *,
int, long, long));
char *BIO_get_callback_arg(const BIO *b);
void BIO_set_callback_arg(BIO *b, char *arg);
const char *BIO_method_name(const BIO *b);
int BIO_method_type(const BIO *b);
typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
long);
typedef struct bio_method_st {
int type;
const char *name;
int (*bwrite) (BIO *, const char *, int);
int (*bread) (BIO *, char *, int);
int (*bputs) (BIO *, const char *);
int (*bgets) (BIO *, char *, int);
long (*ctrl) (BIO *, int, long, void *);
int (*create) (BIO *);
int (*destroy) (BIO *);
long (*callback_ctrl) (BIO *, int, bio_info_cb *);
} BIO_METHOD;
struct bio_st {
BIO_METHOD *method;
/* bio, mode, argp, argi, argl, ret */
long (*callback) (struct bio_st *, int, const char *, int, long, long);
char *cb_arg; /* first argument for the callback */
int init;
int shutdown;
int flags; /* extra storage */
int retry_reason;
int num;
void *ptr;
struct bio_st *next_bio; /* used by filter BIOs */
struct bio_st *prev_bio; /* used by filter BIOs */
int references;
unsigned long num_read;
unsigned long num_write;
CRYPTO_EX_DATA ex_data;
};
DECLARE_STACK_OF(BIO)
typedef struct bio_f_buffer_ctx_struct {
/*-
* Buffers are setup like this:
*
* <---------------------- size ----------------------->
* +---------------------------------------------------+
* | consumed | remaining | free space |
* +---------------------------------------------------+
* <-- off --><------- len ------->
*/
/*- BIO *bio; *//*
* this is now in the BIO struct
*/
int ibuf_size; /* how big is the input buffer */
int obuf_size; /* how big is the output buffer */
char *ibuf; /* the char array */
int ibuf_len; /* how many bytes are in it */
int ibuf_off; /* write/read offset */
char *obuf; /* the char array */
int obuf_len; /* how many bytes are in it */
int obuf_off; /* write/read offset */
} BIO_F_BUFFER_CTX;
/* Prefix and suffix callback in ASN1 BIO */
typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
void *parg);
# ifndef OPENSSL_NO_SCTP
/* SCTP parameter structs */
struct bio_dgram_sctp_sndinfo {
uint16_t snd_sid;
uint16_t snd_flags;
uint32_t snd_ppid;
uint32_t snd_context;
};
struct bio_dgram_sctp_rcvinfo {
uint16_t rcv_sid;
uint16_t rcv_ssn;
uint16_t rcv_flags;
uint32_t rcv_ppid;
uint32_t rcv_tsn;
uint32_t rcv_cumtsn;
uint32_t rcv_context;
};
struct bio_dgram_sctp_prinfo {
uint16_t pr_policy;
uint32_t pr_value;
};
# endif
/* connect BIO stuff */
# define BIO_CONN_S_BEFORE 1
# define BIO_CONN_S_GET_IP 2
# define BIO_CONN_S_GET_PORT 3
# define BIO_CONN_S_CREATE_SOCKET 4
# define BIO_CONN_S_CONNECT 5
# define BIO_CONN_S_OK 6
# define BIO_CONN_S_BLOCKED_CONNECT 7
# define BIO_CONN_S_NBIO 8
/*
* #define BIO_CONN_get_param_hostname BIO_ctrl
*/
# define BIO_C_SET_CONNECT 100
# define BIO_C_DO_STATE_MACHINE 101
# define BIO_C_SET_NBIO 102
# define BIO_C_SET_PROXY_PARAM 103
# define BIO_C_SET_FD 104
# define BIO_C_GET_FD 105
# define BIO_C_SET_FILE_PTR 106
# define BIO_C_GET_FILE_PTR 107
# define BIO_C_SET_FILENAME 108
# define BIO_C_SET_SSL 109
# define BIO_C_GET_SSL 110
# define BIO_C_SET_MD 111
# define BIO_C_GET_MD 112
# define BIO_C_GET_CIPHER_STATUS 113
# define BIO_C_SET_BUF_MEM 114
# define BIO_C_GET_BUF_MEM_PTR 115
# define BIO_C_GET_BUFF_NUM_LINES 116
# define BIO_C_SET_BUFF_SIZE 117
# define BIO_C_SET_ACCEPT 118
# define BIO_C_SSL_MODE 119
# define BIO_C_GET_MD_CTX 120
# define BIO_C_GET_PROXY_PARAM 121
# define BIO_C_SET_BUFF_READ_DATA 122/* data to read first */
# define BIO_C_GET_CONNECT 123
# define BIO_C_GET_ACCEPT 124
# define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
# define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
# define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
# define BIO_C_FILE_SEEK 128
# define BIO_C_GET_CIPHER_CTX 129
# define BIO_C_SET_BUF_MEM_EOF_RETURN 130/* return end of input
* value */
# define BIO_C_SET_BIND_MODE 131
# define BIO_C_GET_BIND_MODE 132
# define BIO_C_FILE_TELL 133
# define BIO_C_GET_SOCKS 134
# define BIO_C_SET_SOCKS 135
# define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */
# define BIO_C_GET_WRITE_BUF_SIZE 137
# define BIO_C_MAKE_BIO_PAIR 138
# define BIO_C_DESTROY_BIO_PAIR 139
# define BIO_C_GET_WRITE_GUARANTEE 140
# define BIO_C_GET_READ_REQUEST 141
# define BIO_C_SHUTDOWN_WR 142
# define BIO_C_NREAD0 143
# define BIO_C_NREAD 144
# define BIO_C_NWRITE0 145
# define BIO_C_NWRITE 146
# define BIO_C_RESET_READ_REQUEST 147
# define BIO_C_SET_MD_CTX 148
# define BIO_C_SET_PREFIX 149
# define BIO_C_GET_PREFIX 150
# define BIO_C_SET_SUFFIX 151
# define BIO_C_GET_SUFFIX 152
# define BIO_C_SET_EX_ARG 153
# define BIO_C_GET_EX_ARG 154
# define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg)
# define BIO_get_app_data(s) BIO_get_ex_data(s,0)
/* BIO_s_connect() and BIO_s_socks4a_connect() */
# define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name)
# define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port)
# define BIO_set_conn_ip(b,ip) BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip)
# define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)
# define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
# define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
# define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
# define BIO_get_conn_int_port(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL)
# define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
/* BIO_s_accept() */
# define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name)
# define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0)
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
# define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?(void *)"a":NULL)
# define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio)
# define BIO_BIND_NORMAL 0
# define BIO_BIND_REUSEADDR_IF_UNUSED 1
# define BIO_BIND_REUSEADDR 2
# define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL)
# define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL)
/* BIO_s_accept() and BIO_s_connect() */
# define BIO_do_connect(b) BIO_do_handshake(b)
# define BIO_do_accept(b) BIO_do_handshake(b)
# define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)
/* BIO_s_proxy_client() */
# define BIO_set_url(b,url) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,0,(char *)(url))
# define BIO_set_proxies(b,p) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,1,(char *)(p))
/* BIO_set_nbio(b,n) */
# define BIO_set_filter_bio(b,s) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,2,(char *)(s))
/* BIO *BIO_get_filter_bio(BIO *bio); */
# define BIO_set_proxy_cb(b,cb) BIO_callback_ctrl(b,BIO_C_SET_PROXY_PARAM,3,(void *(*cb)()))
# define BIO_set_proxy_header(b,sk) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,4,(char *)sk)
# define BIO_set_no_connect_return(b,bool) BIO_int_ctrl(b,BIO_C_SET_PROXY_PARAM,5,bool)
# define BIO_get_proxy_header(b,skp) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,0,(char *)skp)
# define BIO_get_proxies(b,pxy_p) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,1,(char *)(pxy_p))
# define BIO_get_url(b,url) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,2,(char *)(url))
# define BIO_get_no_connect_return(b) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,5,NULL)
/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
# define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
# define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)
/* BIO_s_file() */
# define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp)
# define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)fpp)
/* BIO_s_fd() and BIO_s_file() */
# define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL)
# define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL)
/*
* name is cast to lose const, but might be better to route through a
* function so we can do it safely
*/
# ifdef CONST_STRICT
/*
* If you are wondering why this isn't defined, its because CONST_STRICT is
* purely a compile-time kludge to allow const to be checked.
*/
int BIO_read_filename(BIO *b, const char *name);
# else
# define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
BIO_CLOSE|BIO_FP_READ,(char *)name)
# endif
# define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
BIO_CLOSE|BIO_FP_WRITE,name)
# define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
BIO_CLOSE|BIO_FP_APPEND,name)
# define BIO_rw_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name)
/*
* WARNING WARNING, this ups the reference count on the read bio of the SSL
* structure. This is because the ssl read BIO is now pointed to by the
* next_bio field in the bio. So when you free the BIO, make sure you are
* doing a BIO_free_all() to catch the underlying BIO.
*/
# define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl)
# define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp)
# define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)
# define BIO_set_ssl_renegotiate_bytes(b,num) \
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL)
# define BIO_get_num_renegotiates(b) \
BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL)
# define BIO_set_ssl_renegotiate_timeout(b,seconds) \
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL)
/* defined in evp.h */
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
# define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
# define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)bm)
# define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp)
# define BIO_set_mem_eof_return(b,v) \
BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL)
/* For the BIO_f_buffer() type */
# define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL)
# define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL)
# define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0)
# define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1)
# define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf)
/* Don't use the next one unless you know what you are doing :-) */
# define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret))
# define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
# define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL)
# define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL)
# define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL)
# define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
# define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL)
/* ...pending macros have inappropriate return type */
size_t BIO_ctrl_pending(BIO *b);
size_t BIO_ctrl_wpending(BIO *b);
# define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
# define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \
cbp)
# define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)
/* For the BIO_f_buffer() type */
# define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
/* For BIO_s_bio() */
# define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL)
# define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
# define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
# define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
# define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
/* macros with inappropriate type -- but ...pending macros use int too: */
# define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
# define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
size_t BIO_ctrl_get_write_guarantee(BIO *b);
size_t BIO_ctrl_get_read_request(BIO *b);
int BIO_ctrl_reset_read_request(BIO *b);
/* ctrl macros for dgram */
# define BIO_ctrl_dgram_connect(b,peer) \
(int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)peer)
# define BIO_ctrl_set_connected(b, state, peer) \
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, state, (char *)peer)
# define BIO_dgram_recv_timedout(b) \
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
# define BIO_dgram_send_timedout(b) \
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
# define BIO_dgram_get_peer(b,peer) \
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)
# define BIO_dgram_set_peer(b,peer) \
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer)
# define BIO_dgram_get_mtu_overhead(b) \
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
/* These two aren't currently implemented */
/* int BIO_get_ex_num(BIO *bio); */
/* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
int BIO_set_ex_data(BIO *bio, int idx, void *data);
void *BIO_get_ex_data(BIO *bio, int idx);
int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
unsigned long BIO_number_read(BIO *bio);
unsigned long BIO_number_written(BIO *bio);
/* For BIO_f_asn1() */
int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
asn1_ps_func *prefix_free);
int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
asn1_ps_func **pprefix_free);
int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
asn1_ps_func *suffix_free);
int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
asn1_ps_func **psuffix_free);
# ifndef OPENSSL_NO_FP_API
BIO_METHOD *BIO_s_file(void);
BIO *BIO_new_file(const char *filename, const char *mode);
BIO *BIO_new_fp(FILE *stream, int close_flag);
# define BIO_s_file_internal BIO_s_file
# endif
BIO *BIO_new(BIO_METHOD *type);
int BIO_set(BIO *a, BIO_METHOD *type);
int BIO_free(BIO *a);
void BIO_vfree(BIO *a);
int BIO_read(BIO *b, void *data, int len);
int BIO_gets(BIO *bp, char *buf, int size);
int BIO_write(BIO *b, const void *data, int len);
int BIO_puts(BIO *bp, const char *buf);
int BIO_indent(BIO *b, int indent, int max);
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
long BIO_callback_ctrl(BIO *b, int cmd,
void (*fp) (struct bio_st *, int, const char *, int,
long, long));
char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
BIO *BIO_push(BIO *b, BIO *append);
BIO *BIO_pop(BIO *b);
void BIO_free_all(BIO *a);
BIO *BIO_find_type(BIO *b, int bio_type);
BIO *BIO_next(BIO *b);
BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
int BIO_get_retry_reason(BIO *bio);
BIO *BIO_dup_chain(BIO *in);
int BIO_nread0(BIO *bio, char **buf);
int BIO_nread(BIO *bio, char **buf, int num);
int BIO_nwrite0(BIO *bio, char **buf);
int BIO_nwrite(BIO *bio, char **buf, int num);
long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
long argl, long ret);
BIO_METHOD *BIO_s_mem(void);
BIO *BIO_new_mem_buf(const void *buf, int len);
BIO_METHOD *BIO_s_socket(void);
BIO_METHOD *BIO_s_connect(void);
BIO_METHOD *BIO_s_accept(void);
BIO_METHOD *BIO_s_fd(void);
# ifndef OPENSSL_SYS_OS2
BIO_METHOD *BIO_s_log(void);
# endif
BIO_METHOD *BIO_s_bio(void);
BIO_METHOD *BIO_s_null(void);
BIO_METHOD *BIO_f_null(void);
BIO_METHOD *BIO_f_buffer(void);
# ifdef OPENSSL_SYS_VMS
BIO_METHOD *BIO_f_linebuffer(void);
# endif
BIO_METHOD *BIO_f_nbio_test(void);
# ifndef OPENSSL_NO_DGRAM
BIO_METHOD *BIO_s_datagram(void);
# ifndef OPENSSL_NO_SCTP
BIO_METHOD *BIO_s_datagram_sctp(void);
# endif
# endif
/* BIO_METHOD *BIO_f_ber(void); */
int BIO_sock_should_retry(int i);
int BIO_sock_non_fatal_error(int error);
int BIO_dgram_non_fatal_error(int error);
int BIO_fd_should_retry(int i);
int BIO_fd_non_fatal_error(int error);
int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
void *u, const char *s, int len);
int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
void *u, const char *s, int len, int indent);
int BIO_dump(BIO *b, const char *bytes, int len);
int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
# ifndef OPENSSL_NO_FP_API
int BIO_dump_fp(FILE *fp, const char *s, int len);
int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
# endif
int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
int datalen);
struct hostent *BIO_gethostbyname(const char *name);
/*-
* We might want a thread-safe interface too:
* struct hostent *BIO_gethostbyname_r(const char *name,
* struct hostent *result, void *buffer, size_t buflen);
* or something similar (caller allocates a struct hostent,
* pointed to by "result", and additional buffer space for the various
* substructures; if the buffer does not suffice, NULL is returned
* and an appropriate error code is set).
*/
int BIO_sock_error(int sock);
int BIO_socket_ioctl(int fd, long type, void *arg);
int BIO_socket_nbio(int fd, int mode);
int BIO_get_port(const char *str, unsigned short *port_ptr);
int BIO_get_host_ip(const char *str, unsigned char *ip);
int BIO_get_accept_socket(char *host_port, int mode);
int BIO_accept(int sock, char **ip_port);
int BIO_sock_init(void);
void BIO_sock_cleanup(void);
int BIO_set_tcp_ndelay(int sock, int turn_on);
BIO *BIO_new_socket(int sock, int close_flag);
BIO *BIO_new_dgram(int fd, int close_flag);
# ifndef OPENSSL_NO_SCTP
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
int BIO_dgram_is_sctp(BIO *bio);
int BIO_dgram_sctp_notification_cb(BIO *b,
void (*handle_notifications) (BIO *bio,
void
*context,
void *buf),
void *context);
int BIO_dgram_sctp_wait_for_dry(BIO *b);
int BIO_dgram_sctp_msg_waiting(BIO *b);
# endif
BIO *BIO_new_fd(int fd, int close_flag);
BIO *BIO_new_connect(const char *host_port);
BIO *BIO_new_accept(const char *host_port);
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
BIO **bio2, size_t writebuf2);
/*
* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
* Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
* value.
*/
void BIO_copy_next_retry(BIO *b);
/*
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
*/
# ifdef __GNUC__
# define __bio_h__attr__ __attribute__
# else
# define __bio_h__attr__(x)
# endif
int BIO_printf(BIO *bio, const char *format, ...)
__bio_h__attr__((__format__(__printf__, 2, 3)));
int BIO_vprintf(BIO *bio, const char *format, va_list args)
__bio_h__attr__((__format__(__printf__, 2, 0)));
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
__bio_h__attr__((__format__(__printf__, 3, 4)));
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
__bio_h__attr__((__format__(__printf__, 3, 0)));
# undef __bio_h__attr__
/* 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_BIO_strings(void);
/* Error codes for the BIO functions. */
/* Function codes. */
# define BIO_F_ACPT_STATE 100
# define BIO_F_BIO_ACCEPT 101
# define BIO_F_BIO_BER_GET_HEADER 102
# define BIO_F_BIO_CALLBACK_CTRL 131
# define BIO_F_BIO_CTRL 103
# define BIO_F_BIO_GETHOSTBYNAME 120
# define BIO_F_BIO_GETS 104
# define BIO_F_BIO_GET_ACCEPT_SOCKET 105
# define BIO_F_BIO_GET_HOST_IP 106
# define BIO_F_BIO_GET_PORT 107
# define BIO_F_BIO_MAKE_PAIR 121
# define BIO_F_BIO_NEW 108
# define BIO_F_BIO_NEW_FILE 109
# define BIO_F_BIO_NEW_MEM_BUF 126
# define BIO_F_BIO_NREAD 123
# define BIO_F_BIO_NREAD0 124
# define BIO_F_BIO_NWRITE 125
# define BIO_F_BIO_NWRITE0 122
# define BIO_F_BIO_PUTS 110
# define BIO_F_BIO_READ 111
# define BIO_F_BIO_SOCK_INIT 112
# define BIO_F_BIO_WRITE 113
# define BIO_F_BUFFER_CTRL 114
# define BIO_F_CONN_CTRL 127
# define BIO_F_CONN_STATE 115
# define BIO_F_DGRAM_SCTP_READ 132
# define BIO_F_DGRAM_SCTP_WRITE 133
# define BIO_F_FILE_CTRL 116
# define BIO_F_FILE_READ 130
# define BIO_F_LINEBUFFER_CTRL 129
# define BIO_F_MEM_READ 128
# define BIO_F_MEM_WRITE 117
# define BIO_F_SSL_NEW 118
# define BIO_F_WSASTARTUP 119
/* Reason codes. */
# define BIO_R_ACCEPT_ERROR 100
# define BIO_R_BAD_FOPEN_MODE 101
# define BIO_R_BAD_HOSTNAME_LOOKUP 102
# define BIO_R_BROKEN_PIPE 124
# define BIO_R_CONNECT_ERROR 103
# define BIO_R_EOF_ON_MEMORY_BIO 127
# define BIO_R_ERROR_SETTING_NBIO 104
# define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET 105
# define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET 106
# define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107
# define BIO_R_INVALID_ARGUMENT 125
# define BIO_R_INVALID_IP_ADDRESS 108
# define BIO_R_IN_USE 123
# define BIO_R_KEEPALIVE 109
# define BIO_R_NBIO_CONNECT_ERROR 110
# define BIO_R_NO_ACCEPT_PORT_SPECIFIED 111
# define BIO_R_NO_HOSTNAME_SPECIFIED 112
# define BIO_R_NO_PORT_DEFINED 113
# define BIO_R_NO_PORT_SPECIFIED 114
# define BIO_R_NO_SUCH_FILE 128
# define BIO_R_NULL_PARAMETER 115
# define BIO_R_TAG_MISMATCH 116
# define BIO_R_UNABLE_TO_BIND_SOCKET 117
# define BIO_R_UNABLE_TO_CREATE_SOCKET 118
# define BIO_R_UNABLE_TO_LISTEN_SOCKET 119
# define BIO_R_UNINITIALIZED 120
# define BIO_R_UNSUPPORTED_METHOD 121
# define BIO_R_WRITE_TO_READ_ONLY_BIO 126
# define BIO_R_WSASTARTUP 122
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,130 @@
/* crypto/bf/blowfish.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.]
*/
#ifndef HEADER_BLOWFISH_H
# define HEADER_BLOWFISH_H
# include <openssl/e_os2.h>
#ifdef __cplusplus
extern "C" {
#endif
# ifdef OPENSSL_NO_BF
# error BF is disabled.
# endif
# define BF_ENCRYPT 1
# define BF_DECRYPT 0
/*-
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* ! BF_LONG has to be at least 32 bits wide. If it's wider, then !
* ! BF_LONG_LOG2 has to be defined along. !
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
# if defined(__LP32__)
# define BF_LONG unsigned long
# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
# define BF_LONG unsigned long
# define BF_LONG_LOG2 3
/*
* _CRAY note. I could declare short, but I have no idea what impact
* does it have on performance on none-T3E machines. I could declare
* int, but at least on C90 sizeof(int) can be chosen at compile time.
* So I've chosen long...
* <appro@fy.chalmers.se>
*/
# else
# define BF_LONG unsigned int
# endif
# define BF_ROUNDS 16
# define BF_BLOCK 8
typedef struct bf_key_st {
BF_LONG P[BF_ROUNDS + 2];
BF_LONG S[4 * 256];
} BF_KEY;
# ifdef OPENSSL_FIPS
void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);
# endif
void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
void BF_encrypt(BF_LONG *data, const BF_KEY *key);
void BF_decrypt(BF_LONG *data, const BF_KEY *key);
void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
const BF_KEY *key, int enc);
void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
const BF_KEY *schedule, unsigned char *ivec, int enc);
void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,
long length, const BF_KEY *schedule,
unsigned char *ivec, int *num, int enc);
void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, const BF_KEY *schedule,
unsigned char *ivec, int *num);
const char *BF_options(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,951 @@
/* 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 <limits.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 > (INT_MAX - BN_BITS2 + 1) ? \
NULL \
: \
(((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*)); \
/* Debug only - safe to ignore error return */ \
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; \
} \
if ((a)->top == 0) \
(a)->neg = 0; \
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_LSHIFT 145
# 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_RSHIFT 146
# 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_BITS_TOO_SMALL 118
# 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_INVALID_SHIFT 119
# 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

View File

@@ -0,0 +1,125 @@
/* crypto/buffer/buffer.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.]
*/
#ifndef HEADER_BUFFER_H
# define HEADER_BUFFER_H
# include <openssl/ossl_typ.h>
#ifdef __cplusplus
extern "C" {
#endif
# include <stddef.h>
# if !defined(NO_SYS_TYPES_H)
# include <sys/types.h>
# endif
/* Already declared in ossl_typ.h */
/* typedef struct buf_mem_st BUF_MEM; */
struct buf_mem_st {
size_t length; /* current number of bytes */
char *data;
size_t max; /* size of buffer */
};
BUF_MEM *BUF_MEM_new(void);
void BUF_MEM_free(BUF_MEM *a);
int BUF_MEM_grow(BUF_MEM *str, size_t len);
int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
size_t BUF_strnlen(const char *str, size_t maxlen);
char *BUF_strdup(const char *str);
/*
* Like strndup, but in addition, explicitly guarantees to never read past the
* first |siz| bytes of |str|.
*/
char *BUF_strndup(const char *str, size_t siz);
void *BUF_memdup(const void *data, size_t siz);
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
/* safe string functions */
size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
size_t BUF_strlcat(char *dst, const char *src, size_t siz);
/* 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_BUF_strings(void);
/* Error codes for the BUF functions. */
/* Function codes. */
# define BUF_F_BUF_MEMDUP 103
# define BUF_F_BUF_MEM_GROW 100
# define BUF_F_BUF_MEM_GROW_CLEAN 105
# define BUF_F_BUF_MEM_NEW 101
# define BUF_F_BUF_STRDUP 102
# define BUF_F_BUF_STRNDUP 104
/* Reason codes. */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,132 @@
/* crypto/camellia/camellia.h */
/* ====================================================================
* Copyright (c) 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.
* ====================================================================
*
*/
#ifndef HEADER_CAMELLIA_H
# define HEADER_CAMELLIA_H
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_CAMELLIA
# error CAMELLIA is disabled.
# endif
# include <stddef.h>
# define CAMELLIA_ENCRYPT 1
# define CAMELLIA_DECRYPT 0
/*
* Because array size can't be a const in C, the following two are macros.
* Both sizes are in bytes.
*/
#ifdef __cplusplus
extern "C" {
#endif
/* This should be a hidden type, but EVP requires that the size be known */
# define CAMELLIA_BLOCK_SIZE 16
# define CAMELLIA_TABLE_BYTE_LEN 272
# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match
* with WORD */
struct camellia_key_st {
union {
double d; /* ensures 64-bit align */
KEY_TABLE_TYPE rd_key;
} u;
int grand_rounds;
};
typedef struct camellia_key_st CAMELLIA_KEY;
# ifdef OPENSSL_FIPS
int private_Camellia_set_key(const unsigned char *userKey, const int bits,
CAMELLIA_KEY *key);
# endif
int Camellia_set_key(const unsigned char *userKey, const int bits,
CAMELLIA_KEY *key);
void Camellia_encrypt(const unsigned char *in, unsigned char *out,
const CAMELLIA_KEY *key);
void Camellia_decrypt(const unsigned char *in, unsigned char *out,
const CAMELLIA_KEY *key);
void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out,
const CAMELLIA_KEY *key, const int enc);
void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const CAMELLIA_KEY *key,
unsigned char *ivec, const int enc);
void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const CAMELLIA_KEY *key,
unsigned char *ivec, int *num, const int enc);
void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const CAMELLIA_KEY *key,
unsigned char *ivec, int *num, const int enc);
void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const CAMELLIA_KEY *key,
unsigned char *ivec, int *num, const int enc);
void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const CAMELLIA_KEY *key,
unsigned char *ivec, int *num);
void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const CAMELLIA_KEY *key,
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
unsigned int *num);
#ifdef __cplusplus
}
#endif
#endif /* !HEADER_Camellia_H */

View File

@@ -0,0 +1,107 @@
/* crypto/cast/cast.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.]
*/
#ifndef HEADER_CAST_H
# define HEADER_CAST_H
#ifdef __cplusplus
extern "C" {
#endif
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_CAST
# error CAST is disabled.
# endif
# define CAST_ENCRYPT 1
# define CAST_DECRYPT 0
# define CAST_LONG unsigned int
# define CAST_BLOCK 8
# define CAST_KEY_LENGTH 16
typedef struct cast_key_st {
CAST_LONG data[32];
int short_key; /* Use reduced rounds for short key */
} CAST_KEY;
# ifdef OPENSSL_FIPS
void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
# endif
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
const CAST_KEY *key, int enc);
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
long length, const CAST_KEY *ks, unsigned char *iv,
int enc);
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
long length, const CAST_KEY *schedule,
unsigned char *ivec, int *num, int enc);
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, const CAST_KEY *schedule,
unsigned char *ivec, int *num);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,82 @@
/* crypto/cmac/cmac.h */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
/* ====================================================================
* Copyright (c) 2010 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.
* ====================================================================
*/
#ifndef HEADER_CMAC_H
# define HEADER_CMAC_H
#ifdef __cplusplus
extern "C" {
#endif
# include <openssl/evp.h>
/* Opaque */
typedef struct CMAC_CTX_st CMAC_CTX;
CMAC_CTX *CMAC_CTX_new(void);
void CMAC_CTX_cleanup(CMAC_CTX *ctx);
void CMAC_CTX_free(CMAC_CTX *ctx);
EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
const EVP_CIPHER *cipher, ENGINE *impl);
int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen);
int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen);
int CMAC_resume(CMAC_CTX *ctx);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,555 @@
/* crypto/cms/cms.h */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
/* ====================================================================
* Copyright (c) 2008 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.
* ====================================================================
*/
#ifndef HEADER_CMS_H
# define HEADER_CMS_H
# include <openssl/x509.h>
# ifdef OPENSSL_NO_CMS
# error CMS is disabled.
# endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
typedef struct CMS_Receipt_st CMS_Receipt;
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
DECLARE_STACK_OF(CMS_SignerInfo)
DECLARE_STACK_OF(GENERAL_NAMES)
DECLARE_STACK_OF(CMS_RecipientEncryptedKey)
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
# define CMS_SIGNERINFO_ISSUER_SERIAL 0
# define CMS_SIGNERINFO_KEYIDENTIFIER 1
# define CMS_RECIPINFO_NONE -1
# define CMS_RECIPINFO_TRANS 0
# define CMS_RECIPINFO_AGREE 1
# define CMS_RECIPINFO_KEK 2
# define CMS_RECIPINFO_PASS 3
# define CMS_RECIPINFO_OTHER 4
/* S/MIME related flags */
# define CMS_TEXT 0x1
# define CMS_NOCERTS 0x2
# define CMS_NO_CONTENT_VERIFY 0x4
# define CMS_NO_ATTR_VERIFY 0x8
# define CMS_NOSIGS \
(CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
# define CMS_NOINTERN 0x10
# define CMS_NO_SIGNER_CERT_VERIFY 0x20
# define CMS_NOVERIFY 0x20
# define CMS_DETACHED 0x40
# define CMS_BINARY 0x80
# define CMS_NOATTR 0x100
# define CMS_NOSMIMECAP 0x200
# define CMS_NOOLDMIMETYPE 0x400
# define CMS_CRLFEOL 0x800
# define CMS_STREAM 0x1000
# define CMS_NOCRL 0x2000
# define CMS_PARTIAL 0x4000
# define CMS_REUSE_DIGEST 0x8000
# define CMS_USE_KEYID 0x10000
# define CMS_DEBUG_DECRYPT 0x20000
# define CMS_KEY_PARAM 0x40000
const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms);
BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
int CMS_is_detached(CMS_ContentInfo *cms);
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
# ifdef HEADER_PEM_H
DECLARE_PEM_rw_const(CMS, CMS_ContentInfo)
# endif
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
int flags);
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
unsigned int flags);
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
STACK_OF(X509) *certs, BIO *data,
unsigned int flags);
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
X509 *signcert, EVP_PKEY *pkey,
STACK_OF(X509) *certs, unsigned int flags);
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
unsigned int flags);
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
unsigned int flags);
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
const unsigned char *key, size_t keylen,
BIO *dcont, BIO *out, unsigned int flags);
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
const unsigned char *key,
size_t keylen, unsigned int flags);
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
const unsigned char *key, size_t keylen);
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
STACK_OF(X509) *certs,
X509_STORE *store, unsigned int flags);
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
const EVP_CIPHER *cipher, unsigned int flags);
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
BIO *dcont, BIO *out, unsigned int flags);
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
unsigned char *key, size_t keylen,
unsigned char *id, size_t idlen);
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
unsigned char *pass, ossl_ssize_t passlen);
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
X509 *recip, unsigned int flags);
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
EVP_PKEY **pk, X509 **recip,
X509_ALGOR **palg);
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
ASN1_OCTET_STRING **keyid,
X509_NAME **issuer,
ASN1_INTEGER **sno);
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
unsigned char *key, size_t keylen,
unsigned char *id, size_t idlen,
ASN1_GENERALIZEDTIME *date,
ASN1_OBJECT *otherTypeId,
ASN1_TYPE *otherType);
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
X509_ALGOR **palg,
ASN1_OCTET_STRING **pid,
ASN1_GENERALIZEDTIME **pdate,
ASN1_OBJECT **potherid,
ASN1_TYPE **pothertype);
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
unsigned char *key, size_t keylen);
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
const unsigned char *id, size_t idlen);
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
unsigned char *pass,
ossl_ssize_t passlen);
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
int iter, int wrap_nid,
int pbe_nid,
unsigned char *pass,
ossl_ssize_t passlen,
const EVP_CIPHER *kekciph);
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
unsigned int flags);
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
int CMS_SignedData_init(CMS_ContentInfo *cms);
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
unsigned int flags);
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
ASN1_OCTET_STRING **keyid,
X509_NAME **issuer, ASN1_INTEGER **sno);
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
unsigned int flags);
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
X509 **signer, X509_ALGOR **pdig,
X509_ALGOR **psig);
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
int algnid, int keysize);
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
int lastpos);
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,
int lastpos);
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
const ASN1_OBJECT *obj, int type,
const void *bytes, int len);
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
int nid, int type,
const void *bytes, int len);
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
const char *attrname, int type,
const void *bytes, int len);
void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
int lastpos, int type);
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
int lastpos);
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,
int lastpos);
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
const ASN1_OBJECT *obj, int type,
const void *bytes, int len);
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
int nid, int type,
const void *bytes, int len);
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
const char *attrname, int type,
const void *bytes, int len);
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
int lastpos, int type);
# ifdef HEADER_X509V3_H
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
int allorfirst,
STACK_OF(GENERAL_NAMES)
*receiptList, STACK_OF(GENERAL_NAMES)
*receiptsTo);
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
ASN1_STRING **pcid,
int *pallorfirst,
STACK_OF(GENERAL_NAMES) **plist,
STACK_OF(GENERAL_NAMES) **prto);
# endif
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
X509_ALGOR **palg,
ASN1_OCTET_STRING **pukm);
STACK_OF(CMS_RecipientEncryptedKey)
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
X509_ALGOR **pubalg,
ASN1_BIT_STRING **pubkey,
ASN1_OCTET_STRING **keyid,
X509_NAME **issuer,
ASN1_INTEGER **sno);
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
ASN1_OCTET_STRING **keyid,
ASN1_GENERALIZEDTIME **tm,
CMS_OtherKeyAttribute **other,
X509_NAME **issuer, ASN1_INTEGER **sno);
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
X509 *cert);
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
CMS_RecipientInfo *ri,
CMS_RecipientEncryptedKey *rek);
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
ASN1_OCTET_STRING *ukm, int keylen);
/* 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_CMS_strings(void);
/* Error codes for the CMS functions. */
/* Function codes. */
# define CMS_F_CHECK_CONTENT 99
# define CMS_F_CMS_ADD0_CERT 164
# define CMS_F_CMS_ADD0_RECIPIENT_KEY 100
# define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 165
# define CMS_F_CMS_ADD1_RECEIPTREQUEST 158
# define CMS_F_CMS_ADD1_RECIPIENT_CERT 101
# define CMS_F_CMS_ADD1_SIGNER 102
# define CMS_F_CMS_ADD1_SIGNINGTIME 103
# define CMS_F_CMS_COMPRESS 104
# define CMS_F_CMS_COMPRESSEDDATA_CREATE 105
# define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 106
# define CMS_F_CMS_COPY_CONTENT 107
# define CMS_F_CMS_COPY_MESSAGEDIGEST 108
# define CMS_F_CMS_DATA 109
# define CMS_F_CMS_DATAFINAL 110
# define CMS_F_CMS_DATAINIT 111
# define CMS_F_CMS_DECRYPT 112
# define CMS_F_CMS_DECRYPT_SET1_KEY 113
# define CMS_F_CMS_DECRYPT_SET1_PASSWORD 166
# define CMS_F_CMS_DECRYPT_SET1_PKEY 114
# define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 115
# define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 116
# define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 117
# define CMS_F_CMS_DIGEST_VERIFY 118
# define CMS_F_CMS_ENCODE_RECEIPT 161
# define CMS_F_CMS_ENCRYPT 119
# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120
# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121
# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122
# define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 123
# define CMS_F_CMS_ENVELOPEDDATA_CREATE 124
# define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 125
# define CMS_F_CMS_ENVELOPED_DATA_INIT 126
# define CMS_F_CMS_ENV_ASN1_CTRL 171
# define CMS_F_CMS_FINAL 127
# define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 128
# define CMS_F_CMS_GET0_CONTENT 129
# define CMS_F_CMS_GET0_ECONTENT_TYPE 130
# define CMS_F_CMS_GET0_ENVELOPED 131
# define CMS_F_CMS_GET0_REVOCATION_CHOICES 132
# define CMS_F_CMS_GET0_SIGNED 133
# define CMS_F_CMS_MSGSIGDIGEST_ADD1 162
# define CMS_F_CMS_RECEIPTREQUEST_CREATE0 159
# define CMS_F_CMS_RECEIPT_VERIFY 160
# define CMS_F_CMS_RECIPIENTINFO_DECRYPT 134
# define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 169
# define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 178
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 175
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 173
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 172
# define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 174
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 135
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 136
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 137
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 138
# define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 139
# define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 140
# define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 141
# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 142
# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 143
# define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 167
# define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 144
# define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 168
# define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 145
# define CMS_F_CMS_SD_ASN1_CTRL 170
# define CMS_F_CMS_SET1_IAS 176
# define CMS_F_CMS_SET1_KEYID 177
# define CMS_F_CMS_SET1_SIGNERIDENTIFIER 146
# define CMS_F_CMS_SET_DETACHED 147
# define CMS_F_CMS_SIGN 148
# define CMS_F_CMS_SIGNED_DATA_INIT 149
# define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150
# define CMS_F_CMS_SIGNERINFO_SIGN 151
# define CMS_F_CMS_SIGNERINFO_VERIFY 152
# define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153
# define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154
# define CMS_F_CMS_SIGN_RECEIPT 163
# define CMS_F_CMS_STREAM 155
# define CMS_F_CMS_UNCOMPRESS 156
# define CMS_F_CMS_VERIFY 157
/* Reason codes. */
# define CMS_R_ADD_SIGNER_ERROR 99
# define CMS_R_CERTIFICATE_ALREADY_PRESENT 175
# define CMS_R_CERTIFICATE_HAS_NO_KEYID 160
# define CMS_R_CERTIFICATE_VERIFY_ERROR 100
# define CMS_R_CIPHER_INITIALISATION_ERROR 101
# define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102
# define CMS_R_CMS_DATAFINAL_ERROR 103
# define CMS_R_CMS_LIB 104
# define CMS_R_CONTENTIDENTIFIER_MISMATCH 170
# define CMS_R_CONTENT_NOT_FOUND 105
# define CMS_R_CONTENT_TYPE_MISMATCH 171
# define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106
# define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107
# define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108
# define CMS_R_CONTENT_VERIFY_ERROR 109
# define CMS_R_CTRL_ERROR 110
# define CMS_R_CTRL_FAILURE 111
# define CMS_R_DECRYPT_ERROR 112
# define CMS_R_DIGEST_ERROR 161
# define CMS_R_ERROR_GETTING_PUBLIC_KEY 113
# define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114
# define CMS_R_ERROR_SETTING_KEY 115
# define CMS_R_ERROR_SETTING_RECIPIENTINFO 116
# define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117
# define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176
# define CMS_R_INVALID_KEY_LENGTH 118
# define CMS_R_MD_BIO_INIT_ERROR 119
# define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120
# define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121
# define CMS_R_MSGSIGDIGEST_ERROR 172
# define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162
# define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163
# define CMS_R_NEED_ONE_SIGNER 164
# define CMS_R_NOT_A_SIGNED_RECEIPT 165
# define CMS_R_NOT_ENCRYPTED_DATA 122
# define CMS_R_NOT_KEK 123
# define CMS_R_NOT_KEY_AGREEMENT 181
# define CMS_R_NOT_KEY_TRANSPORT 124
# define CMS_R_NOT_PWRI 177
# define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125
# define CMS_R_NO_CIPHER 126
# define CMS_R_NO_CONTENT 127
# define CMS_R_NO_CONTENT_TYPE 173
# define CMS_R_NO_DEFAULT_DIGEST 128
# define CMS_R_NO_DIGEST_SET 129
# define CMS_R_NO_KEY 130
# define CMS_R_NO_KEY_OR_CERT 174
# define CMS_R_NO_MATCHING_DIGEST 131
# define CMS_R_NO_MATCHING_RECIPIENT 132
# define CMS_R_NO_MATCHING_SIGNATURE 166
# define CMS_R_NO_MSGSIGDIGEST 167
# define CMS_R_NO_PASSWORD 178
# define CMS_R_NO_PRIVATE_KEY 133
# define CMS_R_NO_PUBLIC_KEY 134
# define CMS_R_NO_RECEIPT_REQUEST 168
# define CMS_R_NO_SIGNERS 135
# define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136
# define CMS_R_RECEIPT_DECODE_ERROR 169
# define CMS_R_RECIPIENT_ERROR 137
# define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138
# define CMS_R_SIGNFINAL_ERROR 139
# define CMS_R_SMIME_TEXT_ERROR 140
# define CMS_R_STORE_INIT_ERROR 141
# define CMS_R_TYPE_NOT_COMPRESSED_DATA 142
# define CMS_R_TYPE_NOT_DATA 143
# define CMS_R_TYPE_NOT_DIGESTED_DATA 144
# define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145
# define CMS_R_TYPE_NOT_ENVELOPED_DATA 146
# define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147
# define CMS_R_UNKNOWN_CIPHER 148
# define CMS_R_UNKNOWN_DIGEST_ALGORIHM 149
# define CMS_R_UNKNOWN_ID 150
# define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151
# define CMS_R_UNSUPPORTED_CONTENT_TYPE 152
# define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153
# define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179
# define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154
# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE 155
# define CMS_R_UNSUPPORTED_TYPE 156
# define CMS_R_UNWRAP_ERROR 157
# define CMS_R_UNWRAP_FAILURE 180
# define CMS_R_VERIFICATION_FAILURE 158
# define CMS_R_WRAP_ERROR 159
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,83 @@
#ifndef HEADER_COMP_H
# define HEADER_COMP_H
# include <openssl/crypto.h>
# ifdef OPENSSL_NO_COMP
# error COMP is disabled.
# endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct comp_ctx_st COMP_CTX;
struct comp_method_st {
int type; /* NID for compression library */
const char *name; /* A text string to identify the library */
int (*init) (COMP_CTX *ctx);
void (*finish) (COMP_CTX *ctx);
int (*compress) (COMP_CTX *ctx,
unsigned char *out, unsigned int olen,
unsigned char *in, unsigned int ilen);
int (*expand) (COMP_CTX *ctx,
unsigned char *out, unsigned int olen,
unsigned char *in, unsigned int ilen);
/*
* The following two do NOTHING, but are kept for backward compatibility
*/
long (*ctrl) (void);
long (*callback_ctrl) (void);
};
struct comp_ctx_st {
COMP_METHOD *meth;
unsigned long compress_in;
unsigned long compress_out;
unsigned long expand_in;
unsigned long expand_out;
CRYPTO_EX_DATA ex_data;
};
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
void COMP_CTX_free(COMP_CTX *ctx);
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
unsigned char *in, int ilen);
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
unsigned char *in, int ilen);
COMP_METHOD *COMP_rle(void);
COMP_METHOD *COMP_zlib(void);
void COMP_zlib_cleanup(void);
# ifdef HEADER_BIO_H
# ifdef ZLIB
BIO_METHOD *BIO_f_zlib(void);
# endif
# endif
/* 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_COMP_strings(void);
/* Error codes for the COMP functions. */
/* Function codes. */
# define COMP_F_BIO_ZLIB_FLUSH 99
# define COMP_F_BIO_ZLIB_NEW 100
# define COMP_F_BIO_ZLIB_READ 101
# define COMP_F_BIO_ZLIB_WRITE 102
/* Reason codes. */
# define COMP_R_ZLIB_DEFLATE_ERROR 99
# define COMP_R_ZLIB_INFLATE_ERROR 100
# define COMP_R_ZLIB_NOT_SUPPORTED 101
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,268 @@
/* crypto/conf/conf.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.]
*/
#ifndef HEADER_CONF_H
# define HEADER_CONF_H
# include <openssl/bio.h>
# include <openssl/lhash.h>
# include <openssl/stack.h>
# include <openssl/safestack.h>
# include <openssl/e_os2.h>
# include <openssl/ossl_typ.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
char *section;
char *name;
char *value;
} CONF_VALUE;
DECLARE_STACK_OF(CONF_VALUE)
DECLARE_LHASH_OF(CONF_VALUE);
struct conf_st;
struct conf_method_st;
typedef struct conf_method_st CONF_METHOD;
struct conf_method_st {
const char *name;
CONF *(*create) (CONF_METHOD *meth);
int (*init) (CONF *conf);
int (*destroy) (CONF *conf);
int (*destroy_data) (CONF *conf);
int (*load_bio) (CONF *conf, BIO *bp, long *eline);
int (*dump) (const CONF *conf, BIO *bp);
int (*is_number) (const CONF *conf, char c);
int (*to_int) (const CONF *conf, char c);
int (*load) (CONF *conf, const char *name, long *eline);
};
/* Module definitions */
typedef struct conf_imodule_st CONF_IMODULE;
typedef struct conf_module_st CONF_MODULE;
DECLARE_STACK_OF(CONF_MODULE)
DECLARE_STACK_OF(CONF_IMODULE)
/* DSO module function typedefs */
typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
typedef void conf_finish_func (CONF_IMODULE *md);
# define CONF_MFLAGS_IGNORE_ERRORS 0x1
# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
# define CONF_MFLAGS_SILENT 0x4
# define CONF_MFLAGS_NO_DSO 0x8
# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
# define CONF_MFLAGS_DEFAULT_SECTION 0x20
int CONF_set_default_method(CONF_METHOD *meth);
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
long *eline);
# ifndef OPENSSL_NO_FP_API
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
long *eline);
# endif
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
long *eline);
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
const char *section);
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
const char *name);
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
const char *name);
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
void OPENSSL_config(const char *config_name);
void OPENSSL_no_config(void);
/*
* New conf code. The semantics are different from the functions above. If
* that wasn't the case, the above functions would have been replaced
*/
struct conf_st {
CONF_METHOD *meth;
void *meth_data;
LHASH_OF(CONF_VALUE) *data;
};
CONF *NCONF_new(CONF_METHOD *meth);
CONF_METHOD *NCONF_default(void);
CONF_METHOD *NCONF_WIN32(void);
# if 0 /* Just to give you an idea of what I have in
* mind */
CONF_METHOD *NCONF_XML(void);
# endif
void NCONF_free(CONF *conf);
void NCONF_free_data(CONF *conf);
int NCONF_load(CONF *conf, const char *file, long *eline);
# ifndef OPENSSL_NO_FP_API
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
# endif
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
const char *section);
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
long *result);
int NCONF_dump_fp(const CONF *conf, FILE *out);
int NCONF_dump_bio(const CONF *conf, BIO *out);
# if 0 /* The following function has no error
* checking, and should therefore be avoided */
long NCONF_get_number(CONF *conf, char *group, char *name);
# else
# define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
# endif
/* Module functions */
int CONF_modules_load(const CONF *cnf, const char *appname,
unsigned long flags);
int CONF_modules_load_file(const char *filename, const char *appname,
unsigned long flags);
void CONF_modules_unload(int all);
void CONF_modules_finish(void);
void CONF_modules_free(void);
int CONF_module_add(const char *name, conf_init_func *ifunc,
conf_finish_func *ffunc);
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
void *CONF_module_get_usr_data(CONF_MODULE *pmod);
void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
char *CONF_get1_default_config_file(void);
int CONF_parse_list(const char *list, int sep, int nospc,
int (*list_cb) (const char *elem, int len, void *usr),
void *arg);
void OPENSSL_load_builtin_modules(void);
/* 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_CONF_strings(void);
/* Error codes for the CONF functions. */
/* Function codes. */
# define CONF_F_CONF_DUMP_FP 104
# define CONF_F_CONF_LOAD 100
# define CONF_F_CONF_LOAD_BIO 102
# define CONF_F_CONF_LOAD_FP 103
# define CONF_F_CONF_MODULES_LOAD 116
# define CONF_F_CONF_PARSE_LIST 119
# define CONF_F_DEF_LOAD 120
# define CONF_F_DEF_LOAD_BIO 121
# define CONF_F_MODULE_INIT 115
# define CONF_F_MODULE_LOAD_DSO 117
# define CONF_F_MODULE_RUN 118
# define CONF_F_NCONF_DUMP_BIO 105
# define CONF_F_NCONF_DUMP_FP 106
# define CONF_F_NCONF_GET_NUMBER 107
# define CONF_F_NCONF_GET_NUMBER_E 112
# define CONF_F_NCONF_GET_SECTION 108
# define CONF_F_NCONF_GET_STRING 109
# define CONF_F_NCONF_LOAD 113
# define CONF_F_NCONF_LOAD_BIO 110
# define CONF_F_NCONF_LOAD_FP 114
# define CONF_F_NCONF_NEW 111
# define CONF_F_STR_COPY 101
/* Reason codes. */
# define CONF_R_ERROR_LOADING_DSO 110
# define CONF_R_LIST_CANNOT_BE_NULL 115
# define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100
# define CONF_R_MISSING_EQUAL_SIGN 101
# define CONF_R_MISSING_FINISH_FUNCTION 111
# define CONF_R_MISSING_INIT_FUNCTION 112
# define CONF_R_MODULE_INITIALIZATION_ERROR 109
# define CONF_R_NO_CLOSE_BRACE 102
# define CONF_R_NO_CONF 105
# define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
# define CONF_R_NO_SECTION 107
# define CONF_R_NO_SUCH_FILE 114
# define CONF_R_NO_VALUE 108
# define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
# define CONF_R_UNKNOWN_MODULE_NAME 113
# define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116
# define CONF_R_VARIABLE_HAS_NO_VALUE 104
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,89 @@
/* conf_api.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.]
*/
#ifndef HEADER_CONF_API_H
# define HEADER_CONF_API_H
# include <openssl/lhash.h>
# include <openssl/conf.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Up until OpenSSL 0.9.5a, this was new_section */
CONF_VALUE *_CONF_new_section(CONF *conf, const char *section);
/* Up until OpenSSL 0.9.5a, this was get_section */
CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section);
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,
const char *section);
int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value);
char *_CONF_get_string(const CONF *conf, const char *section,
const char *name);
long _CONF_get_number(const CONF *conf, const char *section,
const char *name);
int _CONF_new_data(CONF *conf);
void _CONF_free_data(CONF *conf);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,661 @@
/* 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 volatile void *a, const volatile 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

View File

@@ -0,0 +1,257 @@
/* crypto/des/des.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.]
*/
#ifndef HEADER_NEW_DES_H
# define HEADER_NEW_DES_H
# include <openssl/e_os2.h> /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG
* (via openssl/opensslconf.h */
# ifdef OPENSSL_NO_DES
# error DES is disabled.
# endif
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
# undef OPENSSL_EXTERN
# define OPENSSL_EXTERN OPENSSL_EXPORT
# endif
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned char DES_cblock[8];
typedef /* const */ unsigned char const_DES_cblock[8];
/*
* With "const", gcc 2.8.1 on Solaris thinks that DES_cblock * and
* const_DES_cblock * are incompatible pointer types.
*/
typedef struct DES_ks {
union {
DES_cblock cblock;
/*
* make sure things are correct size on machines with 8 byte longs
*/
DES_LONG deslong[2];
} ks[16];
} DES_key_schedule;
# ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT
# ifndef OPENSSL_ENABLE_OLD_DES_SUPPORT
# define OPENSSL_ENABLE_OLD_DES_SUPPORT
# endif
# endif
# ifdef OPENSSL_ENABLE_OLD_DES_SUPPORT
# include <openssl/des_old.h>
# endif
# define DES_KEY_SZ (sizeof(DES_cblock))
# define DES_SCHEDULE_SZ (sizeof(DES_key_schedule))
# define DES_ENCRYPT 1
# define DES_DECRYPT 0
# define DES_CBC_MODE 0
# define DES_PCBC_MODE 1
# define DES_ecb2_encrypt(i,o,k1,k2,e) \
DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
# define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \
DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
# define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \
DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
# define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
OPENSSL_DECLARE_GLOBAL(int, DES_check_key); /* defaults to false */
# define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key)
OPENSSL_DECLARE_GLOBAL(int, DES_rw_mode); /* defaults to DES_PCBC_MODE */
# define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode)
const char *DES_options(void);
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
DES_key_schedule *ks1, DES_key_schedule *ks2,
DES_key_schedule *ks3, int enc);
DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output,
long length, DES_key_schedule *schedule,
const_DES_cblock *ivec);
/* DES_cbc_encrypt does not update the IV! Use DES_ncbc_encrypt instead. */
void DES_cbc_encrypt(const unsigned char *input, unsigned char *output,
long length, DES_key_schedule *schedule,
DES_cblock *ivec, int enc);
void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output,
long length, DES_key_schedule *schedule,
DES_cblock *ivec, int enc);
void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output,
long length, DES_key_schedule *schedule,
DES_cblock *ivec, const_DES_cblock *inw,
const_DES_cblock *outw, int enc);
void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
long length, DES_key_schedule *schedule,
DES_cblock *ivec, int enc);
void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
DES_key_schedule *ks, int enc);
/*
* This is the DES encryption function that gets called by just about every
* other DES routine in the library. You should not use this function except
* to implement 'modes' of DES. I say this because the functions that call
* this routine do the conversion from 'char *' to long, and this needs to be
* done to make sure 'non-aligned' memory access do not occur. The
* characters are loaded 'little endian'. Data is a pointer to 2 unsigned
* long's and ks is the DES_key_schedule to use. enc, is non zero specifies
* encryption, zero if decryption.
*/
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc);
/*
* This functions is the same as DES_encrypt1() except that the DES initial
* permutation (IP) and final permutation (FP) have been left out. As for
* DES_encrypt1(), you should not use this function. It is used by the
* routines in the library that implement triple DES. IP() DES_encrypt2()
* DES_encrypt2() DES_encrypt2() FP() is the same as DES_encrypt1()
* DES_encrypt1() DES_encrypt1() except faster :-).
*/
void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc);
void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1,
DES_key_schedule *ks2, DES_key_schedule *ks3);
void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
DES_key_schedule *ks2, DES_key_schedule *ks3);
void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
long length,
DES_key_schedule *ks1, DES_key_schedule *ks2,
DES_key_schedule *ks3, DES_cblock *ivec, int enc);
void DES_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out,
long length,
DES_key_schedule *ks1, DES_key_schedule *ks2,
DES_key_schedule *ks3,
DES_cblock *ivec1, DES_cblock *ivec2, int enc);
void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
long length, DES_key_schedule *ks1,
DES_key_schedule *ks2, DES_key_schedule *ks3,
DES_cblock *ivec, int *num, int enc);
void DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out,
int numbits, long length, DES_key_schedule *ks1,
DES_key_schedule *ks2, DES_key_schedule *ks3,
DES_cblock *ivec, int enc);
void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, DES_key_schedule *ks1,
DES_key_schedule *ks2, DES_key_schedule *ks3,
DES_cblock *ivec, int *num);
# if 0
void DES_xwhite_in2out(const_DES_cblock *DES_key, const_DES_cblock *in_white,
DES_cblock *out_white);
# endif
int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
DES_cblock *iv);
int DES_enc_write(int fd, const void *buf, int len, DES_key_schedule *sched,
DES_cblock *iv);
char *DES_fcrypt(const char *buf, const char *salt, char *ret);
char *DES_crypt(const char *buf, const char *salt);
void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
long length, DES_key_schedule *schedule,
DES_cblock *ivec);
void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,
long length, DES_key_schedule *schedule,
DES_cblock *ivec, int enc);
DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
long length, int out_count, DES_cblock *seed);
int DES_random_key(DES_cblock *ret);
void DES_set_odd_parity(DES_cblock *key);
int DES_check_key_parity(const_DES_cblock *key);
int DES_is_weak_key(const_DES_cblock *key);
/*
* DES_set_key (= set_key = DES_key_sched = key_sched) calls
* DES_set_key_checked if global variable DES_check_key is set,
* DES_set_key_unchecked otherwise.
*/
int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule);
int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule);
void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule);
# ifdef OPENSSL_FIPS
void private_DES_set_key_unchecked(const_DES_cblock *key,
DES_key_schedule *schedule);
# endif
void DES_string_to_key(const char *str, DES_cblock *key);
void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2);
void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out,
long length, DES_key_schedule *schedule,
DES_cblock *ivec, int *num, int enc);
void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, DES_key_schedule *schedule,
DES_cblock *ivec, int *num);
int DES_read_password(DES_cblock *key, const char *prompt, int verify);
int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2,
const char *prompt, int verify);
# define DES_fixup_key_parity DES_set_odd_parity
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,497 @@
/* crypto/des/des_old.h */
/*-
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
* The function names in here are deprecated and are only present to
* provide an interface compatible with openssl 0.9.6 and older as
* well as libdes. OpenSSL now provides functions where "des_" has
* been replaced with "DES_" in the names, to make it possible to
* make incompatible changes that are needed for C type security and
* other stuff.
*
* This include files has two compatibility modes:
*
* - If OPENSSL_DES_LIBDES_COMPATIBILITY is defined, you get an API
* that is compatible with libdes and SSLeay.
* - If OPENSSL_DES_LIBDES_COMPATIBILITY isn't defined, you get an
* API that is compatible with OpenSSL 0.9.5x to 0.9.6x.
*
* Note that these modes break earlier snapshots of OpenSSL, where
* libdes compatibility was the only available mode or (later on) the
* prefered compatibility mode. However, after much consideration
* (and more or less violent discussions with external parties), it
* was concluded that OpenSSL should be compatible with earlier versions
* of itself before anything else. Also, in all honesty, libdes is
* an old beast that shouldn't really be used any more.
*
* Please consider starting to use the DES_ functions rather than the
* des_ ones. The des_ functions will disappear completely before
* OpenSSL 1.0!
*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*/
/*
* Written by Richard Levitte (richard@levitte.org) for the OpenSSL project
* 2001.
*/
/* ====================================================================
* Copyright (c) 1998-2002 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_DES_H
# define HEADER_DES_H
# include <openssl/e_os2.h> /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG */
# ifdef OPENSSL_NO_DES
# error DES is disabled.
# endif
# ifndef HEADER_NEW_DES_H
# error You must include des.h, not des_old.h directly.
# endif
# ifdef _KERBEROS_DES_H
# error <openssl/des_old.h> replaces <kerberos/des.h>.
# endif
# include <openssl/symhacks.h>
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
# undef OPENSSL_EXTERN
# define OPENSSL_EXTERN OPENSSL_EXPORT
# endif
#ifdef __cplusplus
extern "C" {
#endif
# ifdef _
# undef _
# endif
typedef unsigned char _ossl_old_des_cblock[8];
typedef struct _ossl_old_des_ks_struct {
union {
_ossl_old_des_cblock _;
/*
* make sure things are correct size on machines with 8 byte longs
*/
DES_LONG pad[2];
} ks;
} _ossl_old_des_key_schedule[16];
# ifndef OPENSSL_DES_LIBDES_COMPATIBILITY
# define des_cblock DES_cblock
# define const_des_cblock const_DES_cblock
# define des_key_schedule DES_key_schedule
# define des_ecb3_encrypt(i,o,k1,k2,k3,e)\
DES_ecb3_encrypt((i),(o),&(k1),&(k2),&(k3),(e))
# define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\
DES_ede3_cbc_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(e))
# define des_ede3_cbcm_encrypt(i,o,l,k1,k2,k3,iv1,iv2,e)\
DES_ede3_cbcm_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv1),(iv2),(e))
# define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\
DES_ede3_cfb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n),(e))
# define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\
DES_ede3_ofb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n))
# define des_options()\
DES_options()
# define des_cbc_cksum(i,o,l,k,iv)\
DES_cbc_cksum((i),(o),(l),&(k),(iv))
# define des_cbc_encrypt(i,o,l,k,iv,e)\
DES_cbc_encrypt((i),(o),(l),&(k),(iv),(e))
# define des_ncbc_encrypt(i,o,l,k,iv,e)\
DES_ncbc_encrypt((i),(o),(l),&(k),(iv),(e))
# define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\
DES_xcbc_encrypt((i),(o),(l),&(k),(iv),(inw),(outw),(e))
# define des_cfb_encrypt(i,o,n,l,k,iv,e)\
DES_cfb_encrypt((i),(o),(n),(l),&(k),(iv),(e))
# define des_ecb_encrypt(i,o,k,e)\
DES_ecb_encrypt((i),(o),&(k),(e))
# define des_encrypt1(d,k,e)\
DES_encrypt1((d),&(k),(e))
# define des_encrypt2(d,k,e)\
DES_encrypt2((d),&(k),(e))
# define des_encrypt3(d,k1,k2,k3)\
DES_encrypt3((d),&(k1),&(k2),&(k3))
# define des_decrypt3(d,k1,k2,k3)\
DES_decrypt3((d),&(k1),&(k2),&(k3))
# define des_xwhite_in2out(k,i,o)\
DES_xwhite_in2out((k),(i),(o))
# define des_enc_read(f,b,l,k,iv)\
DES_enc_read((f),(b),(l),&(k),(iv))
# define des_enc_write(f,b,l,k,iv)\
DES_enc_write((f),(b),(l),&(k),(iv))
# define des_fcrypt(b,s,r)\
DES_fcrypt((b),(s),(r))
# if 0
# define des_crypt(b,s)\
DES_crypt((b),(s))
# if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(__OpenBSD__)
# define crypt(b,s)\
DES_crypt((b),(s))
# endif
# endif
# define des_ofb_encrypt(i,o,n,l,k,iv)\
DES_ofb_encrypt((i),(o),(n),(l),&(k),(iv))
# define des_pcbc_encrypt(i,o,l,k,iv,e)\
DES_pcbc_encrypt((i),(o),(l),&(k),(iv),(e))
# define des_quad_cksum(i,o,l,c,s)\
DES_quad_cksum((i),(o),(l),(c),(s))
# define des_random_seed(k)\
_ossl_096_des_random_seed((k))
# define des_random_key(r)\
DES_random_key((r))
# define des_read_password(k,p,v) \
DES_read_password((k),(p),(v))
# define des_read_2passwords(k1,k2,p,v) \
DES_read_2passwords((k1),(k2),(p),(v))
# define des_set_odd_parity(k)\
DES_set_odd_parity((k))
# define des_check_key_parity(k)\
DES_check_key_parity((k))
# define des_is_weak_key(k)\
DES_is_weak_key((k))
# define des_set_key(k,ks)\
DES_set_key((k),&(ks))
# define des_key_sched(k,ks)\
DES_key_sched((k),&(ks))
# define des_set_key_checked(k,ks)\
DES_set_key_checked((k),&(ks))
# define des_set_key_unchecked(k,ks)\
DES_set_key_unchecked((k),&(ks))
# define des_string_to_key(s,k)\
DES_string_to_key((s),(k))
# define des_string_to_2keys(s,k1,k2)\
DES_string_to_2keys((s),(k1),(k2))
# define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\
DES_cfb64_encrypt((i),(o),(l),&(ks),(iv),(n),(e))
# define des_ofb64_encrypt(i,o,l,ks,iv,n)\
DES_ofb64_encrypt((i),(o),(l),&(ks),(iv),(n))
# define des_ecb2_encrypt(i,o,k1,k2,e) \
des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
# define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \
des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
# define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \
des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
# define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
# define des_check_key DES_check_key
# define des_rw_mode DES_rw_mode
# else /* libdes compatibility */
/*
* Map all symbol names to _ossl_old_des_* form, so we avoid all clashes with
* libdes
*/
# define des_cblock _ossl_old_des_cblock
# define des_key_schedule _ossl_old_des_key_schedule
# define des_ecb3_encrypt(i,o,k1,k2,k3,e)\
_ossl_old_des_ecb3_encrypt((i),(o),(k1),(k2),(k3),(e))
# define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\
_ossl_old_des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(e))
# define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\
_ossl_old_des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n),(e))
# define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\
_ossl_old_des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n))
# define des_options()\
_ossl_old_des_options()
# define des_cbc_cksum(i,o,l,k,iv)\
_ossl_old_des_cbc_cksum((i),(o),(l),(k),(iv))
# define des_cbc_encrypt(i,o,l,k,iv,e)\
_ossl_old_des_cbc_encrypt((i),(o),(l),(k),(iv),(e))
# define des_ncbc_encrypt(i,o,l,k,iv,e)\
_ossl_old_des_ncbc_encrypt((i),(o),(l),(k),(iv),(e))
# define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\
_ossl_old_des_xcbc_encrypt((i),(o),(l),(k),(iv),(inw),(outw),(e))
# define des_cfb_encrypt(i,o,n,l,k,iv,e)\
_ossl_old_des_cfb_encrypt((i),(o),(n),(l),(k),(iv),(e))
# define des_ecb_encrypt(i,o,k,e)\
_ossl_old_des_ecb_encrypt((i),(o),(k),(e))
# define des_encrypt(d,k,e)\
_ossl_old_des_encrypt((d),(k),(e))
# define des_encrypt2(d,k,e)\
_ossl_old_des_encrypt2((d),(k),(e))
# define des_encrypt3(d,k1,k2,k3)\
_ossl_old_des_encrypt3((d),(k1),(k2),(k3))
# define des_decrypt3(d,k1,k2,k3)\
_ossl_old_des_decrypt3((d),(k1),(k2),(k3))
# define des_xwhite_in2out(k,i,o)\
_ossl_old_des_xwhite_in2out((k),(i),(o))
# define des_enc_read(f,b,l,k,iv)\
_ossl_old_des_enc_read((f),(b),(l),(k),(iv))
# define des_enc_write(f,b,l,k,iv)\
_ossl_old_des_enc_write((f),(b),(l),(k),(iv))
# define des_fcrypt(b,s,r)\
_ossl_old_des_fcrypt((b),(s),(r))
# define des_crypt(b,s)\
_ossl_old_des_crypt((b),(s))
# if 0
# define crypt(b,s)\
_ossl_old_crypt((b),(s))
# endif
# define des_ofb_encrypt(i,o,n,l,k,iv)\
_ossl_old_des_ofb_encrypt((i),(o),(n),(l),(k),(iv))
# define des_pcbc_encrypt(i,o,l,k,iv,e)\
_ossl_old_des_pcbc_encrypt((i),(o),(l),(k),(iv),(e))
# define des_quad_cksum(i,o,l,c,s)\
_ossl_old_des_quad_cksum((i),(o),(l),(c),(s))
# define des_random_seed(k)\
_ossl_old_des_random_seed((k))
# define des_random_key(r)\
_ossl_old_des_random_key((r))
# define des_read_password(k,p,v) \
_ossl_old_des_read_password((k),(p),(v))
# define des_read_2passwords(k1,k2,p,v) \
_ossl_old_des_read_2passwords((k1),(k2),(p),(v))
# define des_set_odd_parity(k)\
_ossl_old_des_set_odd_parity((k))
# define des_is_weak_key(k)\
_ossl_old_des_is_weak_key((k))
# define des_set_key(k,ks)\
_ossl_old_des_set_key((k),(ks))
# define des_key_sched(k,ks)\
_ossl_old_des_key_sched((k),(ks))
# define des_string_to_key(s,k)\
_ossl_old_des_string_to_key((s),(k))
# define des_string_to_2keys(s,k1,k2)\
_ossl_old_des_string_to_2keys((s),(k1),(k2))
# define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\
_ossl_old_des_cfb64_encrypt((i),(o),(l),(ks),(iv),(n),(e))
# define des_ofb64_encrypt(i,o,l,ks,iv,n)\
_ossl_old_des_ofb64_encrypt((i),(o),(l),(ks),(iv),(n))
# define des_ecb2_encrypt(i,o,k1,k2,e) \
des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
# define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \
des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
# define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \
des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
# define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
# define des_check_key DES_check_key
# define des_rw_mode DES_rw_mode
# endif
const char *_ossl_old_des_options(void);
void _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output,
_ossl_old_des_key_schedule ks1,
_ossl_old_des_key_schedule ks2,
_ossl_old_des_key_schedule ks3, int enc);
DES_LONG _ossl_old_des_cbc_cksum(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output, long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec);
void _ossl_old_des_cbc_encrypt(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output, long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec, int enc);
void _ossl_old_des_ncbc_encrypt(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output, long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec, int enc);
void _ossl_old_des_xcbc_encrypt(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output, long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec,
_ossl_old_des_cblock *inw,
_ossl_old_des_cblock *outw, int enc);
void _ossl_old_des_cfb_encrypt(unsigned char *in, unsigned char *out,
int numbits, long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec, int enc);
void _ossl_old_des_ecb_encrypt(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output,
_ossl_old_des_key_schedule ks, int enc);
void _ossl_old_des_encrypt(DES_LONG *data, _ossl_old_des_key_schedule ks,
int enc);
void _ossl_old_des_encrypt2(DES_LONG *data, _ossl_old_des_key_schedule ks,
int enc);
void _ossl_old_des_encrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1,
_ossl_old_des_key_schedule ks2,
_ossl_old_des_key_schedule ks3);
void _ossl_old_des_decrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1,
_ossl_old_des_key_schedule ks2,
_ossl_old_des_key_schedule ks3);
void _ossl_old_des_ede3_cbc_encrypt(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output, long length,
_ossl_old_des_key_schedule ks1,
_ossl_old_des_key_schedule ks2,
_ossl_old_des_key_schedule ks3,
_ossl_old_des_cblock *ivec, int enc);
void _ossl_old_des_ede3_cfb64_encrypt(unsigned char *in, unsigned char *out,
long length,
_ossl_old_des_key_schedule ks1,
_ossl_old_des_key_schedule ks2,
_ossl_old_des_key_schedule ks3,
_ossl_old_des_cblock *ivec, int *num,
int enc);
void _ossl_old_des_ede3_ofb64_encrypt(unsigned char *in, unsigned char *out,
long length,
_ossl_old_des_key_schedule ks1,
_ossl_old_des_key_schedule ks2,
_ossl_old_des_key_schedule ks3,
_ossl_old_des_cblock *ivec, int *num);
# if 0
void _ossl_old_des_xwhite_in2out(_ossl_old_des_cblock (*des_key),
_ossl_old_des_cblock (*in_white),
_ossl_old_des_cblock (*out_white));
# endif
int _ossl_old_des_enc_read(int fd, char *buf, int len,
_ossl_old_des_key_schedule sched,
_ossl_old_des_cblock *iv);
int _ossl_old_des_enc_write(int fd, char *buf, int len,
_ossl_old_des_key_schedule sched,
_ossl_old_des_cblock *iv);
char *_ossl_old_des_fcrypt(const char *buf, const char *salt, char *ret);
char *_ossl_old_des_crypt(const char *buf, const char *salt);
# if !defined(PERL5) && !defined(NeXT)
char *_ossl_old_crypt(const char *buf, const char *salt);
# endif
void _ossl_old_des_ofb_encrypt(unsigned char *in, unsigned char *out,
int numbits, long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec);
void _ossl_old_des_pcbc_encrypt(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output, long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec, int enc);
DES_LONG _ossl_old_des_quad_cksum(_ossl_old_des_cblock *input,
_ossl_old_des_cblock *output, long length,
int out_count, _ossl_old_des_cblock *seed);
void _ossl_old_des_random_seed(_ossl_old_des_cblock key);
void _ossl_old_des_random_key(_ossl_old_des_cblock ret);
int _ossl_old_des_read_password(_ossl_old_des_cblock *key, const char *prompt,
int verify);
int _ossl_old_des_read_2passwords(_ossl_old_des_cblock *key1,
_ossl_old_des_cblock *key2,
const char *prompt, int verify);
void _ossl_old_des_set_odd_parity(_ossl_old_des_cblock *key);
int _ossl_old_des_is_weak_key(_ossl_old_des_cblock *key);
int _ossl_old_des_set_key(_ossl_old_des_cblock *key,
_ossl_old_des_key_schedule schedule);
int _ossl_old_des_key_sched(_ossl_old_des_cblock *key,
_ossl_old_des_key_schedule schedule);
void _ossl_old_des_string_to_key(char *str, _ossl_old_des_cblock *key);
void _ossl_old_des_string_to_2keys(char *str, _ossl_old_des_cblock *key1,
_ossl_old_des_cblock *key2);
void _ossl_old_des_cfb64_encrypt(unsigned char *in, unsigned char *out,
long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec, int *num,
int enc);
void _ossl_old_des_ofb64_encrypt(unsigned char *in, unsigned char *out,
long length,
_ossl_old_des_key_schedule schedule,
_ossl_old_des_cblock *ivec, int *num);
void _ossl_096_des_random_seed(des_cblock *key);
/*
* The following definitions provide compatibility with the MIT Kerberos
* library. The _ossl_old_des_key_schedule structure is not binary
* compatible.
*/
# define _KERBEROS_DES_H
# define KRBDES_ENCRYPT DES_ENCRYPT
# define KRBDES_DECRYPT DES_DECRYPT
# ifdef KERBEROS
# define ENCRYPT DES_ENCRYPT
# define DECRYPT DES_DECRYPT
# endif
# ifndef NCOMPAT
# define C_Block des_cblock
# define Key_schedule des_key_schedule
# define KEY_SZ DES_KEY_SZ
# define string_to_key des_string_to_key
# define read_pw_string des_read_pw_string
# define random_key des_random_key
# define pcbc_encrypt des_pcbc_encrypt
# define set_key des_set_key
# define key_sched des_key_sched
# define ecb_encrypt des_ecb_encrypt
# define cbc_encrypt des_cbc_encrypt
# define ncbc_encrypt des_ncbc_encrypt
# define xcbc_encrypt des_xcbc_encrypt
# define cbc_cksum des_cbc_cksum
# define quad_cksum des_quad_cksum
# define check_parity des_check_key_parity
# endif
# define des_fixup_key_parity DES_fixup_key_parity
#ifdef __cplusplus
}
#endif
/* for DES_read_pw_string et al */
# include <openssl/ui_compat.h>
#endif

View File

@@ -0,0 +1,410 @@
/* crypto/dh/dh.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.]
*/
#ifndef HEADER_DH_H
# define HEADER_DH_H
# include <openssl/e_os2.h>
# ifdef OPENSSL_NO_DH
# error DH is disabled.
# endif
# ifndef OPENSSL_NO_BIO
# include <openssl/bio.h>
# endif
# include <openssl/ossl_typ.h>
# ifndef OPENSSL_NO_DEPRECATED
# include <openssl/bn.h>
# endif
# ifndef OPENSSL_DH_MAX_MODULUS_BITS
# define OPENSSL_DH_MAX_MODULUS_BITS 10000
# endif
# define DH_FLAG_CACHE_MONT_P 0x01
/*
* new with 0.9.7h; the built-in DH
* implementation now uses constant time
* modular exponentiation for secret exponents
* by default. This flag causes the
* faster variable sliding window method to
* be used for all exponents.
*/
# define DH_FLAG_NO_EXP_CONSTTIME 0x02
/*
* If this flag is set the DH method is FIPS compliant and can be used in
* FIPS mode. This is set in the validated module method. If an application
* sets this flag in its own methods it is its reposibility to ensure the
* result is compliant.
*/
# define DH_FLAG_FIPS_METHOD 0x0400
/*
* If this flag is set the operations normally disabled in FIPS mode are
* permitted it is then the applications responsibility to ensure that the
* usage is compliant.
*/
# define DH_FLAG_NON_FIPS_ALLOW 0x0400
#ifdef __cplusplus
extern "C" {
#endif
/* Already defined in ossl_typ.h */
/* typedef struct dh_st DH; */
/* typedef struct dh_method DH_METHOD; */
struct dh_method {
const char *name;
/* Methods here */
int (*generate_key) (DH *dh);
int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
/* Can be null */
int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *m_ctx);
int (*init) (DH *dh);
int (*finish) (DH *dh);
int flags;
char *app_data;
/* If this is non-NULL, it will be used to generate parameters */
int (*generate_params) (DH *dh, int prime_len, int generator,
BN_GENCB *cb);
};
struct dh_st {
/*
* This first argument is used to pick up errors when a DH is passed
* instead of a EVP_PKEY
*/
int pad;
int version;
BIGNUM *p;
BIGNUM *g;
long length; /* optional */
BIGNUM *pub_key; /* g^x % p */
BIGNUM *priv_key; /* x */
int flags;
BN_MONT_CTX *method_mont_p;
/* Place holders if we want to do X9.42 DH */
BIGNUM *q;
BIGNUM *j;
unsigned char *seed;
int seedlen;
BIGNUM *counter;
int references;
CRYPTO_EX_DATA ex_data;
const DH_METHOD *meth;
ENGINE *engine;
};
# define DH_GENERATOR_2 2
/* #define DH_GENERATOR_3 3 */
# define DH_GENERATOR_5 5
/* DH_check error codes */
# define DH_CHECK_P_NOT_PRIME 0x01
# define DH_CHECK_P_NOT_SAFE_PRIME 0x02
# define DH_UNABLE_TO_CHECK_GENERATOR 0x04
# define DH_NOT_SUITABLE_GENERATOR 0x08
# define DH_CHECK_Q_NOT_PRIME 0x10
# define DH_CHECK_INVALID_Q_VALUE 0x20
# define DH_CHECK_INVALID_J_VALUE 0x40
/* DH_check_pub_key error codes */
# define DH_CHECK_PUBKEY_TOO_SMALL 0x01
# define DH_CHECK_PUBKEY_TOO_LARGE 0x02
# define DH_CHECK_PUBKEY_INVALID 0x04
/*
* primes p where (p-1)/2 is prime too are called "safe"; we define this for
* backward compatibility:
*/
# define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME
# define d2i_DHparams_fp(fp,x) \
(DH *)ASN1_d2i_fp((char *(*)())DH_new, \
(char *(*)())d2i_DHparams, \
(fp), \
(unsigned char **)(x))
# define i2d_DHparams_fp(fp,x) \
ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x))
# define d2i_DHparams_bio(bp,x) \
ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x)
# define i2d_DHparams_bio(bp,x) \
ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x)
# define d2i_DHxparams_fp(fp,x) \
(DH *)ASN1_d2i_fp((char *(*)())DH_new, \
(char *(*)())d2i_DHxparams, \
(fp), \
(unsigned char **)(x))
# define i2d_DHxparams_fp(fp,x) \
ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x))
# define d2i_DHxparams_bio(bp,x) \
ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x)
# define i2d_DHxparams_bio(bp,x) \
ASN1_i2d_bio_of_const(DH, i2d_DHxparams, bp, x)
DH *DHparams_dup(DH *);
const DH_METHOD *DH_OpenSSL(void);
void DH_set_default_method(const DH_METHOD *meth);
const DH_METHOD *DH_get_default_method(void);
int DH_set_method(DH *dh, const DH_METHOD *meth);
DH *DH_new_method(ENGINE *engine);
DH *DH_new(void);
void DH_free(DH *dh);
int DH_up_ref(DH *dh);
int DH_size(const DH *dh);
int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
int DH_set_ex_data(DH *d, int idx, void *arg);
void *DH_get_ex_data(DH *d, int idx);
/* Deprecated version */
# ifndef OPENSSL_NO_DEPRECATED
DH *DH_generate_parameters(int prime_len, int generator,
void (*callback) (int, int, void *), void *cb_arg);
# endif /* !defined(OPENSSL_NO_DEPRECATED) */
/* New version */
int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
BN_GENCB *cb);
int DH_check(const DH *dh, int *codes);
int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
int DH_generate_key(DH *dh);
int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
int i2d_DHparams(const DH *a, unsigned char **pp);
DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
int i2d_DHxparams(const DH *a, unsigned char **pp);
# ifndef OPENSSL_NO_FP_API
int DHparams_print_fp(FILE *fp, const DH *x);
# endif
# ifndef OPENSSL_NO_BIO
int DHparams_print(BIO *bp, const DH *x);
# else
int DHparams_print(char *bp, const DH *x);
# endif
/* RFC 5114 parameters */
DH *DH_get_1024_160(void);
DH *DH_get_2048_224(void);
DH *DH_get_2048_256(void);
/* RFC2631 KDF */
int DH_KDF_X9_42(unsigned char *out, size_t outlen,
const unsigned char *Z, size_t Zlen,
ASN1_OBJECT *key_oid,
const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL)
# define EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN, len, NULL)
# define EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_PARAMGEN_TYPE, typ, NULL)
# define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL)
# define EVP_PKEY_CTX_set_dh_rfc5114(ctx, gen) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_RFC5114, gen, NULL)
# define EVP_PKEY_CTX_set_dhx_rfc5114(ctx, gen) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_RFC5114, gen, NULL)
# define EVP_PKEY_CTX_set_dh_kdf_type(ctx, kdf) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_DH_KDF_TYPE, kdf, NULL)
# define EVP_PKEY_CTX_get_dh_kdf_type(ctx) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_DH_KDF_TYPE, -2, NULL)
# define EVP_PKEY_CTX_set0_dh_kdf_oid(ctx, oid) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_DH_KDF_OID, 0, (void *)oid)
# define EVP_PKEY_CTX_get0_dh_kdf_oid(ctx, poid) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_GET_DH_KDF_OID, 0, (void *)poid)
# define EVP_PKEY_CTX_set_dh_kdf_md(ctx, md) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_DH_KDF_MD, 0, (void *)md)
# define EVP_PKEY_CTX_get_dh_kdf_md(ctx, pmd) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_GET_DH_KDF_MD, 0, (void *)pmd)
# define EVP_PKEY_CTX_set_dh_kdf_outlen(ctx, len) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_DH_KDF_OUTLEN, len, NULL)
# define EVP_PKEY_CTX_get_dh_kdf_outlen(ctx, plen) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN, 0, (void *)plen)
# define EVP_PKEY_CTX_set0_dh_kdf_ukm(ctx, p, plen) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_DH_KDF_UKM, plen, (void *)p)
# define EVP_PKEY_CTX_get0_dh_kdf_ukm(ctx, p) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
EVP_PKEY_OP_DERIVE, \
EVP_PKEY_CTRL_GET_DH_KDF_UKM, 0, (void *)p)
# define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1)
# define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2)
# define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3)
# define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4)
# define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5)
# define EVP_PKEY_CTRL_DH_KDF_TYPE (EVP_PKEY_ALG_CTRL + 6)
# define EVP_PKEY_CTRL_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 7)
# define EVP_PKEY_CTRL_GET_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 8)
# define EVP_PKEY_CTRL_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 9)
# define EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 10)
# define EVP_PKEY_CTRL_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 11)
# define EVP_PKEY_CTRL_GET_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 12)
# define EVP_PKEY_CTRL_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 13)
# define EVP_PKEY_CTRL_GET_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 14)
/* KDF types */
# define EVP_PKEY_DH_KDF_NONE 1
# define EVP_PKEY_DH_KDF_X9_42 2
/* 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_DH_strings(void);
/* Error codes for the DH functions. */
/* Function codes. */
# define DH_F_COMPUTE_KEY 102
# define DH_F_DHPARAMS_PRINT_FP 101
# define DH_F_DH_BUILTIN_GENPARAMS 106
# define DH_F_DH_CMS_DECRYPT 117
# define DH_F_DH_CMS_SET_PEERKEY 118
# define DH_F_DH_CMS_SET_SHARED_INFO 119
# define DH_F_DH_COMPUTE_KEY 114
# define DH_F_DH_GENERATE_KEY 115
# define DH_F_DH_GENERATE_PARAMETERS_EX 116
# define DH_F_DH_NEW_METHOD 105
# define DH_F_DH_PARAM_DECODE 107
# define DH_F_DH_PRIV_DECODE 110
# define DH_F_DH_PRIV_ENCODE 111
# define DH_F_DH_PUB_DECODE 108
# define DH_F_DH_PUB_ENCODE 109
# define DH_F_DO_DH_PRINT 100
# define DH_F_GENERATE_KEY 103
# define DH_F_GENERATE_PARAMETERS 104
# define DH_F_PKEY_DH_DERIVE 112
# define DH_F_PKEY_DH_KEYGEN 113
/* Reason codes. */
# define DH_R_BAD_GENERATOR 101
# define DH_R_BN_DECODE_ERROR 109
# define DH_R_BN_ERROR 106
# define DH_R_DECODE_ERROR 104
# define DH_R_INVALID_PUBKEY 102
# define DH_R_KDF_PARAMETER_ERROR 112
# define DH_R_KEYS_NOT_SET 108
# define DH_R_KEY_SIZE_TOO_SMALL 110
# define DH_R_MODULUS_TOO_LARGE 103
# define DH_R_NON_FIPS_METHOD 111
# define DH_R_NO_PARAMETERS_SET 107
# define DH_R_NO_PRIVATE_VALUE 100
# define DH_R_PARAMETER_ENCODING_ERROR 105
# define DH_R_PEER_KEY_ERROR 113
# define DH_R_SHARED_INFO_ERROR 114
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,332 @@
/* crypto/dsa/dsa.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.]
*/
/*
* The DSS routines are based on patches supplied by
* Steven Schoch <schoch@sheba.arc.nasa.gov>. He basically did the
* work and I have just tweaked them a little to fit into my
* stylistic vision for SSLeay :-) */
#ifndef HEADER_DSA_H
# define HEADER_DSA_H
# include <openssl/e_os2.h>
# ifdef OPENSSL_NO_DSA
# error DSA is disabled.
# endif
# ifndef OPENSSL_NO_BIO
# include <openssl/bio.h>
# endif
# include <openssl/crypto.h>
# include <openssl/ossl_typ.h>
# ifndef OPENSSL_NO_DEPRECATED
# include <openssl/bn.h>
# ifndef OPENSSL_NO_DH
# include <openssl/dh.h>
# endif
# endif
# ifndef OPENSSL_DSA_MAX_MODULUS_BITS
# define OPENSSL_DSA_MAX_MODULUS_BITS 10000
# endif
# define DSA_FLAG_CACHE_MONT_P 0x01
/*
* new with 0.9.7h; the built-in DSA implementation now uses constant time
* modular exponentiation for secret exponents by default. This flag causes
* the faster variable sliding window method to be used for all exponents.
*/
# define DSA_FLAG_NO_EXP_CONSTTIME 0x02
/*
* If this flag is set the DSA method is FIPS compliant and can be used in
* FIPS mode. This is set in the validated module method. If an application
* sets this flag in its own methods it is its reposibility to ensure the
* result is compliant.
*/
# define DSA_FLAG_FIPS_METHOD 0x0400
/*
* If this flag is set the operations normally disabled in FIPS mode are
* permitted it is then the applications responsibility to ensure that the
* usage is compliant.
*/
# define DSA_FLAG_NON_FIPS_ALLOW 0x0400
#ifdef __cplusplus
extern "C" {
#endif
/* Already defined in ossl_typ.h */
/* typedef struct dsa_st DSA; */
/* typedef struct dsa_method DSA_METHOD; */
typedef struct DSA_SIG_st {
BIGNUM *r;
BIGNUM *s;
} DSA_SIG;
struct dsa_method {
const char *name;
DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
BIGNUM **rp);
int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa);
int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *in_mont);
/* Can be null */
int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
int (*init) (DSA *dsa);
int (*finish) (DSA *dsa);
int flags;
char *app_data;
/* If this is non-NULL, it is used to generate DSA parameters */
int (*dsa_paramgen) (DSA *dsa, int bits,
const unsigned char *seed, int seed_len,
int *counter_ret, unsigned long *h_ret,
BN_GENCB *cb);
/* If this is non-NULL, it is used to generate DSA keys */
int (*dsa_keygen) (DSA *dsa);
};
struct dsa_st {
/*
* This first variable is used to pick up errors where a DSA is passed
* instead of of a EVP_PKEY
*/
int pad;
long version;
int write_params;
BIGNUM *p;
BIGNUM *q; /* == 20 */
BIGNUM *g;
BIGNUM *pub_key; /* y public key */
BIGNUM *priv_key; /* x private key */
BIGNUM *kinv; /* Signing pre-calc */
BIGNUM *r; /* Signing pre-calc */
int flags;
/* Normally used to cache montgomery values */
BN_MONT_CTX *method_mont_p;
int references;
CRYPTO_EX_DATA ex_data;
const DSA_METHOD *meth;
/* functional reference if 'meth' is ENGINE-provided */
ENGINE *engine;
};
# define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \
(char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x))
# define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \
(unsigned char *)(x))
# define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x)
# define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x)
DSA *DSAparams_dup(DSA *x);
DSA_SIG *DSA_SIG_new(void);
void DSA_SIG_free(DSA_SIG *a);
int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
int DSA_do_verify(const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa);
const DSA_METHOD *DSA_OpenSSL(void);
void DSA_set_default_method(const DSA_METHOD *);
const DSA_METHOD *DSA_get_default_method(void);
int DSA_set_method(DSA *dsa, const DSA_METHOD *);
DSA *DSA_new(void);
DSA *DSA_new_method(ENGINE *engine);
void DSA_free(DSA *r);
/* "up" the DSA object's reference count */
int DSA_up_ref(DSA *r);
int DSA_size(const DSA *);
/* next 4 return -1 on error */
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
int DSA_sign(int type, const unsigned char *dgst, int dlen,
unsigned char *sig, unsigned int *siglen, DSA *dsa);
int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
const unsigned char *sigbuf, int siglen, DSA *dsa);
int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
int DSA_set_ex_data(DSA *d, int idx, void *arg);
void *DSA_get_ex_data(DSA *d, int idx);
DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
/* Deprecated version */
# ifndef OPENSSL_NO_DEPRECATED
DSA *DSA_generate_parameters(int bits,
unsigned char *seed, int seed_len,
int *counter_ret, unsigned long *h_ret, void
(*callback) (int, int, void *), void *cb_arg);
# endif /* !defined(OPENSSL_NO_DEPRECATED) */
/* New version */
int DSA_generate_parameters_ex(DSA *dsa, int bits,
const unsigned char *seed, int seed_len,
int *counter_ret, unsigned long *h_ret,
BN_GENCB *cb);
int DSA_generate_key(DSA *a);
int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
int i2d_DSAparams(const DSA *a, unsigned char **pp);
# ifndef OPENSSL_NO_BIO
int DSAparams_print(BIO *bp, const DSA *x);
int DSA_print(BIO *bp, const DSA *x, int off);
# endif
# ifndef OPENSSL_NO_FP_API
int DSAparams_print_fp(FILE *fp, const DSA *x);
int DSA_print_fp(FILE *bp, const DSA *x, int off);
# endif
# define DSS_prime_checks 50
/*
* Primality test according to FIPS PUB 186[-1], Appendix 2.1: 50 rounds of
* Rabin-Miller
*/
# define DSA_is_prime(n, callback, cb_arg) \
BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg)
# ifndef OPENSSL_NO_DH
/*
* Convert DSA structure (key or just parameters) into DH structure (be
* careful to avoid small subgroup attacks when using this!)
*/
DH *DSA_dup_DH(const DSA *r);
# endif
# define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL)
# define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1)
# define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2)
# define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3)
/* 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_DSA_strings(void);
/* Error codes for the DSA functions. */
/* Function codes. */
# define DSA_F_D2I_DSA_SIG 110
# define DSA_F_DO_DSA_PRINT 104
# define DSA_F_DSAPARAMS_PRINT 100
# define DSA_F_DSAPARAMS_PRINT_FP 101
# define DSA_F_DSA_BUILTIN_PARAMGEN2 126
# define DSA_F_DSA_DO_SIGN 112
# define DSA_F_DSA_DO_VERIFY 113
# define DSA_F_DSA_GENERATE_KEY 124
# define DSA_F_DSA_GENERATE_PARAMETERS_EX 123
# define DSA_F_DSA_NEW_METHOD 103
# define DSA_F_DSA_PARAM_DECODE 119
# define DSA_F_DSA_PRINT_FP 105
# define DSA_F_DSA_PRIV_DECODE 115
# define DSA_F_DSA_PRIV_ENCODE 116
# define DSA_F_DSA_PUB_DECODE 117
# define DSA_F_DSA_PUB_ENCODE 118
# define DSA_F_DSA_SIGN 106
# define DSA_F_DSA_SIGN_SETUP 107
# define DSA_F_DSA_SIG_NEW 109
# define DSA_F_DSA_SIG_PRINT 125
# define DSA_F_DSA_VERIFY 108
# define DSA_F_I2D_DSA_SIG 111
# define DSA_F_OLD_DSA_PRIV_DECODE 122
# define DSA_F_PKEY_DSA_CTRL 120
# define DSA_F_PKEY_DSA_KEYGEN 121
# define DSA_F_SIG_CB 114
/* Reason codes. */
# define DSA_R_BAD_Q_VALUE 102
# define DSA_R_BN_DECODE_ERROR 108
# define DSA_R_BN_ERROR 109
# define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100
# define DSA_R_DECODE_ERROR 104
# define DSA_R_INVALID_DIGEST_TYPE 106
# define DSA_R_INVALID_PARAMETERS 112
# define DSA_R_MISSING_PARAMETERS 101
# define DSA_R_MODULUS_TOO_LARGE 103
# define DSA_R_NEED_NEW_SETUP_VALUES 110
# define DSA_R_NON_FIPS_DSA_METHOD 111
# define DSA_R_NO_PARAMETERS_SET 107
# define DSA_R_PARAMETER_ENCODING_ERROR 105
# define DSA_R_Q_NOT_PRIME 113
#ifdef __cplusplus
}
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More