org.bouncycastle.asn1.x509.Extensions.getCriticalExtensionOIDs()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(90)

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

Extensions.getCriticalExtensionOIDs介绍

暂无

代码示例

代码示例来源:origin: org.xwiki.commons/xwiki-commons-crypto-pkix

@Override
public String[] getCriticalExtensionOID()
{
  ASN1ObjectIdentifier[] asnoids = this.extensions.getCriticalExtensionOIDs();
  return toStringArray(asnoids);
}

代码示例来源:origin: puppetlabs/ssl-utils

/**
 * Given an extensions container and an OID, extract the value and
 * criticality flag and return the values in a map. If the extension is not
 * found then null is returned.
 *
 * @param exts The Bouncy Castle extensions container.
 * @param oid The OID of the extension to find.
 * @return A map
 * @throws IOException
 */
private static Map<String, Object> makeExtensionMap(Extensions exts,
                          ASN1ObjectIdentifier oid)
    throws IOException
{
  boolean critical = Arrays.asList(exts.getCriticalExtensionOIDs()).contains(oid);
  return makeExtensionMap(exts, oid, critical);
}

代码示例来源:origin: puppetlabs/certificate-authority

/**
 * Given an extensions container and an OID, extract the value and
 * criticality flag and return the values in a map. If the extension is not
 * found then null is returned.
 *
 * @param exts The Bouncy Castle extensions container.
 * @param oid The OID of the extension to find.
 * @return A map
 * @throws IOException
 */
private static Map<String, Object> makeExtensionMap(Extensions exts,
                          ASN1ObjectIdentifier oid)
    throws IOException
{
  boolean critical = Arrays.asList(exts.getCriticalExtensionOIDs()).contains(oid);
  return makeExtensionMap(exts, oid, critical);
}

代码示例来源:origin: puppetlabs/ssl-utils

/**
 * Given a Bouncy Castle Extensions container, return a list of maps
 * representing all the X509 extensions embedded in the certificate.
 *
 * @param exts A Bouncy Castle Extensions container object.
 * @return A list of maps describing each extensions in the provided
 *         certificate.
 * @throws IOException
 */
private static List<Map<String, Object>> getExtensionList(Extensions exts)
    throws IOException
{
  List<Map<String, Object>> ret = new ArrayList<Map<String, Object>>();
  for (ASN1ObjectIdentifier oid : exts.getCriticalExtensionOIDs()) {
    ret.add(makeExtensionMap(exts, oid, true));
  }
  for (ASN1ObjectIdentifier oid : exts.getNonCriticalExtensionOIDs()) {
    ret.add(makeExtensionMap(exts, oid, false));
  }
  return ret;
}

代码示例来源:origin: puppetlabs/certificate-authority

/**
 * Given a Bouncy Castle Extensions container, return a list of maps
 * representing all the X509 extensions embedded in the certificate.
 *
 * @param exts A Bouncy Castle Extensions container object.
 * @return A list of maps describing each extensions in the provided
 *         certificate.
 * @throws IOException
 */
private static List<Map<String, Object>> getExtensionList(Extensions exts)
    throws IOException
{
  List<Map<String, Object>> ret = new ArrayList<Map<String, Object>>();
  for (ASN1ObjectIdentifier oid : exts.getCriticalExtensionOIDs()) {
    ret.add(makeExtensionMap(exts, oid, true));
  }
  for (ASN1ObjectIdentifier oid : exts.getNonCriticalExtensionOIDs()) {
    ret.add(makeExtensionMap(exts, oid, false));
  }
  return ret;
}

代码示例来源:origin: puppetlabs/ssl-utils

for (ASN1ObjectIdentifier oid : bcExtensions.getCriticalExtensionOIDs()) {
  certBuilder.addExtension(oid, true, bcExtensions.getExtension(oid).getParsedValue());

代码示例来源:origin: puppetlabs/certificate-authority

for (ASN1ObjectIdentifier oid : bcExtensions.getCriticalExtensionOIDs()) {
  certGen.addExtension(oid.getId(), true, bcExtensions.getExtension(oid).getExtnValue().getOctets());

代码示例来源:origin: org.xipki/ca-server

ASN1ObjectIdentifier[] oids = exts.getCriticalExtensionOIDs();
if (oids != null) {
 for (ASN1ObjectIdentifier oid : oids) {

相关文章