class HttpContextAttributeSSLContextSelector extends ComponentSupport implements SSLContextSelector {

  @Override
  public SSLContext select(final HttpContext context) {
    Object useTrustStore = context.getAttribute(SSLContextSelector.USE_TRUST_STORE);
    if (Boolean.TRUE.equals(useTrustStore)) {
      return trustStore.getSSLContext();
    }
    return null;
  }

  @Inject public  HttpContextAttributeSSLContextSelector(final TrustStore trustStore);

}