Skip to Content.
Sympa Menu

shibboleth-dev - possible bug in SAMLSignedObject

Subject: Shibboleth Developers

List archive

possible bug in SAMLSignedObject


Chronological Thread 
  • From: Alexander V Fedyukin <>
  • To:
  • Subject: possible bug in SAMLSignedObject
  • Date: Tue, 12 Jul 2005 15:38:35 -0400

In the process of porting Shib 1.3 to Tru64 I came across a method in open SAML which, I suspect, may have a bug:

SAMLSignedObject.cpp:

unsigned int SAMLSignedObject::getX509CertificateCount() const
{
if (isSigned()) {
DSIGKeyInfoList* klist=m_signature->getKeyInfoList();
for (int i=0; klist && i<klist->getSize(); i++) {
if (klist->item(i)->getKeyInfoType()==DSIGKeyInfo::KEYINFO_X509) {
if (static_cast<DSIGKeyInfoX509*>(klist->item(i))->getCertificateListSize())
return static_cast<DSIGKeyInfoX509*>(klist->item(i))->getCertificateListSize();
}
return 0;
}
return 0;
}
throw InvalidCryptoException("SAMLSignedObject::getX509CertificateCount() can't examine unsigned object");
}

It seems that the first 'return 0' statement lets the for loop execute only once. Was it intended this way?

Alexander

Attachment: pgpM_UnFSJ1VQ.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.16.

Top of Page