<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=KOI8-R">
<title></title>
</head>
<body>
Serial number and subject name are included in the certificate. Current
xmlsec code<br>
can read both <dsig:<big><span class="000430516-24042003"><font
size="2"><big>X509IssuerSerial/> and <dsig:</big></font></span><span
class="000430516-24042003"><font size="2"><big>X509SubjectName/>
nodes and<br>
search local certificates store for specified certificates. However, it
does not provide<br>
an ability to write these nodes. As I said, this information is already
available from<br>
the <dsig:X509Certificate/> node and (</big></font></span></big><big><span
class="000430516-24042003"></span></big><big><span
class="000430516-24042003"><font size="2"><big>IMHO) </big></font></span></big><big><span
class="000430516-24042003"><font size="2"><big>duplicating it</big></font></span></big><big><span
class="000430516-24042003"><font size="2"><big></big></font></span></big><big><span
class="000430516-24042003"><font size="2"><big>is just a waste of
traffic.<br>
So the answer is "you could not do it". But I accept contributions and
you can hack it <br>
by yourself </big></font></span></big><big><span
class="000430516-24042003"><font size="2"><big>:) </big></font></span></big><big><span
class="000430516-24042003"><font size="2"><big>Probably there should
be a flag(s) in xmlSecKeyInfoCtx that tells xmlsec<br>
how to write certificates: <dsig:X509Data/>, </big></font></span></big><dsig:<big><span
class="000430516-24042003"><font size="2"><big>X509IssuerSerial/>,
etc. or it<br>
can be specified in the template; please note that you might have
*multiple* certificates<br>
for the key.</big></font></span></big><big><span
class="000430516-24042003"><font size="2"><big><br>
<br>
BTW, I would appreciate if you will use xmlsec mailing list for all
xmlsec related<br>
questions. <br>
<br>
Thanks,<br>
Aleksey<br>
</big></font></span></big>
<div><span class="000430516-24042003"><font face="Arial" size="2"><br>
<br>
</font></span></div>
<span class="000430516-24042003"></span><br>
<br>
Victor Sturgeon wrote:<br>
<blockquote type="cite"
cite="midB5D0B243841E0B4BA7BFCE18D244FFA32B109A@intexchg.isdomain.intrsoft.com">
<meta http-equiv="Content-Type" content="text/html; ">
<title>Message</title>
<meta content="MSHTML 6.00.2800.1141" name="GENERATOR">
<div><font face="Arial" size="2"><span class="000430516-24042003">Using
the following as my xml file test7.xml, I wanted to sign it via the
xmlsec utility</span></font></div>
<div><font face="Arial" size="2"><span class="000430516-24042003"></span></font></div>
<div><font face="Arial" size="2"><span class="000430516-24042003"><?xml
version="1.0" encoding="UTF-8"?><br>
<Signature xmlns="<a href="http://www.w3.org/2000/09/xmldsig">http://www.w3.org/2000/09/xmldsig</a>#"><br>
<SignedInfo><br>
<CanonicalizationMethod Algorithm="<a
href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</a>"
/><br>
<SignatureMethod Algorithm="<a
href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">http://www.w3.org/2000/09/xmldsig#rsa-sha1</a>"
/><br>
<Reference URI="#object"><br>
<DigestMethod Algorithm="<a
href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a>"
/><br>
<DigestValue></DigestValue><br>
</Reference><br>
</SignedInfo><br>
<SignatureValue><br>
</SignatureValue><br>
<KeyInfo><br>
<X509Data><br>
</X509Data><br>
</KeyInfo><br>
<Object Id="object">some text</Object><br>
</Signature></span></font></div>
<div></div>
<div><font face="Arial" size="2"><a
href="mailto:victor@victors:%7E/xmlsec">victor@victors:~/xmlsec</a>>
xmlsec1 --sign --privkey privatekey.pem,certificate.pem
test7.xml </font></div>
<div></div>
<div><span class="000430516-24042003"></span><font face="Arial"
size="2">G<span class="000430516-24042003">ives the following output</span><br>
</font></div>
<div><font face="Arial" size="2"><?xml version="1.0"
encoding="UTF-8"?><br>
<Signature xmlns="</font><a href="http://www.w3.org/2000/09/xmldsig"><font
face="Arial" size="2">http://www.w3.org/2000/09/xmldsig</font></a><font
face="Arial" size="2">#"><br>
<SignedInfo><br>
<CanonicalizationMethod Algorithm="</font><a
href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315%22/"><font
face="Arial" size="2">http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/</font></a><font
face="Arial" size="2">><br>
<SignatureMethod Algorithm="</font><a
href="http://www.w3.org/2000/09/xmldsig#rsa-sha1%22/"><font
face="Arial" size="2">http://www.w3.org/2000/09/xmldsig#rsa-sha1"/</font></a><font
face="Arial" size="2">><br>
<Reference URI="#object"><br>
<DigestMethod Algorithm="</font><a
href="http://www.w3.org/2000/09/xmldsig#sha1%22/"><font face="Arial"
size="2">http://www.w3.org/2000/09/xmldsig#sha1"/</font></a><font
face="Arial" size="2">><br>
<DigestValue>7/XTsHaBSOnJ/jXD5v0zL6VKYsk=</DigestValue><br>
</Reference><br>
</SignedInfo><br>
<SignatureValue>slrp2j30ePW08ObT49frswmN0dQGTOK/SQ9sljMUpfebOudpeI+uebQHU2eUlGI2<br>
A2GpWQqKLichKYO7d9luury5/jxjCMeLIoZtsWo5rCXUaoH9DXLPMymWNYCy0xbW<br>
zOwTyBj6AGPDArsNiz25JOzQZ1Kt36qcsaWCbR8KEru3YhtKLloMYfS83jN0HPMJ<br>
YgjkuH1OXRW3cDe5/kSiwU23d9TodXXa1dhzrq+Qoo4reR7g6MN+uVYe87tcDlzs<br>
+2ozmEW4EquJuwVohrMYJrhInZJs7ooZQ3e4o0WNHfvFSpSptMQ8K9nqjrFi4U9F<br>
Iv4PpTLDvbi9zKzUnqXKVw==</SignatureValue><br>
<KeyInfo><br>
<X509Data><br>
<X509Certificate>MIIE/DCCA+SgAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBsTELMAkGA1UEBhMCVVMx<br>
ETAPBgNVBAgTCElsbGlub2lzMRMwEQYDVQQHEwpOYXBlcnZpbGxlMRYwFAYDVQQK<br>
Ew1TdHVyZ2VvbiBNYWlsMRYwFAYDVQQLEw1TdHVyZ2VvbiBNYWlsMR4wHAYDVQQD<br>
ExVTdHVyZ2VvbiBNYWlsIFJvb3QgQ0ExKjAoBgkqhkiG9w0BCQEWG3Bvc3RtYXN0<br>
ZXJAc3R1cmdlb25tYWlsLmNvbTAeFw0wMzAyMT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AQkBFhtwb3N0bWFzdGVyQHN0dXJnZW9ubWFpbC5jb22CAQAwDQYJ<br>
KoZIhvcNAQEEBQADggEBABKB8KYPUt7pwEOc+y+8iZYxHnDhi/DkZW5KOwu4j9J4<br>
MYtdwzFJCQi+51T++7X7cOGcHzhxtVznadlSEH+q2r7NFIRnyZWAKtaK6AWG5l0j<br>
nFN/t3fkgMXtVL4ImrCNme2ZxG+5irTXCSa3EvOCZRLQwPkvWTJpTZs4KRfm+wX5<br>
kDdmfMNpXthkJehNZS+wLsGAoUYkDc5wmeMGf8894l3MzGMiNSuwzv2TILEOGHad<br>
t4dJaIgETmG6HaSErWD4UhN4jp502RWd+nui/p7MVyRq4vYrvBMCd691WccVtWW7<br>
y4zlnVaQXoGHOsymuqvi6toE4By4P6/ssE7FfMDuvTY=</X509Certificate><br>
</X509Data><br>
</KeyInfo><br>
<Object Id="object">some text</Object><br>
</Signature></font></div>
<div></div>
<div><span class="000430516-24042003"><font face="Arial" size="2">Which
verifies fine with </font></span></div>
<div><span class="000430516-24042003"><font face="Arial" size="2"><a
href="mailto:victor@victors:%7E/xmlsec">victor@victors:~/xmlsec</a>>
xmlsec1 --verify --trusted cacert.pem sign7.xml <br>
OK<br>
SignedInfo References (ok/all): 1/1<br>
Manifests References (ok/all): 0/0</font></span></div>
<div><span class="000430516-24042003"></span></div>
<div><span class="000430516-24042003"><font face="Arial" size="2">I
notice that the xmlsec utility fills in the X509Data fields with the
X509Certificate info.</font></span></div>
<div><span class="000430516-24042003"></span></div>
<div><span class="000430516-24042003"><font face="Arial" size="2">My
question is, what do I need to do to have the utility also
automatically fill in the following info:</font></span></div>
<div><span class="000430516-24042003"><font face="Arial" size="2">X509IssuerSerial</font></span></div>
<div><span class="000430516-24042003"><font face="Arial" size="2">X509SubjectName</font></span></div>
<div><span class="000430516-24042003"></span></div>
<div><span class="000430516-24042003"><font face="Arial" size="2">Thanks
for your insight.</font></span></div>
<div><span class="000430516-24042003"></span></div>
<div><span class="000430516-24042003"></span></div>
</blockquote>
</body>
</html>