You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by roodkcab <gi...@git.apache.org> on 2018/09/14 11:00:18 UTC
[GitHub] zookeeper pull request #625: Ssl client
GitHub user roodkcab opened a pull request:
https://github.com/apache/zookeeper/pull/625
Ssl client
ZOOKEEPER-2122: add openssl to zookeeper c client to support ssl
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/roodkcab/zookeeper ssl_client
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/625.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #625
----
commit df29df396edafb9a95179f4f37d3dfd6efd971b4
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-05T21:33:40Z
ZOOKEEPER-2330: ZooKeeper close API does not close Login thread
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718122 13f79535-47bb-0310-9956-ffa450edef68
commit 4c344848a97a699a6d077076e09beb758f0bc555
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-05T21:45:00Z
ZOOKEEPER-2326: Include connected server address:port in log
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718124 13f79535-47bb-0310-9956-ffa450edef68
commit 21e69495c5973a9237a131da4891d4ea9409064d
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-06T19:00:22Z
ZOOKEEPER-2335: Java Compilation Error in ClientCnxn.java
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718206 13f79535-47bb-0310-9956-ffa450edef68
commit 10f87e90b478b84d303c5eb7c34cba505953802a
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-06T19:23:27Z
ZOOKEEPER-2311: assert in setup_random
(Marshall McMullen via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718208 13f79535-47bb-0310-9956-ffa450edef68
commit 481e91a4fe16d47a6e0c52bd7ea1b0e5f80bf414
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-06T20:31:57Z
ZOOKEEPER-2306: Remove file delete duplicate code from test code
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718213 13f79535-47bb-0310-9956-ffa450edef68
commit 22b7c77cb49aa348f8deb578f06ab42bf418bbc9
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-06T20:38:43Z
ZOOKEEPER-2304: JMX ClientPort from ZooKeeperServerBean incorrect
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718215 13f79535-47bb-0310-9956-ffa450edef68
commit 950347028aec3dfb9b952608cad43686e26262c9
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-07T05:00:45Z
ZOOKEEPER-2301: QuorumPeer does not listen on passed client IP in the constructor
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718252 13f79535-47bb-0310-9956-ffa450edef68
commit 087943843f7c392bf7edfdd3431b4237f50665bc
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-07T05:08:09Z
ZOOKEEPER-2299: NullPointerException in LocalPeerBean for ClientAddress
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718254 13f79535-47bb-0310-9956-ffa450edef68
commit 0a0e05f51d1280676cb4e03161260d5c78886d75
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-07T05:27:58Z
ZOOKEEPER-2300: Expose SecureClientPort and SecureClientAddress JMX properties
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718256 13f79535-47bb-0310-9956-ffa450edef68
commit b766510b89f30e8008063eb9ccd63924866bf74b
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-08T04:53:28Z
ZOOKEEPER-2336: Jenkins not working due to old SVN
(Akihiro Suda via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718512 13f79535-47bb-0310-9956-ffa450edef68
commit c3facc486fb72f3b9f7e169192c13924ad8e1c89
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-09T04:06:47Z
ZOOKEEPER-2295: TGT refresh time logic is wrong
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1718759 13f79535-47bb-0310-9956-ffa450edef68
commit 045f6cfa93721cf93e11f1935b74f8ae2be1ffff
Author: Raúl Gutiérrez Segalés <rg...@...>
Date: 2015-12-10T05:28:45Z
ZOOKEEPER-2340: JMX is disabled even if JMXDISABLE is false
(Arshad Mohammad via rgs)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1719012 13f79535-47bb-0310-9956-ffa450edef68
commit d9c45357f47db932583164a2d86435dc97bc620f
Author: Chris Nauroth <cn...@...>
Date: 2015-12-10T20:43:47Z
ZOOKEEPER-2252: Random test case failure in org.apache.zookeeper.test.StaticHostProviderTest (Timothy Ward via cnauroth)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1719205 13f79535-47bb-0310-9956-ffa450edef68
commit a1d16770cebe4dc2efe735e8d558ea5af0303296
Author: Chris Nauroth <cn...@...>
Date: 2015-12-11T20:14:34Z
ZOOKEEPER-1029: C client bug in zookeeper_init (if bad hostname is given) (fpj via cnauroth)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1719529 13f79535-47bb-0310-9956-ffa450edef68
commit dcef4edfdeb9eec4d606c43c61afd6bc6cd49652
Author: Chris Nauroth <cn...@...>
Date: 2015-12-15T19:16:44Z
ZOOKEEPER-412: checkstyle target fails trunk build (Akihiro Suda via cnauroth)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1720228 13f79535-47bb-0310-9956-ffa450edef68
commit b63968998522a04bd59108547495d0031938d8c5
Author: Rakesh Radhakrishnan <ra...@...>
Date: 2016-01-21T06:08:51Z
ZOOKEEPER-2297: NPE is thrown while creating "key manager" and "trust manager" (Arshad Mohammad via rakeshr)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1725873 13f79535-47bb-0310-9956-ffa450edef68
commit bbc36ee6df43a97a37ba2aa6f5a0c170ba88b3bf
Author: Rakesh Radhakrishnan <ra...@...>
Date: 2016-01-23T05:08:02Z
Revert ZOOKEEPER-2297
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1726355 13f79535-47bb-0310-9956-ffa450edef68
commit 50708395865f01b8cb028a34c67c5e4f35944426
Author: Chris Nauroth <cn...@...>
Date: 2016-02-05T00:31:57Z
ZOOKEEPER-2360: Update commons collections version used by tests/releaseaudit (phunt via cnauroth)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1728578 13f79535-47bb-0310-9956-ffa450edef68
commit ba333d65ee63e1f1309a4366b6c5ccf0d276eb70
Author: Chris Nauroth <cn...@...>
Date: 2016-02-08T21:32:46Z
ZOOKEEPER-2243: Supported platforms is completely out of date (cnauroth)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1729260 13f79535-47bb-0310-9956-ffa450edef68
commit 6da8deae6d5e6243ad954aa0f01b5cdd52ffc2bb
Author: Rakesh Radhakrishnan <ra...@...>
Date: 2016-03-02T06:47:30Z
ZOOKEEPER-2375: Prevent multiple initialization of login object in each ZooKeeperSaslClient instance (yuemeng via rakeshr)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733222 13f79535-47bb-0310-9956-ffa450edef68
commit 951d604430dc7a3e1b2a2f7a213d30e18cb176ed
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-02T18:27:11Z
ZOOKEEPER-1991 zkServer.sh returns with a zero exit status when a ZooKeeper process is already running (gsbiju via phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733347 13f79535-47bb-0310-9956-ffa450edef68
commit 2800005e78bb05f18b87e5442a2a14491f1f1e34
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-03T16:13:28Z
ZOOKEEPER-1604 remove rpm/deb/... packaging (cnauroth via phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733490 13f79535-47bb-0310-9956-ffa450edef68
commit 1b35706758786c8db709a4275bdb93f235bfb512
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-03T17:26:56Z
ZOOKEEPER-2294 Ant target generate-clover-reports is broken (charlie via phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733500 13f79535-47bb-0310-9956-ffa450edef68
commit 202283397ee6e9c35bba09609bc64158578e5f00
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-03T17:55:08Z
ZOOKEEPER-2378 upgrade ivy to recent version (phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733506 13f79535-47bb-0310-9956-ffa450edef68
commit 0c28ad2e59db543aea60930b0517aca1d88464ef
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-03T17:57:07Z
ZOOKEEPER-2373 Licenses section missing from pom file (phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733509 13f79535-47bb-0310-9956-ffa450edef68
commit 8fe6b1a1b6229c4acc06a6b906cd8a247a9d913e
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-03T21:16:52Z
ZOOKEEPER-2373 Licenses section missing from pom file - part 2 missed an added file (phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733526 13f79535-47bb-0310-9956-ffa450edef68
commit d7d5f9906fe9052ba8200b7faa03d1361a092304
Author: Chris Nauroth <cn...@...>
Date: 2016-03-05T00:04:52Z
ZOOKEEPER-2379: recent commit broke findbugs qabot check (rakeshr via cnauroth)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1733680 13f79535-47bb-0310-9956-ffa450edef68
commit abad94eebf550d4aab1687b4ce200853d323fe1c
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-10T04:29:10Z
ZOOKEEPER-2087 Few UX improvements in ZooInspector (Adam Dudczak via phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1734347 13f79535-47bb-0310-9956-ffa450edef68
commit e3e68b1d4ffaf1409e74a31eb3365ce20ff956a0
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-11T06:34:35Z
ZOOKEEPER-2133 zkperl: Segmentation fault if getting a node with null value (Botond Hejj via phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1734499 13f79535-47bb-0310-9956-ffa450edef68
commit 3767a3fe7334d2d9aeae31b37442c3bb18ebc7eb
Author: Patrick D. Hunt <ph...@...>
Date: 2016-03-11T06:48:20Z
Added some CHANGES details that I missed in recent commits. (phunt)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1734502 13f79535-47bb-0310-9956-ffa450edef68
----
---
[GitHub] zookeeper pull request #625: ZOOKEEPER-2122: add openssl to zookeeper c clie...
Posted by roodkcab <gi...@git.apache.org>.
Github user roodkcab closed the pull request at:
https://github.com/apache/zookeeper/pull/625
---
[GitHub] zookeeper issue #625: Ssl client
Posted by roodkcab <gi...@git.apache.org>.
Github user roodkcab commented on the issue:
https://github.com/apache/zookeeper/pull/625


---
[GitHub] zookeeper issue #625: Ssl client
Posted by hanm <gi...@git.apache.org>.
Github user hanm commented on the issue:
https://github.com/apache/zookeeper/pull/625
I don't have a local environment to test C client at the moment, but from Jenkins, this pull request does not build:
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:307:9: error: passing argument 1 of 'SSL_write' from incompatible pointer type [-Werror]
[exec] [exec] return (ssize_t)SSL_write(fd->ssl_sock, buf, (int)len);
[exec] [exec] ^
[exec] [exec] In file included from /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:45:0:
[exec] [exec] /usr/include/openssl/ssl.h:1860:6: note: expected 'struct SSL *' but argument is of type 'int *'
[exec] [exec] int SSL_write(SSL *ssl,const void *buf,int num);
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c: In function 'zookeeper_recv':
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:315:9: error: passing argument 1 of 'SSL_read' from incompatible pointer type [-Werror]
[exec] [exec] return (ssize_t)SSL_read(fd->ssl_sock, buf, (int)len);
[exec] [exec] ^
[exec] [exec] In file included from /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:45:0:
[exec] [exec] /usr/include/openssl/ssl.h:1858:6: note: expected 'struct SSL *' but argument is of type 'int *'
[exec] [exec] int SSL_read(SSL *ssl,void *buf,int num);
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c: In function 'close_zsock':
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:550:9: error: passing argument 1 of 'SSL_free' from incompatible pointer type [-Werror]
[exec] [exec] SSL_free(fd->ssl_sock);
[exec] [exec] ^
[exec] [exec] In file included from /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:45:0:
[exec] [exec] /usr/include/openssl/ssl.h:1855:6: note: expected 'struct SSL *' but argument is of type 'int *'
[exec] [exec] void SSL_free(SSL *ssl);
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:552:9: error: passing argument 1 of 'SSL_CTX_free' from incompatible pointer type [-Werror]
[exec] [exec] SSL_CTX_free(fd->ssl_ctx);
[exec] [exec] ^
[exec] [exec] In file included from /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:45:0:
[exec] [exec] /usr/include/openssl/ssl.h:1681:6: note: expected 'struct SSL_CTX *' but argument is of type 'int *'
[exec] [exec] void SSL_CTX_free(SSL_CTX *);
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c: In function 'zookeeper_ssl_init':
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:1285:5: error: initialization discards 'const' qualifier from pointer target type [-Werror]
[exec] [exec] zcert_t *c = &((zcert_t) {.ca = ca, .cert = cert, .key = key, .passwd = passwd});
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:1285:5: error: initialization discards 'const' qualifier from pointer target type [-Werror]
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:1285:5: error: initialization discards 'const' qualifier from pointer target type [-Werror]
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:1285:5: error: initialization discards 'const' qualifier from pointer target type [-Werror]
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c: In function 'zookeeper_ssl_init2':
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:1293:5: error: passing argument 8 of 'zookeeper_init_internal' from incompatible pointer type [-Werror]
[exec] [exec] return zookeeper_init_internal(host, watcher, recv_timeout, clientid, context, flags, log_callback, cert);
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:1146:19: note: expected 'struct zcert_t *' but argument is of type 'const char *'
[exec] [exec] static zhandle_t *zookeeper_init_internal(const char *host, watcher_fn watcher,
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c: In function 'zookeeper_connect':
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:2299:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
[exec] [exec] int err = SSL_ERROR_NONE;
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:2304:26: error: assignment from incompatible pointer type [-Werror]
[exec] [exec] zh->fd->ssl_sock = ssl;
[exec] [exec] ^
[exec] [exec] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/src/zookeeper.c:2305:25: error: assignment from incompatible pointer type [-Werror]
[exec] [exec] zh->fd->ssl_ctx = ctx;
[exec] [exec] ^
[exec] [exec] cc1: all warnings being treated as errors
[exec] [exec] make: *** [zookeeper.lo] Error 1
---
[GitHub] zookeeper issue #625: Ssl client
Posted by enixon <gi...@git.apache.org>.
Github user enixon commented on the issue:
https://github.com/apache/zookeeper/pull/625
I don't have the expertise to review this thoroughly but it's pretty cool to get SSL support on C as well.
---
[GitHub] zookeeper issue #625: Ssl client
Posted by roodkcab <gi...@git.apache.org>.
Github user roodkcab commented on the issue:
https://github.com/apache/zookeeper/pull/625
I added openssl to zookeeper's c client, it's more like a wrapper to the plain socket, I changed the file descriptor from a socket_t to zsock_t in _zhandle, it contains ssl context and a struct named zcert_t which provides the location of rootCA, client's cert, client's key and password to the key.
---
[GitHub] zookeeper issue #625: Ssl client
Posted by roodkcab <gi...@git.apache.org>.
Github user roodkcab commented on the issue:
https://github.com/apache/zookeeper/pull/625
@hanm no problem, I will rebase to master and try to pass jenkins automatic build today.
---
[GitHub] zookeeper issue #625: ZOOKEEPER-2122: add openssl to zookeeper c client to s...
Posted by roodkcab <gi...@git.apache.org>.
Github user roodkcab commented on the issue:
https://github.com/apache/zookeeper/pull/625
I'll make it as a submodule, since a static lib is quite big and I couldn't test it on Windows.
---
[GitHub] zookeeper issue #625: Ssl client
Posted by roodkcab <gi...@git.apache.org>.
Github user roodkcab commented on the issue:
https://github.com/apache/zookeeper/pull/625
I got a problem here, as you know I use openssl for supporting double side certificate, so I have quite a few options here to use openssl's code.
1. put openssl code directly in src directory or make it as a git submodule, and let CMake compile it as dependency.
2. compile a static lib and link it.
which one do u prefer? @hanm any suggestion?
---
[GitHub] zookeeper issue #625: Ssl client
Posted by hanm <gi...@git.apache.org>.
Github user hanm commented on the issue:
https://github.com/apache/zookeeper/pull/625
@roodkcab Could you please update the target branch of your pull request from `3.5.4` to `master`? `3.5.4` is a released branch and is considered read only.
---