[jboss-jira] [JBoss JIRA] Updated: (JBREM-564) Default client socket factory configured by a system property
Tom Elrod (JIRA)
jira-events at jboss.com
Tue Aug 8 15:43:13 EDT 2006
[ http://jira.jboss.com/jira/browse/JBREM-564?page=all ]
Tom Elrod updated JBREM-564:
-----------------------------
Component/s: security
Fix Version/s: 2.0.0.GA (Boon)
Affects Version/s: 2.0.0.CR1 (Boon)
> Default client socket factory configured by a system property
> -------------------------------------------------------------
>
> Key: JBREM-564
> URL: http://jira.jboss.com/jira/browse/JBREM-564
> Project: JBoss Remoting
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: security
> Affects Versions: 2.0.0.CR1 (Boon)
> Reporter: Roland R?z
> Assigned To: Tom Elrod
> Fix For: 2.0.0.GA (Boon)
>
>
> To activate an ssl socket factory for the jobs remoting on the in a JBoss standalone client, the default socket factory of a VM can be configured by a java.security configuration activated with the java.security.properties=.../java.security System Property.
> Providing always such a configuration file is complicated. A simpler solution is a system property providing the name of the socket factory class:
> Here a possible implementation:
> Class org.jboss.remoting.security.SSLSocketBuilder:
> public SocketFactory createSSLSocketFactory() throws IOException,
> NoSuchAlgorithmException, KeyStoreException, CertificateException,
> KeyManagementException {
> SocketFactory sf = null;
> if (useSSLSocketFactory) {
> String defaultFactoryName = System
> .getProperty("jboss.remoting.defaultSocketFactory");
> if (defaultFactoryName != null) {
> try {
> Class sfClass = Thread.currentThread()
> .getContextClassLoader().loadClass(
> defaultFactoryName);
> Method m = sfClass.getMethod("getDefault", null);
> if (m == null) {
> throw new RuntimeException(
> "Could not create the socket factory "
> + defaultFactoryName
> + " because the class "
> + sfClass
> + " doesn't provide the getDefault method.");
> }
> sf = (SocketFactory) m.invoke(null, null);
> } catch (Exception ex) {
> throw new RuntimeException(
> "Could not create the socket factory "
> + defaultFactoryName, ex);
> }
> }
> if (sf == null) {
> sf = SSLSocketFactory.getDefault();
> }
> } else {
> sf = createCustomSocketFactory();
> }
> return sf;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list