tutorials.de Buch-Aktion 05/2012
ERLEDIGT
NEIN
ANTWORTEN
5
ZUGRIFFE
1467
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    ihd ihd ist offline Mitglied
    Registriert seit
    May 2005
    Beiträge
    17
    Hallo


    Ich habe riesen problem mit der kommunikation zwischen Applet und server.
    Die kommunikation louft mit hielfe von SOAP.
    Wenn ich das Applet ueber http laufe funktioniert es, aber wenn ich es ueber https versuche erhalte ich Exception:

    Caught SOAPException (SOAP-ENV:Client): Error opening socket: java.security.AccessControlException: access denied (java.util.PropertyPermission https.proxyHost read)
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.security.AccessControlException: access denied (java.util.PropertyPermission https.proxyHost read); targetException=java.lang.IllegalArgumentException: Error opening socket: java.security.AccessControlException: access denied (java.util.PropertyPermission https.proxyHost read)]
    at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:354)
    at org.apache.soap.rpc.Call.invoke(Call.java:248)
    at Povezava.St_Zap(xy.java:366)
    at Delavec.Klic_Pove(x.java:183)
    at Delavec.init(x.java:147)
    at sun.applet.AppletPanel.run(AppletPanel.java:374)
    at java.lang.Thread.run(Thread.java:595)

    Kann mier jemand helfen?

    Danke
    IHD
     

  2. #2
    Registriert seit
    Jun 2002
    Ort
    Saarbrücken (Saarland)
    Beiträge
    9.886
    Blog-Einträge
    29
    Hallo!

    Erstell ein enstpechendes policy file und gib dem Applet die verlangte
    (java.util.PropertyPermission https.proxyHost read) Permission.
    Anschliessend signierst du das Applet. Fertig.

    Gruss Tom
     
    Java rocks!
    How to become a good Java Programmer?
    Does IT in Java and .Net
    The only valid measurement of code quality: WTFs / minute
    Blog
    Xing
    Twitter

  3. #3
    ihd ihd ist offline Mitglied
    Registriert seit
    May 2005
    Beiträge
    17
    Hallo

    Dem Applet habe ich dass hinzugefüt:
    System.setProperty("javax.net.ssl.keyStore", "/home/hergai/TehGL/build/classes/a.keystore");
    System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
    System.setProperty("javax.net.ssl.keyStorePassword", "xxxxxxxxx");
    System.setProperty("javax.net.ssl.trustStore", "/home/hergai/TehGL/build/classes/ca.crt");
    System.setProperty("javax.net.ssl.trustStoreType", "PKCS12");
    System.setProperty("javax.net.ssl.trustStorePassword", "xxxxxxxxxxxxxxx");

    Ich habe erstellt policy file "PolicyIHD":
    Inhalt:
    grant {
    permission java.security.AllPermission;
    };

    und in die java.security habe ich das hinzugefüt:
    policy.url.3=file:/home/hergai/TehGL/build/classes/PolicyIHD.policy

    Ist es biss hier Richtig?

    Das problem wie kann ich denn Applet signieren?

    Danke
    IHD
     

  4. #4
    ihd ihd ist offline Mitglied
    Registriert seit
    May 2005
    Beiträge
    17
    Hallo

    Kann mier jemand mehr info geben?

    Danke
    IHD
     

  5. #5
    Registriert seit
    Jun 2002
    Ort
    Saarbrücken (Saarland)
    Beiträge
    9.886
    Blog-Einträge
    29
    Hallo!

    Wie man ein Applet signieren kann findest du beispielsweise hier:
    http://www.tutorials.de/forum/java/2...ight=signieren

    Gruss Tom
     
    Java rocks!
    How to become a good Java Programmer?
    Does IT in Java and .Net
    The only valid measurement of code quality: WTFs / minute
    Blog
    Xing
    Twitter

  6. #6
    ihd ihd ist offline Mitglied
    Registriert seit
    May 2005
    Beiträge
    17
    Hallo

    Ich habe es so gemacht wie es dort steht und dan hab ich das folgende Excption bekomen?

    Caught SOAPException (SOAP-ENV:Client): Error opening socket: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
    at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:354)
    at org.apache.soap.rpc.Call.invoke(Call.java:248)
    at Povezava.St_Zap(Povezava.java:366)
    at Delavec.Klic_Pove(Delavec.java:183)
    at Delavec.init(Delavec.java:147)
    at sun.applet.AppletPanel.run(AppletPanel.java:374)
    at java.lang.Thread.run(Thread.java:595)

    Muss ich ein Zertifikat erstelen "keytool -genkey" oder kann ich enen anderen nehmen z.B. a.crt?
    Wenn ich a.cert in die keystore einfuge, wieso kann ich dann kein Applet siegnieren?
    ich erhalten :
    jarsigner: Certificate chain not found for: Hobo2. Hobo2 must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

    Habe ich was in der policy file falsch gemacht?

    Danke
    IHD
     

Ähnliche Themen

  1. Antworten: 9
    Letzter Beitrag: 06.09.08, 00:01
  2. Applet https
    Von ihd im Forum Swing, Java2D/3D, SWT, JFace
    Antworten: 0
    Letzter Beitrag: 24.05.06, 09:11
  3. Antworten: 4
    Letzter Beitrag: 02.01.06, 10:59
  4. Dringend! SOAP, SSL und Applet
    Von ihd im Forum Java
    Antworten: 3
    Letzter Beitrag: 23.07.05, 11:32
  5. Applet, soap, ssl und php
    Von ihd im Forum Java
    Antworten: 0
    Letzter Beitrag: 08.05.05, 20:11