protected SSLSessionStrategy getSslStrategy(RequiredAuthType authType) {
        try {
            if (authType == RequiredAuthType.MTLS) {
                if (mutualAuthSslStrategy == null) {
                    mutualAuthSslStrategy = SSLSessionStrategyFactory.buildMutual(tlsOptions);
                }
                return mutualAuthSslStrategy;
            } else {
                if (standardSslStrategy == null) {
                    if (tlsOptions.isDevMode()) {
                        standardSslStrategy = SSLSessionStrategyFactory.buildUnsafe();
                    } else {
                        standardSslStrategy = SSLSessionStrategyFactory.buildStandard(tlsOptions);
                    }
                }
                return standardSslStrategy;
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
protected SSLSessionStrategy getSslStrategy ( RequiredAuthType authType ) { try { if ( authType == RequiredAuthType . MTLS ) { if ( mutualAuthSslStrategy == null ) { mutualAuthSslStrategy = SSLSessionStrategyFactory . buildMutual ( tlsOptions ) ; } return mutualAuthSslStrategy ; } else { if ( standardSslStrategy == null ) { if ( tlsOptions . isDevMode ( ) ) { standardSslStrategy = SSLSessionStrategyFactory . buildUnsafe ( ) ; } else { standardSslStrategy = SSLSessionStrategyFactory . buildStandard ( tlsOptions ) ; } } return standardSslStrategy ; } } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Creates the SSL strategy based on configured TLS options.
@param authType
@return an appropriate SSL strategy