Tabnine Logo
AuthenticationDataProvider.getTlsCertificates
Code IndexAdd Tabnine to your IDE (free)

How to use
getTlsCertificates
method
in
org.apache.pulsar.client.api.AuthenticationDataProvider

Best Java code snippets using org.apache.pulsar.client.api.AuthenticationDataProvider.getTlsCertificates (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: apache/pulsar

  public void initChannel(SocketChannel ch) throws Exception {
    if (conf.isUseTls()) {
      SslContext sslCtx;
      // Set client certificate if available
      AuthenticationDataProvider authData = conf.getAuthentication().getAuthData();
      if (authData.hasDataForTls()) {
        sslCtx = SecurityUtility.createNettySslContextForClient(conf.isTlsAllowInsecureConnection(),
            conf.getTlsTrustCertsFilePath(), (X509Certificate[]) authData.getTlsCertificates(),
            authData.getTlsPrivateKey());
      } else {
        sslCtx = SecurityUtility.createNettySslContextForClient(conf.isTlsAllowInsecureConnection(),
            conf.getTlsTrustCertsFilePath());
      }
      ch.pipeline().addLast(TLS_HANDLER, sslCtx.newHandler(ch.alloc()));
      ch.pipeline().addLast("ByteBufPairEncoder", ByteBufPair.COPYING_ENCODER);
    } else {
      ch.pipeline().addLast("ByteBufPairEncoder", ByteBufPair.ENCODER);
    }
    ch.pipeline().addLast("frameDecoder", new LengthFieldBasedFrameDecoder(MaxMessageSize, 0, 4, 0, 4));
    ch.pipeline().addLast("handler", clientCnxSupplier.get());
  }
});
origin: apache/pulsar

if (authData.hasDataForTls()) {
  sslCtx = SecurityUtility.createNettySslContextForClient(tlsAllowInsecureConnection, tlsTrustCertsFilePath,
      authData.getTlsCertificates(), authData.getTlsPrivateKey());
} else {
  sslCtx = SecurityUtility.createNettySslContextForClient(tlsAllowInsecureConnection, tlsTrustCertsFilePath);
origin: org.apache.pulsar/pulsar-client-original

  public void initChannel(SocketChannel ch) throws Exception {
    if (conf.isUseTls()) {
      SslContext sslCtx;
      // Set client certificate if available
      AuthenticationDataProvider authData = conf.getAuthentication().getAuthData();
      if (authData.hasDataForTls()) {
        sslCtx = SecurityUtility.createNettySslContextForClient(conf.isTlsAllowInsecureConnection(),
            conf.getTlsTrustCertsFilePath(), (X509Certificate[]) authData.getTlsCertificates(),
            authData.getTlsPrivateKey());
      } else {
        sslCtx = SecurityUtility.createNettySslContextForClient(conf.isTlsAllowInsecureConnection(),
            conf.getTlsTrustCertsFilePath());
      }
      ch.pipeline().addLast(TLS_HANDLER, sslCtx.newHandler(ch.alloc()));
      ch.pipeline().addLast("ByteBufPairEncoder", ByteBufPair.COPYING_ENCODER);
    } else {
      ch.pipeline().addLast("ByteBufPairEncoder", ByteBufPair.ENCODER);
    }
    ch.pipeline().addLast("frameDecoder", new LengthFieldBasedFrameDecoder(MaxMessageSize, 0, 4, 0, 4));
    ch.pipeline().addLast("handler", clientCnxSupplier.get());
  }
});
origin: org.apache.pulsar/pulsar-proxy

  @Override
  protected void initChannel(SocketChannel ch) throws Exception {
    if (config.isTlsEnabledWithBroker()) {
      SslContext sslCtx;
      // Set client certificate if available
      AuthenticationDataProvider authData = authentication.getAuthData();
      if (authData.hasDataForTls()) {
        sslCtx = SecurityUtility.createNettySslContextForClient(config.isTlsAllowInsecureConnection(),
            config.getBrokerClientTrustCertsFilePath(),
            (X509Certificate[]) authData.getTlsCertificates(), authData.getTlsPrivateKey());
      } else {
        sslCtx = SecurityUtility.createNettySslContextForClient(config.isTlsAllowInsecureConnection(),
            config.getBrokerClientTrustCertsFilePath());
      }
      ch.pipeline().addLast(TLS_HANDLER, sslCtx.newHandler(ch.alloc()));
    }
    ch.pipeline().addLast("frameDecoder",
        new LengthFieldBasedFrameDecoder(PulsarDecoder.MaxFrameSize, 0, 4, 0, 4));
    ch.pipeline().addLast("proxyOutboundHandler", new ProxyBackendHandler(config, protocolVersion));
  }
});
origin: org.apache.pulsar/pulsar-proxy

  config.isTlsAllowInsecureConnection(),
  trustCertificates,
  authData.getTlsCertificates(),
  authData.getTlsPrivateKey()
);
origin: org.apache.pulsar/pulsar-client-original

if (authData.hasDataForTls()) {
  sslCtx = SecurityUtility.createNettySslContextForClient(tlsAllowInsecureConnection, tlsTrustCertsFilePath,
      authData.getTlsCertificates(), authData.getTlsPrivateKey());
} else {
  sslCtx = SecurityUtility.createNettySslContextForClient(tlsAllowInsecureConnection, tlsTrustCertsFilePath);
origin: org.apache.pulsar/pulsar-client-admin-original

if (authData.hasDataForTls()) {
  sslCtx = SecurityUtility.createSslContext(clientConfigData.isTlsAllowInsecureConnection(),
      trustCertificates, authData.getTlsCertificates(), authData.getTlsPrivateKey());
} else {
  sslCtx = SecurityUtility.createSslContext(clientConfigData.isTlsAllowInsecureConnection(),
org.apache.pulsar.client.apiAuthenticationDataProvidergetTlsCertificates

Popular methods of AuthenticationDataProvider

  • getHttpHeaders
  • getTlsPrivateKey
  • hasDataForHttp
    Check if data for HTTP are available.
  • hasDataForTls
    Check if data for TLS are available.
  • getCommandData
  • hasDataFromCommand
    Check if data from Pulsar protocol are available.

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now