You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/09/20 10:14:31 UTC

[GitHub] [qpid-broker-j] alex-rufous edited a comment on issue #37: QPID-8354 Blacklist TLSv1.1

alex-rufous edited a comment on issue #37: QPID-8354 Blacklist TLSv1.1
URL: https://github.com/apache/qpid-broker-j/pull/37#issuecomment-533495226
 
 
   Tomas,
   The suggested changes look good to me.
   
   Though, I would add a positive test for TLSv1.3 in order to be consistent with the rest of the test code. The challenge here is to identify java version in order to add assumption checks to the tests . I would go with a very simplistic approach, for example, try to load any new class which was introduced in java 11. Here is the code for my suggestion;
   
   `
       private boolean isJava11OrAbove()
       {
           try
           {
               // introduced in java 11
               Class.forName("java.net.http.HttpClient");
               return true;
           }
           catch (ClassNotFoundException e)
           {
               return false;
           }
       }
   `
   
   Using the above you can write tests as illustrated below
   `
   @Test
       public void testTLSv1_3SupportOnSSLOnlyPort() throws Exception
       {
           assumeThat("Java 11 or above is required", isJava11OrAbove(), is(true));
           checkSSLExcluded("TLSv1.3", Transport.SSL);
       }
   `
   
   Also, as you started to refactor test code, I would like to suggest to rename test method `#checkSSLExcluded` into `checkHandshakeWithTlsProtocol`. I think, it would be a better name, which would be telling exactly what method does.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org