gpt4 book ai didi

org.apache.harmony.security.provider.cert.X509CertPathImpl.getCertPathFromContentInfo()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 16:01:40 26 4
gpt4 key购买 nike

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

X509CertPathImpl.getCertPathFromContentInfo介绍

[英]Extract a CertPath from a PKCS#7 contentInfo object.
[中]从PKCS#7 contentInfo对象中提取CertPath。

代码示例

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

/**
 * Generates certification path object on the base of encoding provided via
 * array of bytes. The format of provided encoded form is specified by
 * parameter {@code encoding}.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *             or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(byte[] in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the basis of encoding provided via
 * input stream. The format of provided encoded form is specified by
 * parameter <code>encoding</code>.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *         or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(InputStream in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Generates certification path object on the base of encoding provided via
 * array of bytes. The format of provided encoded form is specified by
 * parameter {@code encoding}.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *             or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(byte[] in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Generates certification path object on the basis of encoding provided via
 * input stream. The format of provided encoded form is specified by
 * parameter <code>encoding</code>.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *         or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(InputStream in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the base of encoding provided via
 * array of bytes. The format of provided encoded form is specified by
 * parameter {@code encoding}.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *             or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(byte[] in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the basis of encoding provided via
 * input stream. The format of provided encoded form is specified by
 * parameter <code>encoding</code>.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *         or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(InputStream in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the basis of encoding provided via
 * input stream. The format of provided encoded form is specified by
 * parameter <code>encoding</code>.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *         or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(InputStream in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the basis of encoding provided via
 * input stream. The format of provided encoded form is specified by
 * parameter <code>encoding</code>.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *         or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(InputStream in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the basis of encoding provided via
 * input stream. The format of provided encoded form is specified by
 * parameter <code>encoding</code>.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *         or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(InputStream in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the base of encoding provided via
 * array of bytes. The format of provided encoded form is specified by
 * parameter {@code encoding}.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *             or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(byte[] in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the base of encoding provided via
 * array of bytes. The format of provided encoded form is specified by
 * parameter {@code encoding}.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *             or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(byte[] in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

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

/**
 * Generates certification path object on the base of encoding provided via
 * array of bytes. The format of provided encoded form is specified by
 * parameter {@code encoding}.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *             or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(byte[] in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Generates certification path object on the basis of encoding provided via
 * input stream. The format of provided encoded form is specified by
 * parameter <code>encoding</code>.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *         or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(InputStream in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Generates certification path object on the base of encoding provided via
 * array of bytes. The format of provided encoded form is specified by
 * parameter {@code encoding}.
 *
 * @throws CertificateException if specified encoding form is not supported,
 *             or some problems occurred during the decoding.
 */
public static X509CertPathImpl getInstance(byte[] in, String encoding)
    throws CertificateException {
  try {
    final Encoding encType = Encoding.findByApiName(encoding);
    if (encType == null) {
      throw new CertificateException("Unsupported encoding: " + encoding);
    }
    switch (encType) {
      case PKI_PATH:
        return (X509CertPathImpl) ASN1.decode(in);
      case PKCS7:
        return getCertPathFromContentInfo((ContentInfo) ContentInfo.ASN1.decode(in));
      default:
        throw new CertificateException("Unsupported encoding: " + encoding);
    }
  } catch (IOException e) {
    throw new CertificateException("Failed to decode CertPath", e);
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com