Description:
Customer obtained an exception while executing the smfedexport command.
Command executed:
smfedexport -type saml2idp -expiredays 0 -username ***** -password **** -sign -pubkey
Exception occurred:
An exception occurred while signing metadata document.com.netegrity.SAML2Security.DSigException:
Caught an Exception calling signXMLDocument using IXMLSignature. nulljava.lang.NullPointerException
at com.netegrity.smkeydatabase.api.XMLDocumentOpsImpl.signXMLDocument(XMLDocumentOpsImpl.java:1016)
at com.netegrity.SAML2Security.DSigSigner.signSAMLEnveloped(DSigSigner.java:254)
at com.ca.SAML2METADATA.utils.SMFedUtilities.signMetadata(SMFedUtilities.java:166)
at com.ca.smfedexport.tool.IDPMetadataProcessor.generateIdpDescriptor(IDPMetadata Processor.java:209)
at com.ca.smfedexport.tool.SMFedExport.main(SMFedExport.java:108)
There is no exception if they execute the command without the -sign parameter.
Upon reviewing the list of certificates under SmKeyDatabase, the "defaultenterpriseprivatekey" entry is associate with type
"CertificateEntry" instead of "KeyEntry".
Solution: