docs: @SuppressWarnings( "deprecation" )
      private static SecurityPlan createSecurityPlanImpl( BoltServerAddress address, Config config )
              throws GeneralSecurityException, IOException
      {
          if ( config.encrypted() )
          {
              Logger logger = config.logging().getLog( "SecurityPlan" );
              Config.TrustStrategy trustStrategy = config.trustStrategy();
              boolean hostnameVerificationEnabled = trustStrategy.isHostnameVerificationEnabled();
              switch ( trustStrategy.strategy() )
              {
              case TRUST_ON_FIRST_USE:
                  logger.warn(
                          "Option `TRUST_ON_FIRST_USE` has been deprecated and will be removed in a future " +
                          "version of the driver. Please switch to use `TRUST_ALL_CERTIFICATES` instead." );
                  return SecurityPlan.forTrustOnFirstUse( trustStrategy.certFile(), hostnameVerificationEnabled, address, logger );
              case TRUST_SIGNED_CERTIFICATES:
                  logger.warn(
                          "Option `TRUST_SIGNED_CERTIFICATE` has been deprecated and will be removed in a future " +
                          "version of the driver. Please switch to use `TRUST_CUSTOM_CA_SIGNED_CERTIFICATES` instead." );
                  // intentional fallthrough
  
              case TRUST_CUSTOM_CA_SIGNED_CERTIFICATES:
                  return SecurityPlan.forCustomCASignedCertificates( trustStrategy.certFile(), hostnameVerificationEnabled );
              case TRUST_SYSTEM_CA_SIGNED_CERTIFICATES:
                  return SecurityPlan.forSystemCASignedCertificates( hostnameVerificationEnabled );
              case TRUST_ALL_CERTIFICATES:
                  return SecurityPlan.forAllCertificates( hostnameVerificationEnabled );
              default:
                  throw new ClientException(
                          "Unknown TLS authentication strategy: " + trustStrategy.strategy().name() );
              }
          }
          else
          {
              return insecure();
          }
      }