File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
src/main/java/org/kitteh/irc/client/library Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,7 @@ enum SecurityType {
254254 *
255255 * @param factory trust manager supplier
256256 * @return this builder
257+ * @throws IllegalArgumentException if providing an insecure factory while the STS storage manager is set
257258 * @see #secure(boolean)
258259 */
259260 @ NonNull Server secureTrustManagerFactory (@ Nullable TrustManagerFactory factory );
Original file line number Diff line number Diff line change @@ -147,6 +147,9 @@ private class ServerImpl implements Server {
147147
148148 @ Override
149149 public @ NonNull Server secureTrustManagerFactory (@ Nullable TrustManagerFactory factory ) {
150+ if (DefaultBuilder .this .stsStorageManager != null ) {
151+ Sanity .truthiness (!SslUtil .isInsecure (factory ), "Cannot use STS with an insecure trust manager." );
152+ }
150153 DefaultBuilder .this .secureTrustManagerFactory = factory ;
151154 return this ;
152155 }
You can’t perform that action at this time.
0 commit comments