The aim is to validate a saml EntitiesDescriptor signature using a stux processor to ensure the amount of memory used is low.
I have been using the following code with an example from Apache Santuario without any luck.
Please can someone advise on how to use Apache Santuario with SAML Entity Descriptor files.
SignatureUtils can be found here
URL url = new URL("http://metadata.ukfederation.org.uk/ukfederation-metadata.xml");
// Validation List<QName> namesToSign = new ArrayList<QName>(); namesToSign.add(new QName("urn:oasis:names:tc:SAML:2.0:metadata", "EntitiesDescriptor")); try (InputStream stream = url.openStream()) { X509Certificate cert = getCertificate(); SignatureUtils.verifyUsingStAX(stream, namesToSign, cert); }
0 comments:
Post a Comment