# Choosing a Provider at runtime

Taskin Rahman (_tr8@ntrs.com)
Thu, 14 Aug 1997 13:21:06 -0500

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Betacorp: "JCE Extensions"
- Previous message: Douglas Tang: "Microsoft CryptoAPI"

    Message-Id: <33F34C91.48E1A7E9@ntrs.com>

    Date: Thu, 14 Aug 1997 13:21:06 -0500

    From: Taskin Rahman <_tr8@ntrs.com>

    To: java-security@web2.javasoft.com

    Subject: Choosing a Provider at runtime

Experts,

I am interested assigning a security provider of my choice in a
Browser/VM via code running under an applet environment.

I am hoping to use APIs as below:
------
java.security.Provider myProvider = (java.security.Provider)
Class.forName( "sun.security.provider.Sun" ).newInstance();
java.security.Security.insertProvider( myProvider, 1 ); //to set my
provider as the preferd one.
------

Currently, I get security violations:

------
sun.applet.AppletSecurityException: checksecurityaccess
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.SecurityException(java.lang.String)
sun.applet.AppletSecurityException(java.lang.String)
sun.applet.AppletSecurityException(java.lang.String, java.lang.String)
void sun.applet.AppletSecurity.checkSecurityAccess(java.lang.String)
void java.security.Security.check()
int java.security.Security.insertProviderAt(java.security.Provider,
int)
....
void sun.applet.AppletPanel.run()
void java.lang.Thread.run()
void java.lang.Thread.start()
------

Can you recommend a solution. Thanks

Taskin Rahman

- Next message: Betacorp: "JCE Extensions"
- Previous message: Douglas Tang: "Microsoft CryptoAPI"