Tabnine Logo
X509CertificateChain.getChain
Code IndexAdd Tabnine to your IDE (free)

How to use
getChain
method
in
ca.nrc.cadc.auth.X509CertificateChain

Best Java code snippets using ca.nrc.cadc.auth.X509CertificateChain.getChain (Showing top 9 results out of 315)

origin: org.opencadc/cadc-vosi

Date end = null;
Principal principal = null;
for (X509Certificate c : chain.getChain())
origin: org.opencadc/cadc-cdp

private X509Certificate[] createProxyCertChain(X509Certificate cert)
{
  AccessControlContext ac = AccessController.getContext();
  Subject subject = Subject.getSubject(ac);
  if (subject != null)
  {
    Set<X509CertificateChain> cc = subject.getPublicCredentials(X509CertificateChain.class);
    if (cc.size() > 0)
    {
      X509CertificateChain xcc = cc.iterator().next();
      X509Certificate[] chain = xcc.getChain();
      X509Certificate[] ret = new X509Certificate[chain.length + 1];
      ret[0] = cert;
      for (int i=0; i<chain.length; i++)
      {
        ret[i+1] = chain[i];
      }
      return ret;
    }
  }
  throw new IllegalStateException("current Subject does not contain a certficate chain");
  
}
origin: org.opencadc/cadc-util

for (X509Certificate c : chain.getChain())
origin: org.opencadc/cadc-util

public static SSLSocketFactory getSocketFactory(X509CertificateChain chain)
{
  KeyStore ts = null;
  KeyStore ks = null;
  if (chain != null) 
    ks = getKeyStore(chain.getChain(), chain.getPrivateKey());
  return getSocketFactory(ks, ts);
}
origin: org.opencadc/cadc-cdp

  /**
   * @param chain certificate
   * @param writer writer use to write the generated PEM certificate
   * @throws IOException
   */
  public static void writePEMCertificateAndKey(
      X509CertificateChain chain, Writer writer)
      throws IOException
  {
    if (chain == null)
      throw new IllegalArgumentException("Null certificate chain");
    if (writer == null)
      throw new IllegalArgumentException("Null writer");

    PEMWriter pemWriter = new PEMWriter(writer);
    // write the first certificate first
    pemWriter.writeObject(chain.getChain()[0]);
    // then the key
    pemWriter.writeObject(chain.getPrivateKey());
    // and finally the rest of the certificates in the chain
    for (int i = 1; i < chain.getChain().length; i++)
    {
      pemWriter.writeObject(chain.getChain()[i]);
    }        
    pemWriter.flush();
  }
}
origin: org.opencadc/cadc-util

Date start = null;
Date end = null;
for (X509Certificate c : chain.getChain())
origin: org.opencadc/cadc-cdp

  privateKeyChain.getChain()[0].checkValidity();
privateKeyChain.getChain()[0].checkValidity();
origin: org.opencadc/cadc-vos

for (X509Certificate c : chain.getChain())
origin: org.opencadc/cadc-cdp

  CertificateNotYetValidException
X509Certificate issuerCert = chain.getChain()[0];
PrivateKey issuerKey = chain.getPrivateKey();
for (X509Certificate currentCert : chain.getChain())
  for (X509Certificate currentCert : chain.getChain())
  for (X509Certificate currentCert : chain.getChain())
ca.nrc.cadc.authX509CertificateChaingetChain

Popular methods of X509CertificateChain

  • <init>
  • getPrincipal
  • getPrivateKey
  • findPrivateKeyChain
  • genExpiryDate
  • genHashKey
  • getKey
  • getX500Principal
  • initPrincipal

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JOptionPane (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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