Hi all,
I'm sorry to insist but I do not understand why my modifications on
SignatureDSA do not have been accepted.
For the moment, during RSA signature we get the JCA Signature object from
the provider defined with JCEMapper.setProviderID(providerName);
This is done in the
org.apache.xml.security.algorithms.implementations.SignatureBaseRSA class :
String provider=JCEMapper.getProviderId();
try{
if (provider == null)
{
this._signatureAlgorithm = Signature.getInstance(algorithmID);
}
else
{
this._signatureAlgorithm = Signature.getInstance(algorithmID,
provider);
}
}catch (java.security.NoSuchAlgorithmException ex){
Object[] exArgs = { algorithmID, ex.getLocalizedMessage() };
throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
}catch (NoSuchProviderException ex){
Object[] exArgs = { algorithmID, ex.getLocalizedMessage() };
throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
}
But for the DSA signature the default provider is used in the
org.apache.xml.security.algorithms.implementations.SignatureDSA class :
String algorithmID = JCEMapper.translateURItoJCEID(SignatureDSA._URI);
if (log.isDebugEnabled())
log.debug("Created SignatureDSA using " + algorithmID);
try {
this._signatureAlgorithm = Signature.getInstance(algorithmID);
} catch (java.security.NoSuchAlgorithmException ex) {
Object[] exArgs = { algorithmID, ex.getLocalizedMessage() };
throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
}
Why is there a difference between DSA and RSA ?
How could I specify my provider to perform DSA signature ?