Algorithm TLS not available

Templarthelast

Bekanntes Mitglied
Ich versuche gerade über die smack api auf einen Chatserver über JSF auf einem Jboss zuzugreifen. Als ich dann die funktionierende Anwendung als Beans umbauen wollte, kam dieser Fehler. Als Java SE Anwendung funktioniert alles.
Gibt es da irgendwelche Lösungsansätze?

Code:
00:05:39,052 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) java.security.NoSuchAlgorithmException: Algorithm TLS not available

00:05:39,053 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at com.sun.net.ssl.b.a([DashoPro-V1.2-120198])

00:05:39,054 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at com.sun.net.ssl.SSLContext.getInstance([DashoPro-V1.2-120198])

00:05:39,054 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jivesoftware.smack.SSLXMPPConnection$DummySSLSocketFactory.<init>(SSLXMPPConnection.java:94)

00:05:39,055 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jivesoftware.smack.SSLXMPPConnection.<clinit>(SSLXMPPConnection.java:43)

00:05:39,055 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at com.eichler.javaee6.lolchat.ViewController.init(ViewController.java:53)

00:05:39,056 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

00:05:39,057 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

00:05:39,057 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

00:05:39,058 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at java.lang.reflect.Method.invoke(Method.java:601)

00:05:39,058 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130)

00:05:39,059 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

00:05:39,060 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

00:05:39,060 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

00:05:39,061 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:106)

00:05:39,062 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

00:05:39,063 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) 	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
.... und noch die anderen Jbossexcptionsweitergaben



Java:
private static class DummySSLSocketFactory extends SSLSocketFactory {

        private SSLSocketFactory factory;

        public DummySSLSocketFactory() {

            try {
                SSLContext sslcontent = SSLContext.getInstance("TLS"); // <-- Fehlerstelle
                sslcontent.init(null, // KeyManager not required
                            new TrustManager[] { new DummyTrustManager() },
                            new java.security.SecureRandom());
                factory = sslcontent.getSocketFactory();
            }
            catch (NoSuchAlgorithmException e) {
                e.printStackTrace();
            }
            catch (KeyManagementException e) {
                e.printStackTrace();
            }
        }
 
J

JohannisderKaeufer

Gast
Note that the list of registered providers may be retrieved via the java.security.Security.getProviders() method.

Aus der Api von SSLContext.getInstance(String protocol).

Vielleicht einfach mal ausgeben lassen welche Provider verfügbar sind.

Ausserdem würde ich noch schauen was SSLContext.getDefault(), bzw. SSLContext.getInstance("Default") liefert.
 
T

trööhööt

Gast
Every implementation of the Java platform is required to support the following standard SSLContext protocol:
•TLSv1
würde behaupten das "TLS" schlicht falsch ist und es richtig "TLSv1" heißen muss ...

ansonsten könnte es sein das der app-server ne zu alte version hat und/oder einfach irgend ne lib fehlt ...
 

Ähnliche Java Themen

Neue Themen


Oben