Skip to Content.
Sympa Menu

mace-opensaml-users - Re: ds:KeyInfo and SubjectConfirmationData

Subject: OpenSAML user discussion

List archive

Re: ds:KeyInfo and SubjectConfirmationData


Chronological Thread 
  • From: Chad La Joie <>
  • To: mace-opensaml-users <>
  • Subject: Re: ds:KeyInfo and SubjectConfirmationData
  • Date: Wed, 02 Aug 2006 12:01:34 -0400

I just checked in the bug fix for this. This should work now.

Thomas wrote:
Hello,

I'm using the java versione of opensaml 2 library. I'm trying to use ds:KeyInfo as
SubjectConfirmationData. I've created a KeyInfo object ad added it to the
SubjectConfirmationData element and I have specified the SubjectConfirmationDataType as
"KeyInfoConfirmationDataType". I've done the marshalling and I have no
exceptions or errros but in the resulting xml certificate the SubjectConfirmationData
is empty.
I've tryed to marshall only the ds:KeyInfo element but I obtain only an
empty XML file. I can only marshall correctly the element inside the
signature.
I suppose I'm mistaking something in the building of the KeyInfo element
inside SubjectConfirmationData but I can't figure out what. Thanks for your
help.
Thomas

--- code ---
...

sbjConfirmData = scdBuilder.buildObject( SubjectConfirmationData.DEFAULT_ELEMENT_NAME,
new QName( SAMLConstants.SAML20_NS, "KeyInfoConfirmationDataType",
SAMLConstants.SAML20_PREFIX ) );

KeyInfoBuilder kiBuilder = (KeyInfoBuilder) builderFactory.getBuilder(
KeyInfo.DEFAULT_ELEMENT_NAME );

KeyInfo keyInfo = kiBuilder.buildObject();
keyInfo.setPublicKey( subjectKey );

sbjConfirmData.getUnknownXMLObjects().add( keyInfo );
sbjConfirm.setSubjectConfirmationData( sbjConfirmData );
sbj.getSubjectConfirmations().add( sbjConfirm );

...

--- xml output ---
...

<saml:Subject>
<saml:SubjectConfirmation
Method="urn:oasis:names:tc:SAML:2.0:cm:holder-of-key">
<saml:SubjectConfirmationData xsi:type="saml:KeyInfoConfirmationDataType"/>
</saml:SubjectConfirmation>
</saml:Subject>

...




___________________________________________________________________
30 euro di sconto sull'abbonamento annuale, solo fino al 31/8! Cogli subito
la grande offerta SKY
http://click.libero.it/sky



--
Chad La Joie 2052-C Harris Bldg
OIS-Middleware 202.687.0124



Archive powered by MHonArc 2.6.16.

Top of Page