Java 类sun.security.x509.ExtendedKeyUsageExtension 实例源码

项目:openjdk-jdk10    文件:CertificateBuilder.java   
/**
 * Add the Extended Key Usage extension.
 *
 * @param ekuOids A {@link List} of object identifiers in string form.
 *
 * @throws IOException if an encoding error occurs.
 */
public void addExtendedKeyUsageExt(List<String> ekuOids)
        throws IOException {
    if (!ekuOids.isEmpty()) {
        Vector<ObjectIdentifier> oidVector = new Vector<>();
        for (String oid : ekuOids) {
            oidVector.add(new ObjectIdentifier(oid));
        }
        addExtension(new ExtendedKeyUsageExtension(oidVector));
    }
}
项目:openjdk9    文件:CertificateBuilder.java   
/**
 * Add the Extended Key Usage extension.
 *
 * @param ekuOids A {@link List} of object identifiers in string form.
 *
 * @throws IOException if an encoding error occurs.
 */
public void addExtendedKeyUsageExt(List<String> ekuOids)
        throws IOException {
    if (!ekuOids.isEmpty()) {
        Vector<ObjectIdentifier> oidVector = new Vector<>();
        for (String oid : ekuOids) {
            oidVector.add(new ObjectIdentifier(oid));
        }
        addExtension(new ExtendedKeyUsageExtension(oidVector));
    }
}