summaryrefslogtreecommitdiff
path: root/README_packaging.md
diff options
context:
space:
mode:
authorMate Szalay-Beko <szalay.beko.mate@gmail.com>2019-11-21 09:54:01 +0100
committerAndor Molnar <andor@apache.org>2019-11-21 09:54:01 +0100
commitdded710d07892c6b42380267cd1bb896b852a7ee (patch)
treedb5d0125c1d3c6a6cdb0cc5155568bcbd5895399 /README_packaging.md
parentae68c7d50e4057ef3f9b99ac0cd0200a8bd5f235 (diff)
downloadzookeeper-dded710d07892c6b42380267cd1bb896b852a7ee.tar.gz
ZOOKEEPER-2122: add SSL support for C-client
This PR is based on the works of Asnish Amarnath and Suhas Dantkale. Most of the kudos should go to them and those who were reviewing all the previous PRs. **The PR includes the following changes from PR#639:** - OPENSSL 1.1.1 version support in C-client **The PR includes the following changes from PR#990:** - also supporting OPENSSL 1.0.2 - SSL connection on non-blocking socket is handled correctly - Support of Certificate Chains - Fix Memory leaks - Dynamically generated test certificates **The following new changes were added into the PR:** - fix CMake + VisualStudio2019 build with windows - fix C CLI to compile / work both with windows and linux (I tested them manually) - fix (and simplify) the way how the server is started with C unit tests, so it is compatible with maven build now - the test case `testReadOnly` was failing with the previous PR because there was a bug in the C-client code, I fixed that - I also added new test case: `testReadOnlyWithSSL` **Testing this PR on linux:** ``` git clean -xdf # compile ZooKeeper server plus the C-client code mvn clean install -DskipTests -Pfull-build # compile and execute C-client unit tests cd zookeeper-client/ mvn clean install -Pfull-build ``` **Compile the code on windows (only cmake is supported):** - download C-Make:  https://cmake.org/download/ - Install community edition of Visual Studio: https://visualstudio.microsoft.com/downloads/ - Download OpenSSL (e.g. 1.0.2): https://slproweb.com/products/Win32OpenSSL.html (e.g. install it to `c:\OpenSSL-Win64`) - compile the java code using: `mvn clean install -DskipTests` - go to the Client folder: `cd zookeeper-client\zookeeper-client-c` - configure the project:  `cmake . -D WITH_OPENSSL=c:\OpenSSL-Win64` - build the project: `cmake --build .` **Testing the C-client with SSL manually:** - run the `zookeeper-client/zookeeper-client-c/ssl/gencerts.sh` to generate certificate files (e.g. copy it to an empty folder like `/tmp/ssl/` and start is) - start a ZooKeeper server, using some config file like this one: ``` tickTime=3000 initLimit=10 syncLimit=5 dataDir=/tmp/zkdata secureClientPort=22281 serverCnxnFactory=org.apache.zookeeper.server.NettyServerCnxnFactory ssl.keyStore.location=/tmp/ssl/server.jks ssl.keyStore.password=password ssl.trustStore.location=/tmp/ssl/servertrust.jks ssl.trustStore.password=password ``` - start the command line client (cli.exe on windows, cli_mt or cli_st on linux): `./cli_mt --host localhost:22281 --ssl /tmp/ssl/server.crt,/tmp/ssl/client.crt,/tmp/ssl/clientkey.pem,password` Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com> Author: Mate Szalay-Beko <mszalay@cloudera.com> Reviewers: andor@apache.org Closes #1107 from symat/ZOOKEEPER-2122 and squashes the following commits: 08294ce91 [Mate Szalay-Beko] ZOOKEEPER-2122: update readme + use FQDN in SSL certs during testing 17e504a98 [Mate Szalay-Beko] Merge remote-tracking branch 'apache/master' into ZOOKEEPER-2122 317241d13 [Mate Szalay-Beko] ZOOKEEPER-2122: minor fix in SSL certificates used for testing 6f37b6653 [Mate Szalay-Beko] Merge remote-tracking branch 'apache/master' into HEAD 980914313 [Mate Szalay-Beko] ZOOKEEPER-2122: add SSL support for C-client
Diffstat (limited to 'README_packaging.md')
-rw-r--r--README_packaging.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/README_packaging.md b/README_packaging.md
index 2ccbba6bd..e2a2d4767 100644
--- a/README_packaging.md
+++ b/README_packaging.md
@@ -8,14 +8,15 @@ http://bigtop.apache.org/
## Requirements
-- ant (recommended version 1.9.4 or later for concurrent JUnit test execution) or maven to build the java code
-- gcc, cppunit and python-setuptools are required to build C and python bindings.
+- you need maven to build the java code
+- gcc, cppunit, openssl and python-setuptools are required to build C and python bindings. (only needed when using `-Pfull-build`)
On RHEL machine:
```
yum install cppunit
yum install python-setuptools
+yum install openssl openssl-devel
```
On Ubuntu:
@@ -23,6 +24,7 @@ On Ubuntu:
```
apt-get install cppunit
apt-get install python-setuptools
+apt-get install openssl libssl-dev
```