writer.writeEndElement();
}
} else if (keyType.endsWith("PublicKey")) {
writer.writeStartElement("wst", "UseKey", namespace);
writer.writeStartElement("dsig", "KeyInfo", "http://www.w3.org/2000/09/xmldsig#");
writer.writeNamespace("dsig", "http://www.w3.org/2000/09/xmldsig#");
writer.writeStartElement("dsig", "KeyValue", "http://www.w3.org/2000/09/xmldsig#");
crypto = createCrypto(false);
cert = getCert(crypto);
PublicKey key = cert.getPublicKey();
String pubKeyAlgo = key.getAlgorithm();