\r
void ContentReference::createReferences(DSIGSignature* sig)\r
{\r
+ DSIGReference* ref=NULL;\r
const XMLCh* id=m_signableObject.getXMLID();\r
if (!id || !*id)\r
- throw xmlsignature::SignatureException("Cannot create Signature reference to SAML object without an identifier."); \r
- \r
- DSIGReference* ref=NULL;\r
- XMLCh* buf=new XMLCh[XMLString::stringLen(id) + 2];\r
- buf[0]=chPound;\r
- buf[1]=chNull;\r
- XMLString::catString(buf,id);\r
- try {\r
- ref=sig->createReference(buf);\r
- delete[] buf;\r
- }\r
- catch(...) {\r
- delete[] buf;\r
- throw;\r
+ ref=sig->createReference(&chNull); // whole doc reference\r
+ else {\r
+ XMLCh* buf=new XMLCh[XMLString::stringLen(id) + 2];\r
+ buf[0]=chPound;\r
+ buf[1]=chNull;\r
+ XMLString::catString(buf,id);\r
+ try {\r
+ ref=sig->createReference(buf);\r
+ delete[] buf;\r
+ }\r
+ catch(...) {\r
+ delete[] buf;\r
+ throw;\r
+ }\r
}\r
ref->appendEnvelopedSignatureTransform();\r
DSIGTransformC14n* c14n=ref->appendCanonicalizationTransform(CANON_C14NE_NOC);\r