[WSS4J] XML-Signature with signer certificate - how to?

"Nachiappan Narayanan" <Nachi-KbPxBdIIuGhWk0Htik3J/[email protected]> Wed, 25 Feb 2004 11:41:54 +0530
Newsgroups gmane.text.xml.wss4j
Organization Roxer.com Pvt. Ltd.
Message-ID <004501c3fb66$4b01c8f0$1f05a8c0@NACHU>
This is a multi-part message in MIME format.

------=_NextPart_000_003E_01C3FB94.5E26D280
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

All,

 Im exploring on XML-Signature. The default KeyIdentifier Type is =
WSConstants.ISSUER_SERIAL
This format sends the Key Information as follows:

   <ds:KeyInfo Id=3D"id-610399">
    <wsse:SecurityTokenReference>
     <ds:X509IssuerSerial>
      <ds:X509IssuerName>CN=3DNithya Mani</ds:X509IssuerName>
      =
<ds:X509SerialNumber>44369778256217224370984914847992022613</ds:X509Seria=
lNumber>
     </ds:X509IssuerSerial>
    </wsse:SecurityTokenReference>
   </ds:KeyInfo>
  =20
 Here, the tag <wsse:SecurityTokenReference>.... is it proprietary to =
WSS4J?=20
=20
=20
=20
=20
 I want to send the Sender/Signer's Public Key along with the SOAP =
Request as follows:
=20
       <dsig:KeyInfo>
      =20
       <dsig:X509Data>

          <dsig:X509SubjectName>CN=3DNithya Mani, OU=3DRoxer, =
O=3DInfravio, L=3DChennai, ST=3DTN, C=3DIN</dsig:X509SubjectName>

          <dsig:X509Certificate>

            MIIEqTCCA5GgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBjzELMAkGA1UEBhMC

            SUUxDzANBgNVBAgTBkR1YmxpbjERMA8GA1UEBxMIRHVibGluIDQxFDASBgNV

            BAoTC1ZvcmRlbCBMdGQuMSEwHwYDVQQLExhSZXNlYXJjaCBBbmQgRGV2ZWxv

            cG1lbnQxIzAhBgNVBAMTGlZvcmRlbCBDQSBTZWxmIFNpZ25lZCBSb290MB4X

            DTAzMDcwMjE2MTU1NloXDTEzMDYyOTE2MTU1NlowgYAxCzAJBgNVBAYTAklF

            MQ8wDQYDVQQIEwZEdWJsaW4xETAPBgNVBAcTCER1YmxpbiA0MRQwEgYDVQQK

            EwtWb3JkZWwgTHRkLjEhMB8GA1UECxMYUmVzZWFyY2ggQW5kIERldmVsb3Bt

            ZW50MRQwEgYDVQQDEwtTYW1wbGUgVXNlcjCCASIwDQYJKoZIhvcNAQEBBQAD

            ggEPADCCAQoCggEBALo5Y51NZy++4//SabaNmBuVpDZwAKdCgn8MQ6CnSdS3

            5Hhg7Qs3FzKzX+N55/wmLh9A3ON10VTqMZw3qGDQMM28wZWIMrsq1eqUoe56

            s2whA/vHsU20uyfdprFCWqfVjYG5u9xUfqhFTd/pTJ54Ue5meivAMt2hnolH

            osJ+RDqnI2sB2T9+V6MmPCDPG1q3tnlVriQ3Ze/4f3DDdr/vOJEZeLZfq3Es

            GXoR8o5DJfyBp/x9mkrBtmWj0CjdGUJw85MXlUaWP7kan9nAZPfRYDg/gg10

            L36MbBlnK0Bgqm8VJ/5jo7bm95LPbF4EdrDuImDgO8kHGVx/0q7ie/OeKTUC

            AwEAAaOCARswggEXMAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5T

            U0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRl4c0FfIzcF1S3

            UDjbmXu7X+duATCBvAYDVR0jBIG0MIGxgBSMFNQiJRrpUiLgYM2vM74gLA/7

            Q6GBlaSBkjCBjzELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjERMA8G

            A1UEBxMIRHVibGluIDQxFDASBgNVBAoTC1ZvcmRlbCBMdGQuMSEwHwYDVQQL

            ExhSZXNlYXJjaCBBbmQgRGV2ZWxvcG1lbnQxIzAhBgNVBAMTGlZvcmRlbCBD

            QSBTZWxmIFNpZ25lZCBSb290ggEAMA0GCSqGSIb3DQEBBAUAA4IBAQCyCwQu

            GElQ4JlAgYujLDI9ZyCKw6hqadYEiQUX+wG5lIIUAX8lPn5P+ncoWBI6DFtt

            EGlKVeaIsf5xpY5Xfzwh+auLUqghc++R8xRpW611ISrp7iQS1clgiKwbCT5B

            jHIgZT16s44XXRXK+d93DGyn8gXzkICNDxiXgSwS3yDW7ibsUmEZfT+TlJef

            4GjuGPRyZ35eNsGgOMHdmyHxOFntgSV3NtVRHqwLFAIm8EFwI5/YR5x9MB7L

            9nJdwf6IS3Lp4fweteBY8kOJ7ekd+hB5hOvZnID1/qI5b4jhQ+Z0Dz0jtym5

            P4Lh2TqGntQDlpL5zzX4b1cXXTid1XluWoT/

          </dsig:X509Certificate>

        </dsig:X509Data>

      </dsig:KeyInfo>
=20

 In order to do so, what type of KeyIdentifier should i set to the =
WSSignEnvelope Object?


Regards,
Nachiappan.N
=20

------=_NextPart_000_003E_01C3FB94.5E26D280
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>All,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;Im exploring on XML-Signature. =
The default=20
KeyIdentifier Type is WSConstants.ISSUER_SERIAL<BR>This format sends the =
Key=20
Information as follows:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&lt;ds:KeyInfo=20
Id=3D"id-610399"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;wsse:SecurityTokenRef=
erence&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ds:X509IssuerSerial&gt;<B=
R>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ds:X509IssuerName&gt;CN=3DNithy=
a=20
Mani&lt;/ds:X509IssuerName&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt=
;ds:X509SerialNumber&gt;44369778256217224370984914847992022613&lt;/ds:X50=
9SerialNumber&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ds:X509IssuerSeri=
al&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/wsse:SecurityTokenReference&gt;<BR=
>&nbsp;&nbsp;&nbsp;&lt;/ds:KeyInfo&gt;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;Her=
e,=20
the tag &lt;wsse:SecurityTokenReference&gt;.... is it proprietary to =
WSS4J?=20
<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;I want to send the=20
Sender/Signer's Public Key along with the SOAP Request as=20
follows:<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;dsig:KeyInfo&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;dsig:X509Data&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;dsig:X509SubjectName&gt;CN=3DNithya Mani, OU=3DRoxer, O=3DInfravio, =
L=3DChennai,=20
ST=3DTN, C=3DIN&lt;/dsig:X509SubjectName&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;dsig:X509Certificate&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
MIIEqTCCA5GgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBjzELMAkGA1UEBhMC</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
SUUxDzANBgNVBAgTBkR1YmxpbjERMA8GA1UEBxMIRHVibGluIDQxFDASBgNV</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
BAoTC1ZvcmRlbCBMdGQuMSEwHwYDVQQLExhSZXNlYXJjaCBBbmQgRGV2ZWxv</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
cG1lbnQxIzAhBgNVBAMTGlZvcmRlbCBDQSBTZWxmIFNpZ25lZCBSb290MB4X</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
DTAzMDcwMjE2MTU1NloXDTEzMDYyOTE2MTU1NlowgYAxCzAJBgNVBAYTAklF</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
MQ8wDQYDVQQIEwZEdWJsaW4xETAPBgNVBAcTCER1YmxpbiA0MRQwEgYDVQQK</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
EwtWb3JkZWwgTHRkLjEhMB8GA1UECxMYUmVzZWFyY2ggQW5kIERldmVsb3Bt</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
ZW50MRQwEgYDVQQDEwtTYW1wbGUgVXNlcjCCASIwDQYJKoZIhvcNAQEBBQAD</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
ggEPADCCAQoCggEBALo5Y51NZy++4//SabaNmBuVpDZwAKdCgn8MQ6CnSdS3</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
5Hhg7Qs3FzKzX+N55/wmLh9A3ON10VTqMZw3qGDQMM28wZWIMrsq1eqUoe56</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
s2whA/vHsU20uyfdprFCWqfVjYG5u9xUfqhFTd/pTJ54Ue5meivAMt2hnolH</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
osJ+RDqnI2sB2T9+V6MmPCDPG1q3tnlVriQ3Ze/4f3DDdr/vOJEZeLZfq3Es</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
GXoR8o5DJfyBp/x9mkrBtmWj0CjdGUJw85MXlUaWP7kan9nAZPfRYDg/gg10</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
L36MbBlnK0Bgqm8VJ/5jo7bm95LPbF4EdrDuImDgO8kHGVx/0q7ie/OeKTUC</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
AwEAAaOCARswggEXMAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5T</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
U0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRl4c0FfIzcF1S3</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
UDjbmXu7X+duATCBvAYDVR0jBIG0MIGxgBSMFNQiJRrpUiLgYM2vM74gLA/7</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
Q6GBlaSBkjCBjzELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjERMA8G</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
A1UEBxMIRHVibGluIDQxFDASBgNVBAoTC1ZvcmRlbCBMdGQuMSEwHwYDVQQL</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
ExhSZXNlYXJjaCBBbmQgRGV2ZWxvcG1lbnQxIzAhBgNVBAMTGlZvcmRlbCBD</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
QSBTZWxmIFNpZ25lZCBSb290ggEAMA0GCSqGSIb3DQEBBAUAA4IBAQCyCwQu</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
GElQ4JlAgYujLDI9ZyCKw6hqadYEiQUX+wG5lIIUAX8lPn5P+ncoWBI6DFtt</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
EGlKVeaIsf5xpY5Xfzwh+auLUqghc++R8xRpW611ISrp7iQS1clgiKwbCT5B</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
jHIgZT16s44XXRXK+d93DGyn8gXzkICNDxiXgSwS3yDW7ibsUmEZfT+TlJef</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
4GjuGPRyZ35eNsGgOMHdmyHxOFntgSV3NtVRHqwLFAIm8EFwI5/YR5x9MB7L</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
9nJdwf6IS3Lp4fweteBY8kOJ7ekd+hB5hOvZnID1/qI5b4jhQ+Z0Dz0jtym5</FONT></DIV>=

<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
P4Lh2TqGntQDlpL5zzX4b1cXXTid1XluWoT/</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/dsig:X509Certificate&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/dsig:X509Data&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/dsig:KeyInfo&gt;<BR>&nbsp;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;In order to do so, what type of =
KeyIdentifier=20
should i set to the WSSignEnvelope Object?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2><BR>Regards,<BR>Nachiappan.N<BR>&nbsp;<BR></FONT></DIV></BODY></=
HTML>

------=_NextPart_000_003E_01C3FB94.5E26D280--



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click