santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien PASQUIER" <julien.pasqu...@wanadoo.fr>
Subject XMLSignature class - The signer output stream is closed before signing operation
Date Wed, 14 Mar 2007 11:11:59 GMT
Hi,

In the org.apache.xml.security.signature.XMLSignature class of the java XML Security v1.4,
I don't understand a piece of code in the "public void sign(Key signingKey)" method.

-----------------------------
// generate digest values for all References in this SignedInfo
si.generateDigestValues();
OutputStream so=new UnsyncBufferedOutputStream(new SignerOutputStream(sa));
try {
   so.close();
} catch (IOException e) {
   //Imposible
}
// get the canonicalized bytes from SignedInfo
si.signInOctectStream(so);
-----------------------------

Why the output stream "so" object is closed ("so.close()") before the signing operation ?

Regards,

Julien PASQUIER

Mime
View raw message