List of usage examples for javax.xml.crypto.dsig.keyinfo KeyInfoFactory newKeyInfo
public abstract KeyInfo newKeyInfo(List<? extends XMLStructure> content, String id);
KeyInfo containing the specified list of key information types and optional id. From source file:org.roda.common.certification.ODFSignatureUtils.java
private static KeyInfo getKeyInfo(XMLSignatureFactory factory, X509Certificate certificate) { KeyInfoFactory kif = factory.getKeyInfoFactory(); List<Object> x509Content = new ArrayList<Object>(); x509Content.add(certificate.getSubjectX500Principal().getName()); x509Content.add(certificate);/*from w ww . ja va 2s . c o m*/ X509Data cerData = kif.newX509Data(x509Content); KeyInfo ki = kif.newKeyInfo(Collections.singletonList(cerData), null); return ki; }
From source file:org.roda.core.plugins.plugins.characterization.ODFSignatureUtils.java
private static KeyInfo getKeyInfo(XMLSignatureFactory factory, X509Certificate certificate) { KeyInfoFactory kif = factory.getKeyInfoFactory(); List<Object> x509Content = new ArrayList<>(); x509Content.add(certificate.getSubjectX500Principal().getName()); x509Content.add(certificate);//from w w w . j a v a2s .c o m X509Data cerData = kif.newX509Data(x509Content); return kif.newKeyInfo(Collections.singletonList(cerData), null); }