/** * 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)); } }