test_class.declarator: folder = new TemporaryFolder()
test_class.modifier: @Rule
    public
test_class.original_string: @Rule
    public TemporaryFolder folder = new TemporaryFolder();
test_class.type: TemporaryFolder
test_class.var_name: folder
test_class.file: outland-feature-java/src/test/java/outland/feature/CertificateLoaderTest.java
test_class.identifier: CertificateLoaderTest
test_case.body: @Test
    public void build() {
      OkHttpClient.Builder builder = new OkHttpClient.Builder();
      CertificateLoader securitySupport =
          new CertificateLoader("classpath:certs");
  
      try {
        securitySupport.applySslSocketFactory(builder);
        OkHttpClient build = builder.build();
  
        Request request = new Request.Builder()
            .url("https://helloworld.letsencrypt.org")
            .get()
            .build();
  
        build.newCall(request).execute();
      } catch (Exception e) {
        fail("expected custom letsencrypt install to succeed " + e.getMessage());
      }
    }
test_case.class_method_signature: CertificateLoaderTest.build()
test_case.full_signature: @Test public void build()
test_case.identifier: build
test_case.invocations: applySslSocketFactory build build get url execute newCall fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void build()
focal_class.declarator: logger = LoggerFactory.getLogger("FeatureClient")
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger("FeatureClient");
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: certificatePath
focal_class.modifier: private final
focal_class.original_string: private final String certificatePath;
focal_class.type: String
focal_class.var_name: certificatePath
focal_class.declarator: sslContext
focal_class.modifier: private
focal_class.original_string: private SSLContext sslContext;
focal_class.type: SSLContext
focal_class.var_name: sslContext
focal_class.declarator: trustManager
focal_class.modifier: private
focal_class.original_string: private X509TrustManager trustManager;
focal_class.type: X509TrustManager
focal_class.var_name: trustManager
focal_class.file: outland-feature-java/src/main/java/outland/feature/CertificateLoader.java
focal_class.identifier: CertificateLoader
focal_class.class_method_signature: CertificateLoader.CertificateLoader(String certificatePath)
focal_class.full_signature:   CertificateLoader(String certificatePath)
focal_class.identifier: CertificateLoader
focal_class.parameters: (String certificatePath)
focal_class.signature:  CertificateLoader(String certificatePath)
focal_class.class_method_signature: CertificateLoader.getResourceUrl(String resourceName)
focal_class.full_signature: private static URL getResourceUrl(String resourceName)
focal_class.identifier: getResourceUrl
focal_class.modifiers: private static
focal_class.parameters: (String resourceName)
focal_class.return: URL
focal_class.signature: URL getResourceUrl(String resourceName)
focal_class.class_method_signature: CertificateLoader.resolvePath(String certificatePath)
focal_class.full_signature: @VisibleForTesting static Path resolvePath(String certificatePath)
focal_class.identifier: resolvePath
focal_class.modifiers: @VisibleForTesting static
focal_class.parameters: (String certificatePath)
focal_class.return: Path
focal_class.signature: Path resolvePath(String certificatePath)
focal_class.class_method_signature: CertificateLoader.applySslSocketFactory(OkHttpClient.Builder builder)
focal_class.full_signature:  void applySslSocketFactory(OkHttpClient.Builder builder)
focal_class.identifier: applySslSocketFactory
focal_class.parameters: (OkHttpClient.Builder builder)
focal_class.return: void
focal_class.signature: void applySslSocketFactory(OkHttpClient.Builder builder)
focal_class.class_method_signature: CertificateLoader.create(String certificatePath)
focal_class.full_signature: private void create(String certificatePath)
focal_class.identifier: create
focal_class.modifiers: private
focal_class.parameters: (String certificatePath)
focal_class.return: void
focal_class.signature: void create(String certificatePath)
focal_class.class_method_signature: CertificateLoader.create(Path path)
focal_class.full_signature: private void create(Path path)
focal_class.identifier: create
focal_class.modifiers: private
focal_class.parameters: (Path path)
focal_class.return: void
focal_class.signature: void create(Path path)
focal_class.class_method_signature: CertificateLoader.installCertificates(Path path, KeyStore keyStore)
focal_class.full_signature: private void installCertificates(Path path, KeyStore keyStore)
focal_class.identifier: installCertificates
focal_class.modifiers: private
focal_class.parameters: (Path path, KeyStore keyStore)
focal_class.return: void
focal_class.signature: void installCertificates(Path path, KeyStore keyStore)
focal_class.class_method_signature: CertificateLoader.sslContext()
focal_class.full_signature:  SSLContext sslContext()
focal_class.identifier: sslContext
focal_class.parameters: ()
focal_class.return: SSLContext
focal_class.signature: SSLContext sslContext()
focal_class.class_method_signature: CertificateLoader.trustManager()
focal_class.full_signature:  X509TrustManager trustManager()
focal_class.identifier: trustManager
focal_class.parameters: ()
focal_class.return: X509TrustManager
focal_class.signature: X509TrustManager trustManager()
focal_method.body: void applySslSocketFactory(OkHttpClient.Builder builder)
        throws FeatureException {
  
      try {
        MDC.put("security_context", "[security_support]");
        if (certificatePath == null) {
          logger.info("no custom certificate path supplied, using system default");
          return;
        }
  
        builder.sslSocketFactory(sslContext.getSocketFactory(), trustManager);
        logger.info("ok, custom socket factory and trust manager added to builder");
      } finally {
        MDC.remove("security_context");
      }
    }
focal_method.class_method_signature: CertificateLoader.applySslSocketFactory(OkHttpClient.Builder builder)
focal_method.full_signature:  void applySslSocketFactory(OkHttpClient.Builder builder)
focal_method.identifier: applySslSocketFactory
focal_method.invocations: put info sslSocketFactory getSocketFactory info remove
focal_method.parameters: (OkHttpClient.Builder builder)
focal_method.return: void
focal_method.signature: void applySslSocketFactory(OkHttpClient.Builder builder)