You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/04/08 01:38:11 UTC

[james-project] 06/08: JAMES-3738 Encryption: annotates methods visible for testing

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit fa93ef5afae14181eba0e8818321bb685c2637b7
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Mar 23 10:30:06 2022 +0700

    JAMES-3738 Encryption: annotates methods visible for testing
---
 .../src/main/java/org/apache/james/protocols/netty/Encryption.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/protocols/netty/src/main/java/org/apache/james/protocols/netty/Encryption.java b/protocols/netty/src/main/java/org/apache/james/protocols/netty/Encryption.java
index 89dbda0d96..95baeda558 100644
--- a/protocols/netty/src/main/java/org/apache/james/protocols/netty/Encryption.java
+++ b/protocols/netty/src/main/java/org/apache/james/protocols/netty/Encryption.java
@@ -25,6 +25,8 @@ import javax.net.ssl.SSLEngine;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.james.protocols.api.ClientAuth;
 
+import com.google.common.annotations.VisibleForTesting;
+
 import io.netty.handler.ssl.SslHandler;
 
 /**
@@ -32,6 +34,7 @@ import io.netty.handler.ssl.SslHandler;
  */
 public interface Encryption {
 
+    @VisibleForTesting
     static Encryption createTls(SSLContext context) {
         return createTls(context, null, ClientAuth.NONE);
     }
@@ -49,6 +52,7 @@ public interface Encryption {
         return new Encryption.LegacyJavaEncryption(context, false, enabledCipherSuites, clientAuth);
     }
 
+    @VisibleForTesting
     static Encryption createStartTls(SSLContext context) {
         return createStartTls(context, null, ClientAuth.NONE);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org