|
|
|
https://issues.apache.org/activemq/secure/attachment/16326/amq-411-complex-version.patch
This file is for ActiveMQ 4.1.1 I have tested this file locally and it works for me. In this version Boolean properties are used instead of just boolean. This makes it possible to distinguish between true, false, and null. Corresponding to the underlying properties being set to true, false or not set at all. https://issues.apache.org/activemq/secure/attachment/16327/amq-411-simple-version.patch
This file is for ActiveMQ 4.1.1 I have tested this file locally and it works for me. In this version only boolean properties are used. This make it impossible to know if the property was set on the Transport URL or not. My personal belief is the complex version is better, but I supplied both as I'm unsure how the maintainers would like to see the issue resolved. https://issues.apache.org/activemq/secure/attachment/16328/amq-500-complex-version.patch
This file is for ActiveMQ 5.0.0 I have NOT TESTED this on ActiveMQ 5, but the looking at the source code, I think the issue is there. This patch does compile. In this version Boolean properties are used instead of just boolean. This makes it possible to distinguish between true, false, and null. Corresponding to the underlying properties being set to true, false or not set at all. https://issues.apache.org/activemq/secure/attachment/16329/amq-500-simple-version.patch
This file is for ActiveMQ 5.0.0 I have NOT TESTED this on ActiveMQ 5, but the looking at the source code, I think the issue is there. This patch does compile. In this version only boolean properties are used. This make it impossible to know if the property was set on the Transport URL or not. My personal belief is the complex version is better, but I supplied both as I'm unsure how the maintainers would like to see the issue resolved. In the past I've fixed this bug (in other projects) like this:
public void bind() throws IOException { which to me corresponds better to natural language usage like "I not only want client auth, I need it!" Is there some reason you think that setting both flags true should be disallowed? with luck 4.1.2 is out the door.... should be able to get it in 5.1.0 though
The test needed quite a bit of fixing up also. The proposed patches would definitely have broken the tests as they test all 4 combinations, and do not expect an exception if both flags are true.
4.1 rev 646928 trunk rev 646936 The reason I though throwing an exception was a good idea was, in That being said, I prefer the approach that you took. Because from I'm sorry I didn't run the tests, that was a lapse of judgment on my part. Would it be possible to update this page: Quick Check List: All of these are obvious, but it never hurts, to remind everyone. Thank you very much for fixing this in time for ActiveMQ 4.1.2. I Regards, |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportServer.java public void bind() throws IOException { super.bind(); ((SSLServerSocket)this.serverSocket).setWantClientAuth(wantClientAuth); ((SSLServerSocket)this.serverSocket).setNeedClientAuth(needClientAuth); <--- This overrides setWantClientAuth }