yuz10 opened a new pull request, #501:
URL: https://github.com/apache/rocketmq-client-cpp/pull/501

   ## What is the purpose of the change
   
   1. C client support enable SSL.
   2. Support ignore SSL verification using properties file
   
   ## Brief changelog
   
   
   This pull request introduces SSL (Secure Sockets Layer) support across 
various components of the RocketMQ client library. The changes include new 
methods and properties to enable SSL, configure SSL settings, and integrate SSL 
verification options. The updates span producers, consumers, and the transport 
layer, enhancing security capabilities in the library.
   
   ### SSL Support for Producers and Consumers:
   
   * 
[`include/CProducer.h`](diffhunk://#diff-b043def07001bfdada29bd410a49eb0598a92e26088c43a94e4ddfec25a3f537L66-R68):
 Added `SetProducerSsl` and `SetProducerSslPropertyFile` methods to enable SSL 
and specify the SSL property file for producers. Fixed a parameter name in 
`SetProducerMessageTrace`.
   * 
[`include/CPullConsumer.h`](diffhunk://#diff-24a0fda507a6b1d673139d23dc9af273f57eabd4dc166a6f1c67a903c0e0eafeR49-R50):
 Added `SetPullConsumerSsl` and `SetPullConsumerSslPropertyFile` methods for 
enabling SSL and specifying the SSL property file for pull consumers.
   * 
[`include/CPushConsumer.h`](diffhunk://#diff-050297a41bb7836c401922af4505d5ea6ea05e752aa3443e157d86d63f0fadbaR63-R64):
 Added `SetPushConsumerSsl` and `SetPushConsumerSslPropertyFile` methods for 
enabling SSL and specifying the SSL property file for push consumers.
   
   ### TransactionMQProducer Enhancements:
   
   * 
[`include/TransactionMQProducer.h`](diffhunk://#diff-7d0c5c15d980ea3b8e9c9baf14a6dc054507e1865e7ccb46c45d52467e1e1958R84-R87):
 Added `setEnableSsl`, `getEnableSsl`, `setSslPropertyFile`, and 
`getSslPropertyFile` methods to manage SSL settings for transactional producers.
   * 
[`src/producer/TransactionMQProducer.cpp`](diffhunk://#diff-cf20a45487bf648f78feb35aaad37735a4d27e53f5e0b6b2bee18f8d144233fbR169-R180):
 Implemented the corresponding methods to handle SSL enablement and property 
file configuration.
   
   ### Implementation of SSL Methods:
   
   * 
[`src/extern/CProducer.cpp`](diffhunk://#diff-90da5c7b516b9a4d333786fa8f8bc5a0ae741bc3f0cb9644966c147087acbbb3R819-R856):
 Implemented `SetProducerSsl` and `SetProducerSslPropertyFile` methods, 
ensuring proper handling of SSL settings for different producer types.
   * 
[`src/extern/CPullConsumer.cpp`](diffhunk://#diff-8eebbfc554dd82401ebfb4a042db9fba468c4495d365978b4fc220da106a0edcR138-R154):
 Added implementations for `SetPullConsumerSsl` and 
`SetPullConsumerSslPropertyFile` methods.
   * 
[`src/extern/CPushConsumer.cpp`](diffhunk://#diff-5683b7bc0d7fc77d6f4192fa3e0e51ee62e142340ad00a67fd11d704db4281faR309-R326):
 Added implementations for `SetPushConsumerSsl` and 
`SetPushConsumerSslPropertyFile` methods.
   
   ### Transport Layer SSL Configuration:
   
   * 
[`src/transport/EventLoop.cpp`](diffhunk://#diff-108d3a9365dace098f720bb7817c43f2c8e04e99899e103276e3efb4a78560d0R127):
 Updated SSL context creation to include a new `tls.client.verify` property, 
allowing users to disable peer verification by setting it to "false". Enhanced 
flexibility in SSL verification settings. 
[[1]](diffhunk://#diff-108d3a9365dace098f720bb7817c43f2c8e04e99899e103276e3efb4a78560d0R127)
 
[[2]](diffhunk://#diff-108d3a9365dace098f720bb7817c43f2c8e04e99899e103276e3efb4a78560d0R142-R157)
   
   ## Verifying this change
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily. Notice, `it would be helpful if you could finish the following 5 
checklist(the last one is not necessary)before request the community to review 
your PR`.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change (usually 
before you start working on it). Trivial changes like typos do not require a 
Github issue. Your pull request should address just this issue, without pulling 
in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException 
when host config not exist`. Each commit in the pull request should have a 
meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic 
correction, more mock a little better when a cross-module dependency exists.
   - [ ] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to