java.security.cert.X509Certificate.getIssuerAlternativeNames()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中java.security.cert.X509Certificate.getIssuerAlternativeNames()方法的一些代码示例,展示了X509Certificate.getIssuerAlternativeNames()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509Certificate.getIssuerAlternativeNames()方法的具体详情如下:
包路径:java.security.cert.X509Certificate
类名称:X509Certificate
方法名:getIssuerAlternativeNames

X509Certificate.getIssuerAlternativeNames介绍

[英]Returns a read-only list of the issuer alternative names from the IssuerAltName extension.

The ASN.1 definition of IssuerAltName:

IssuerAltName ::= GeneralNames 
GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName 
GeneralName ::= CHOICE { 
otherName                       [0]     AnotherName, 
rfc822Name                      [1]     IA5String, 
dNSName                         [2]     IA5String, 
x400Address                     [3]     ORAddress, 
directoryName                   [4]     Name, 
ediPartyName                    [5]     EDIPartyName, 
uniformResourceIdentifier       [6]     IA5String, 
iPAddress                       [7]     OCTET STRING, 
registeredID                    [8]     OBJECT IDENTIFIER }

[中]从ISSUERATNAME扩展名返回发卡机构备选名称的只读列表。
ASN。1发行人名称的定义:

IssuerAltName ::= GeneralNames 
GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName 
GeneralName ::= CHOICE { 
otherName                       [0]     AnotherName, 
rfc822Name                      [1]     IA5String, 
dNSName                         [2]     IA5String, 
x400Address                     [3]     ORAddress, 
directoryName                   [4]     Name, 
ediPartyName                    [5]     EDIPartyName, 
uniformResourceIdentifier       [6]     IA5String, 
iPAddress                       [7]     OCTET STRING, 
registeredID                    [8]     OBJECT IDENTIFIER }

代码示例

代码示例来源:origin: org.nhind/agent

@Override
/**
 * {@inheritDoc}
 */	
public Collection<List<?>> getIssuerAlternativeNames()  throws CertificateParsingException
{
  return internalCert.getIssuerAlternativeNames();
}

代码示例来源:origin: mcxiaoke/ApkSigner

@Override
public Collection<List<?>> getIssuerAlternativeNames() throws CertificateParsingException {
  return mDelegate.getIssuerAlternativeNames();
}

代码示例来源:origin: oracle/oci-java-sdk

@Override
public Collection<List<?>> getIssuerAlternativeNames() throws CertificateParsingException {
  return delegate().getIssuerAlternativeNames();
}

代码示例来源:origin: SAMLRaider/SAMLRaider

public List<String> getIssuerAlternativeNames() {
  List<String> issuerAlternativeNames = new LinkedList<String>();
  try {
    if (certificate.getIssuerAlternativeNames() == null) {
      return issuerAlternativeNames;
    }
    for (List<?> i : certificate.getIssuerAlternativeNames()) {
      issuerAlternativeNames.add(i.get(1) + " (" + ObjectIdentifier.getSubjectAlternativeNames((Integer) i.get(0)) + ")");
    }
  } catch (CertificateParsingException e) {
    e.printStackTrace();
  }
  return issuerAlternativeNames;
}

代码示例来源:origin: com.madgag/scprov-jdk15on

protected static void addAdditionalStoresFromAltNames(
  X509Certificate cert,
  ExtendedPKIXParameters pkixParams)
  throws CertificateParsingException
{
  // if in the IssuerAltName extension an URI
  // is given, add an additinal X.509 store
  if (cert.getIssuerAlternativeNames() != null)
  {
    Iterator it = cert.getIssuerAlternativeNames().iterator();
    while (it.hasNext())
    {
      // look for URI
      List list = (List)it.next();
      if (list.get(0).equals(new Integer(GeneralName.uniformResourceIdentifier)))
      {
        // found
        String temp = (String)list.get(1);
        CertPathValidatorUtilities.addAdditionalStoreFromLocation(temp, pkixParams);
      }
    }
  }
}

代码示例来源:origin: ibinti/bugvm

protected static void addAdditionalStoresFromAltNames(
  X509Certificate cert,
  ExtendedPKIXParameters pkixParams)
  throws CertificateParsingException
{
  // if in the IssuerAltName extension an URI
  // is given, add an additinal X.509 store
  if (cert.getIssuerAlternativeNames() != null)
  {
    Iterator it = cert.getIssuerAlternativeNames().iterator();
    while (it.hasNext())
    {
      // look for URI
      List list = (List)it.next();
      if (list.get(0).equals(Integers.valueOf(GeneralName.uniformResourceIdentifier)))
      {
        // found
        String temp = (String)list.get(1);
        CertPathValidatorUtilities.addAdditionalStoreFromLocation(temp, pkixParams);
      }
    }
  }
}

代码示例来源:origin: com.madgag.spongycastle/prov

protected static void addAdditionalStoresFromAltNames(
  X509Certificate cert,
  ExtendedPKIXParameters pkixParams)
  throws CertificateParsingException
{
  // if in the IssuerAltName extension an URI
  // is given, add an additional X.509 store
  if (cert.getIssuerAlternativeNames() != null)
  {
    Iterator it = cert.getIssuerAlternativeNames().iterator();
    while (it.hasNext())
    {
      // look for URI
      List list = (List)it.next();
      if (list.get(0).equals(Integers.valueOf(GeneralName.uniformResourceIdentifier)))
      {
        // found
        String temp = (String)list.get(1);
        CertPathValidatorUtilities.addAdditionalStoreFromLocation(temp, pkixParams);
      }
    }
  }
}

代码示例来源:origin: com.bugvm/bugvm-rt

protected static void addAdditionalStoresFromAltNames(
  X509Certificate cert,
  ExtendedPKIXParameters pkixParams)
  throws CertificateParsingException
{
  // if in the IssuerAltName extension an URI
  // is given, add an additinal X.509 store
  if (cert.getIssuerAlternativeNames() != null)
  {
    Iterator it = cert.getIssuerAlternativeNames().iterator();
    while (it.hasNext())
    {
      // look for URI
      List list = (List)it.next();
      if (list.get(0).equals(Integers.valueOf(GeneralName.uniformResourceIdentifier)))
      {
        // found
        String temp = (String)list.get(1);
        CertPathValidatorUtilities.addAdditionalStoreFromLocation(temp, pkixParams);
      }
    }
  }
}

代码示例来源:origin: ripple-unmaintained/ripple-lib-java

protected static void addAdditionalStoresFromAltNames(
  X509Certificate cert,
  ExtendedPKIXParameters pkixParams)
  throws CertificateParsingException
{
  // if in the IssuerAltName extension an URI
  // is given, add an additional X.509 store
  if (cert.getIssuerAlternativeNames() != null)
  {
    Iterator it = cert.getIssuerAlternativeNames().iterator();
    while (it.hasNext())
    {
      // look for URI
      List list = (List)it.next();
      if (list.get(0).equals(Integers.valueOf(GeneralName.uniformResourceIdentifier)))
      {
        // found
        String temp = (String)list.get(1);
        CertPathValidatorUtilities.addAdditionalStoreFromLocation(temp, pkixParams);
      }
    }
  }
}

代码示例来源:origin: org.nhind/agent

try
  altNames = certificate.getIssuerAlternativeNames();

代码示例来源:origin: org.apache.httpcomponents/httpclient-android

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<String>();

代码示例来源:origin: kaazing/gateway

JSONArray issuerAlternativeNames = getAlternativeNames(x509Cert.getIssuerAlternativeNames());
if (issuerAlternativeNames != null) {
  jsonObj.put("issuerAlternativeNames", issuerAlternativeNames);

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<String>();

代码示例来源:origin: com.bugvm/bugvm-rt

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<String>();

代码示例来源:origin: ibinti/bugvm

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<String>();

代码示例来源:origin: com.hynnet/httpclient

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<String>();

代码示例来源:origin: org.apache.httpcomponents.client5/httpclient5

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<>();

代码示例来源:origin: cz.msebera.android/httpclient

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<String>();

代码示例来源:origin: KostyaSha/yet-another-docker-plugin

final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
if (altNames2 != null) {
  final List<String> altNames = new ArrayList<String>();

代码示例来源:origin: igniterealtime/Spark

value += alternativeNameExtractor(cert.getIssuerAlternativeNames());

相关文章

微信公众号

最新文章

更多