• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validate SAML signature in java

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi all,

We need to validate a signed XML which is a SAML Response.We haven't used any API for SAML manipulation.We are trying to create our own framework for SAML manipulation.
The problem we are facing is we received an exception while read the certificate from the SAML response.

Can anyone suggest me the steps to validate the XML signature ?

Below are the exception we are getting

Exception in thread "main" java.security.cert.CertificateParsingException: invalid DER-encoded certificate data
at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1703)
at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:301)
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:104)
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:305)
at test.CertificateReader.test(CertificateReader.java:20)
at test.CertificateReader.main(CertificateReader.java:43)






Thanks in advance.
reply
    Bookmark Topic Watch Topic
  • New Topic