I use this method to specify my JCE provider. So I raise my hands !! But if another way to select my provider exists (except placing it at the first rank in the provider list), I can change my code
-----Message d'origine----- De : Raul Benito [mailto:[EMAIL PROTECTED] Envoyé : samedi 22 octobre 2005 14:37 À : security-dev@xml.apache.org Objet : Re: how to specify JCE provider for XML encryption This way of setting the Provider using the JCEMapper, has some bugs(it works for digesting/signing but not for crypt/decrypt). Anyway I was thinking of deprecating/removing this methods. So if more people use it please raise your hands, soon. On 10/22/05, Werner Dittmann <[EMAIL PROTECTED]> wrote: > In WSS4J I use the follwing way to define the provider to XML-SEC: > > JCEMapper.setProviderId(id) > > This static method sets the Id to use for SIgnature etc. For XMLCipher > you must use different methods, look at that: > > if (provider == null) { > xmlCipher = XMLCipher.getInstance(symEncAlgo); > } > else { > xmlCipher = XMLCipher.getProviderInstance(symEncAlgo, provider); } > > If you like to specify a provider for XMLCipher you have to use a > specific getInstance method - see above. The provider in this case is > the provider id string, e.g. "BC" for BouncyCastle. > > regards, > Werner > > > > Raul Benito wrote: > > This provider.properties is a relic of the old days. Right now is > > not used anymore. (TODO: remove it from the CVS). > > Right now the xml-sec use the standard java way of getting a JCE Provider. > > Look at > > http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html#P > > rovider > > for more info. > > > > Regards, > > > > Raul > > > > On 10/22/05, Alexey <[EMAIL PROTECTED]> wrote: > > > >>Hello, > >>Can anybody please, navigate me through the process? We're using > >>various JCE providers, such as SunJCE, IBMJCE. How do I specify > >>particaluar provider and/or cipher algorithm? Any changes I make to > >>config.xml are ignored and, after checking the source code I don't > >>see how the following element can be processed (ProviderAlgo). > >>Browsing CVS I came across a file called provider.properties. Is this a way to specify my provider? If so where should I put it, please? > >> > >><Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5" > >> Description="Key Transport RSA-v1.5"> > >> <ProviderAlgo ProviderId="IBMJCE" JCEName="RSA"/> </Algorithm> > >> > >>Javadocs say that I can get an instance of an XML cipher via > >>XMLCipher.getInstance() and use it as a "generic" cipher for > >>decryption. But when I try to initialize it with my key (which > >>carries algorithm information) I am getting exception: > >> > >>org.apache.xml.security.encryption.XMLEncryptionException: No > >>message with ID "XMLCipher instance without transformation > >>specified" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" > >> > >>Is it possible to re-use a cipher for different algorithms? > >> > >>Thanks, > >>Alexey > >> > >> > >> > > > > > > > > -- > > http://r-bg.com > > > > -- http://r-bg.com