Closed GoogleCodeExporter closed 9 years ago
Did you try configuring a BasicSignatureOptionsProvider other than the default?
http://xades4j.googlecode.com/svn/release/1.3.0/javadoc/reference/xades4j/provid
ers/BasicSignatureOptionsProvider.html
Original comment by luis.fgoncalv
on 17 Mar 2014 at 8:15
Using the includePublicKey method should help you. If you find any bug please
reopen the issue.
Original comment by luis.fgoncalv
on 17 Mar 2014 at 8:17
my signing code snippet regarding issue 77(ds:KeyValue and ds:RSAValue and
Modulus tags are not added when signing xml file using xades4j) is :
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder docBuilder = null;
try {
docBuilder = factory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
e.printStackTrace();
}
Document doc = null;
try {
doc = docBuilder.parse(file);
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Element elmtToSign=doc.getDocumentElement();
KeyingDataProvider kp = null;
try{
kp = new FileSystemKeyStoreKeyingDataProvider("pkcs12","532638-testkurum01@test.com.tr.pfx",
new FirstCertificateSelector("532638-testkurum01@test.com.tr.pfx"),
new KeyStoreFilePasswordProvider(Constants.CERTIFICATE_PASSWORD),
new KeyEntryPwdProvider(Constants.CERTIFICATE_PASSWORD),true);
} catch (KeyStoreException e){
e.printStackTrace();
}
try {
XadesSigner signer = (XadesSigner) new XadesEpesSigningProfile(kp, new SignaturePolicyInfoProvider() {
@Override
public SignaturePolicyBase getSignaturePolicy() {
// TODO Auto-generated method stub
return new SignaturePolicyImpliedProperty();
}
}).newSigner();
new Enveloped(signer).sign(elmtToSign);
So, tell me where i have to make changes in my code so that <ds:KeyValue>,
<ds:RSAKeyValue> and <ds:Modulus> can be added in signed file.
I am waiting for your valuable response.
Thanks & Regards
Jay
Original comment by jay...@gmail.com
on 18 Mar 2014 at 7:47
All the XadesSigningProfiles have a withBasicSignatureOptionsProvider method.
You can use it to configure that provider as needed.
http://xades4j.googlecode.com/svn/release/1.3.0/javadoc/reference/xades4j/produc
tion/XadesSigningProfile.html
Original comment by luis.fgoncalv
on 18 Mar 2014 at 9:23
Hi,
Thank you for your help. Now my problem regarding ds:KeyValue and
ds:RSAValue and Modulus tags is resolved by implementing
withBasicSignatureOptionsProvider ,
Now i am going to validate other tags
Original comment by jay...@gmail.com
on 18 Mar 2014 at 11:37
Thanking you!
Above mention problem is almost resolved by configuring
basicSignatureOptionsProvider
Now i am moving ahead to validate other tags.
Regards'
Jay
Original comment by jay...@gmail.com
on 18 Mar 2014 at 11:42
Original issue reported on code.google.com by
jay...@gmail.com
on 15 Mar 2014 at 5:50