JCE providers as services

Weijun Wang weijun.wang at oracle.com
Tue Jun 19 18:47:35 PDT 2012



On 06/20/2012 05:39 AM, Sean Mullan wrote:
> On 06/19/2012 05:28 PM, Alan Bateman wrote:
>> On 19/06/2012 22:18, Sean Mullan wrote:
>>>
>>> It's used internally to pass a configuration file to the SunPKCS11 and
>>> Ucrypto providers. I suppose I could add an init method and pass it in
>>> that way after it is instantiated and returned by the ServiceLoader.
>> Is this something that the provider could pick up itself?
>
> I suppose it could but the path may vary depending on the platform, or
> someone could edit the java.security file and specify their own path.

Or someone might configure 2 SunPKCS11 providers, one Solaris and one NSS.

-Max

>
>> Also if I'm
>> using these providers today then how to I specify the configuration file
>> if I'm not doing it through the API?
>
> It's specified in the java.security file, ex, for Solaris:
>
> security.provider.2=sun.security.pkcs11.SunPKCS11
> ${java.home}/lib/security/sunpkcs11-solaris.cfg
>
> --Sean
>
>
>



More information about the jigsaw-dev mailing list