How to use SSLSocket on a signed jar applet?

Hello:
OK, I finally could make work my client-server project, not the way I 'd like, but it works.
Now the problem is this:
Currently I have my applet in a jar file; saiCte.jar, which is signed in this way:
keytool -genkey -keystore TECSSDStore.keystore -alias Key1 -keyalg RSA -storepass tttttt -keypass tttttt
jarsigner  -keystore TECSSDStore.keystore -signedjar  saiCte.jar  temp.jar  Key1  -storepass tttttt -keypass tttttt
But signature is not useful for appletviewer, in my browser, I supposed that a signed applet would work, but it doesn't. There is a handshake problem. In the server it is:
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
I have to run the applet this way:
java -Djavax.net.ssl.trustStore=TECSSDStore.keystore -Djavax.net.ssl.keyStorePassword=tttttt -Djava.security.policy=SecPolicy sun.applet.Main Cte.html
Cte.html is this:
<applet    code = 'saiCte.class'  archive='saiCte.jar' width='750' height='480'>  </applet>So how could I make my signed jar work in the browser? I considered setting properties, but it worked, I would reveal my password. Currently the only way I know for distributing my applet is including the keystore and password, which is inadmissible, since I signed the jar (or why am I supposed to sign jars if anyway I have to send keystore and passwords?)
Thanks!

Questions:
1. Are you using client authentication in this SSL setup?
In the server I have this:
Socket.setWantClientAuth(false);
I guess if this option is false and the client chooses not to provide authentication information about itself, the negotiations will continue.
I read in SSLSocket API docs for setUseClientMode that "Servers normally authenticate themselves, and clients are not required to do so. "
2. What is in this keystore that you want to distribute?
In my keystore there is only what can be produced with this:
keytool -genkey -keystore TECSSDStore.keystore -alias Key1 -keyalg RSA -storepass tttttt -keypass tttttt
Now, I would have to distribute it if I want to run the applet from appletviewer:
java -Djavax.net.ssl.trustStore=TECSSDStore.keystore -Djavax.net.ssl.keyStorePassword=tttttt -Djava.security.policy=SecPolicy sun.applet.Main Cte.html
Which is the key of my problem: I do have a certificate, so I should not need to send the keystore and I should be able to run the applet from the browser. Actually it does run, the problem is in the connection:
In the client: (from firefox's Java console:)
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 com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
     at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
     at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
     at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
     at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
     at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
     at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
     at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
     at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
     at java.io.DataInputStream.readInt(Unknown Source)
     at r.a(Unknown Source)
     at X.actionPerformed(Unknown Source)
     at java.awt.Button.processActionEvent(Unknown Source)
     at java.awt.Button.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
     at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
     at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
     at sun.security.validator.Validator.validate(Unknown Source)
     at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
     at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
     at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
     ... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
     at java.security.cert.CertPathBuilder.build(Unknown Source)
     ... 29 more
In the server:
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at Tipos.TString.Read(TString.java:62)
at saiSrv$ConsultaServidor.run(saiSrv.java:1045)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.DataOutputStream.writeInt(Unknown Source)
at saiSrv$ConsultaServidor.<init>(saiSrv.java:1030)
at saiSrv.<init>(saiSrv.java:970)
at saiSrv.main(saiSrv.java:993)
OK, thanks for the help, it's midnight in America, (you are in australia aren't you) so I'm going to the bed, can we continue chatting tomorrow?

Similar Messages

  • How to use LR6 standalone without signing into cc?

    GD this company will not give standalone customers peace and quiet. Shove the creative cloud down our throats whether we want it or not.
    I cannot launch LR6 without being signed into cc. I paid for the stand alone edition. Does anyone know the magic mojo to get the dam thing right?

    I ended here for a slightly different reason (the actual installation - for anyone interested - see below)
    Since I'm here, I can try to give your question, as I understand it, my best shot:
    - To check if your serial number "sticks", i.e. is not in trial or subscription mode: Go to the Help menu - System Info...
       then if the 2nd line in the window that opens reads: "License: Perpetual", that's all you can do, re-installing won't make a difference.
    - In that case, getting that annoying Adobe ID Sign-In message anyway (even if, like me, you don't want to do anything online, sync or otherwise):
       there isn't much else to do but close the window without signing in and confirm to quit - Yes... every bleepin' time you launch LR6
    I have not found a Preference to disable that check, even under the Lightroom mobile tab (which at least, like the Help menu, confirms you're not signed in). Maybe in a future update they'll have an option to disable that check on startup, at least after the first time (but not yet in 6.0.1, the latest one so far)
    Otherwise either cave in and make at least a dummy Adobe ID, or the only other solution: Go back to LR5, unless you need the new functions...
    It's still installed separately on my machine, and I have a pre-LR6 backup of my catalogs,  so I'll play around with it for a couple of days before deciding. It's certainly my last Adobe product.
    Now the reason I ended up here: The INSTALLER actually FORCES you to sign in with Adobe ID even with a VALID SERIAL, which is just plain bovine stuff, and the utterly unhelpful Adobe Chat employee didn't answer my question, pointed me towards Adobe Photoshop Lightroom Help | Serialize Lightroom CC trial to activate as Lightroom 6 (which still expects you to log in, no matter what you try later) and disconnected. Grrrr.
    Here's the work-around for that:
    - DISCONNECT your network connection temporarily (Turn off WiFi, unplug the ethernet cable...)
    - Launch the installer, click on the "I have purchased" half => it will complain there's no internet connection
    - But a "Connect Later" button appears => click on it => get the old serial# screen, enter serial (& if necessary re-connect, then enter prior serial to upgrade )
    - Next screen, Accept Terms, then next screen choose your install options and there you go.
    - You will of course have to get back online to validate the serial within a few days, like before, but at least you skipped the whole Adobe ID Sign-In nonsense, and not deal with the creepy "Starting with this version... share your information with Adobe how you use Lightroom... is turned on by default..."

  • How to use that arrow/plus sign to expand text on a page...

    Hi all,
    I'd like to learn and find out how to use a symbol or icon or
    whatever to expand text on one of my pages. We've all seen it but I
    have no idea what they're using to do it, in fact I'm not even sure
    what the correct name is! I was going to do a view source to try to
    figure it out, but I can't seem to remember any sites where I've
    seen it.
    Any suggestions are greatly appreciated, thanks.

    Take a look at the SwapClass tutorial from Project VII:
    http://www.projectseven.com/tutorials/navigation/swapclassmenu/index.htm
    Their demo uses SwapClass for a menu, but you can adapt it
    for exactly what
    you're talking about.
    HTH,
    John
    "jcbuche" <[email protected]> wrote in
    message
    news:fq7ac9$l8$[email protected]..
    > Hi all,
    >
    > I'd like to learn and find out how to use a symbol or
    icon or whatever to
    > expand text on one of my pages. We've all seen it but I
    have no idea what
    > they're using to do it. I was going to do a view source
    to try to figure
    > it
    > out, but I can't seem to remember any sites where I've
    seen it.
    >
    > Any suggestions are greatly appreciated, thanks.
    >

  • Problems during execution of signed JARs applet...

    Hi Everyone,
    I noticed that AppletViewer used for development allows a wider range of operation not permitted during the execution in browser of a signed JAR.
    I would be interested to know if this is caused because I am using a not real certificate (generated for testing). Anyone with a real certificate may tell me if for example URLClassLoader works well with jar applet signed with his real certificate?
    Thanks, bye

    Thanks, you confirm what I was not anymore able to verify in my browser :)
    In fact the very first time I launched my applet in browser, the browser was showing a detailed message dialog pane complaining the untrustable certificate and restricted access privileges, so I thought to accept untrusted certificate as default and I tried to set up some options in security panel of the browser to trust untrusted certificate. Consequentely I was receiving only the untrusted certificate warning without any restriction message warning.
    I understood that applets signed with untrusted certificates gives some more privilege than applet not signed, but evidently the security level of untrusted certificate does not give all total priviliges that trusted certificate does.

  • Using external libraries over signed Java applet: InvocationTargetException when running locally with 7u51

    We have a signed Java applet that uses external libraries, specifically the OpenOffice application libraries.
    We have a problem running Java applet with 7u51 of "InvocationTargetException" when use these libraries OpenOffice, that is not signed; regardless of the browser used (Mozilla Firefox, Explorer, Chrome).
    Please, as you could solve this problem?   This problem can not arose with 7u40 and earlier..
    Best regards.

    In  java - JRE 1.7.0_51-b13 and signed applet - Stack Overflow found solution. I've missed to add in external jars manifest this: 
    Trusted-Library: true

  • How to use memory management in a JAR?

    I want to increase the amount of memory available to my program. It's being run from a JAR file. How can I use the java -Xms and -Xmx command line options from within the JAR? Is it a matter of altering the manifest? I'm using JBuilder, by the way.
    Craig

    I want to make sure I don't get "out of memory" errors. I understand that using the java -Xms and -Xmx command line options allows increasing available memory and I'd like to be able to do that when the user just clicks on a JAR file in Explorer.

  • How to use Hotmail account to sign in to Samsung T...

    Before I could respond to this forum I was asked to sign in.  I was going to post something fairly snarky.  Then I was asked to create a Skype Name different than my hotmail account.  So I created one.  Hopefully this will answer MY question and that is why, on my Samsung TV app does it not offer the hotmail login or sign in name.  Now maybe I can use the one Skype Name I just created???

    Error: System cannot find the specified path
    I am getting this eroor
    Parashuram Singade www.distinctnotion.com

  • How to use SSLSocket on midlet ???

    I am writting a midlet that need a SSLSocket to connect to a server. I am looking for a method or a framework that provide the SSLSocket connection in J2me. Anyone can help me, please.
    Thank you in advance.

    I am writting a midlet that need a SSLSocket to connect to a server. I am looking for a method or a framework that provide the SSLSocket connection in J2me. Anyone can help me, please.
    Thank you in advance.

  • How to connect from Signed jar to normal jar

    Hi Team,
    I have one signed jar. This signed jar manifest file contains all the algorithams. I want to connect from
    a class (which is available in a signed jar) to another class (which is available in another jar which is not signed.)
    could you please explain how to add class-path in signed jar maifest file.
    Thanks
    T. Shankar Reddy

    Hi,
    Please use the CD to run setup on the second, third, ..... computer. In short, you have to run setup for each computer.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to use self-signed certificate to verify others certificate?

    the self-signed certificate and keys acts as CA like VeriSign
    alias =SelfSignCA
    keystore = SelfSignLib
    certificate = SelfSign.cer
    certificate to be verify
    alias = companyCA
    certificate = companyLib
    csr file = company.csr
    how to use keytool to verify/sign the company certificate?thank you.

    Well, this might not be much help, but for 10g, on AIX, docID 1171558.1 describes how to create a new certificate.
    Not sure how relevant it will be for 11g, sorry :(

  • How to use a thirdparty look and feel

    how to use a thirdparty look and feel
    i download some from
    http://javootoo.l2fprod.com/
    but how to use?

    Include the downloaded jar file in your classpath.
    Then during startup of your application, call UIManager.setLookAndFeel(className) where className is the class name of your Look & Feel

  • How to use dll with applet?

    I want to use a dll with a applet.
    I try several solutions : signed applet, dll in jar, ... But without any result.

    U can use it if u sign the applet. It is a bit trick way though.
    Create an inputstream, read and copy the dll to some where path is defined (System dir for ex) from jar. Then load that library.. But u need a dummy class for that before starting applet. Rest is ur brain.. Best of luck. I tried and succeded.

  • Signed java applet is very slow with 1.4.2_06

    We have an application which has a signed jar applets was working fine with Java Plug-in (JPI) version 1.4.1_02.
    Due to customer requirement they want to run the same applet with JPI version 1.4.2_06, After JPI upgrade the applet is running slow.
    I am not sure what sun has changed the security settings in 1.4.2_06. So, Can some one give there thoughts on why would it run slow because of JPI changes.
    Thanks in advance.
    Aj

    Hi,
    It is nothing to do with Signed applet.
    If URL Connection 's setDefaultCacheUses is set to false then this is causing to run the Applet slow. As it require to download complete jar(if any) everytime.
    From 1.4.1_02 (CachedJarURLConnection.class in jaws.jar):
    public void connect()
    throws IOException
    if(!connected)
    jarFile = JarCache.get(jarFileURL);
    if(jarFile != null)
    {�.
    From 1.4.2_06 (CachedJarURLConnection.class in plugin.jar):
    public void connect()
    throws IOException
    if(!connected)
    if(getUseCaches())
    jarFile = JarCache.get(jarFileURL);
    if(jarFile != null)
    {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use signed classes/Jars in Java Stored Procedure?

    I am using java encryption API in my java application that I want to deploy as java stored procedure. The API is kept in the signed jar files.
    The Application is running in the MS-DOS environment but not in Oracle8i.
    It gives me following error.
    java.lang.ExceptionInInitializerError: java.lang.SecurityException: Cannot set
    up certs for trusted CAs
    at javax.crypto.b.<clinit>([DashoPro-V1.2-120198])
    at javax.crypto.KeyGenerator.getInstance([DashoPro-V1.2-120198])
    at DesKey.GenerateKey(DesKey.java:63)
    declare
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.ExceptionInInitializerError
    ORA-06512: at line 4
    (Note: I have enabled the java output in SQL Plus editor otherwise it will give only the second part of error that starts from ERROR at line 1:)
    please guide me how to solve this problem.
    Salman Hameed

    Salman,
    If you do not get a reply on this forum, I recommend you post this question on the Oracle JVM discussion forum as well.
    In addition, I would recommend checking the documentation for Oracle8i. The Oracle8i Java Developer's Guide, the Java Stored Procedures Guide, and the JDBC Developer's guide may have some information on this topic. You can get to this doc from the OTN Documentation page. Click on Oracle8i, then General Documentation, Release 2 (8.1.6), then scroll down to see the link for the Oracle8i Java Developer's documetation. All of the books mentioned above are available from that link.

  • Sign jar using PGP

    Hi folks,
    I do have long used PGP keys (over 7 years). I would like
    to sign jar file using those my PGP key. How should I do that?
    I mean I can just sign jar in standard PGP way, but I would like
    to sign jar file in way jarsigner does. Such that in jar meta
    one would see PGP signature and could verify it using jarsigner
    or other software of that kind. How it's possible?
    Please help. Bunch of dukes are awaiting you! Urgent!
    Paul

    Sure it knows nothing about PGP. You have to use PGP
    tools to export that key to one of the formats those
    can be understanded by keytool (such as x509 or
    pkcs12). I do know nothing about these PGP tools to export PGP keys
    to x509 and/or pkcs12 - please hint me what tools you
    are talking about?The universal hint is: Google -> "PGP key export" -> Search
    Another possibility is to export RSA key to the DER
    encoding and then write a little program to read it
    and then add to the keystore. This is looks like an
    easy task. I believe you can easily find source to
    convert pkcs12 keystore to JKS and use that one as a
    starting point.I would be happy if you will point me the source to convert
    pkcs12 keystore into JKS. BTW what's JKS?Google -> "convert pkcs12 to JKS" -> Search
    JKS == Java Key Store
    Sorry for my stupidity... I've last touched PGP/RSA issues
    5 or 6 years ago, since that time technology a bit changed :)It is a good idea to read some fundamental first. Take a look at http://java.sun.com/products/jce/index-14.html

Maybe you are looking for

  • Two ODSs share the same InfoSource but with different updata mode load?

    We've got two different ODSs (ODS1 and ODS2) for two respective clients (client 1 and client 2).  Client 1 has already going alive and in the InfoPackage, we only pick up ODS1 (Client 1) as feeding target and we have conducted initial load and severa

  • Received approval notice but podcast not showing up in iTunes

    Greetings, My podcast was approved today but hasn't shown up in the store via the link given.  When clicked it gives a "The item you've requested is not currently available" message. For reference, here's the link I was given as well as my feed: http

  • Apple Wireless Keyboard on iMac 20

    Good morning everybody, two months ago i have installed an apple wireless keyboard model M9270T/A (not aluminium), model with numeric pad. It runs properly since yesterday, when it stops to run. I have tried to reinstall, it is discovered, but it doe

  • Screen rez at post?

    Up till now I've had my system hooked up to a 15" flat panel with max rez of 1024 x 768. I've now changed to a 23" 1920 x 1200 flat panel. The first thing I noticed is that the post sequence no longer displays. I'm guessing that the display rez of th

  • How to delete PostOffice using AdminTypeLibrary (C#)

    Is there any way to delete PostOffice using Admin Object API? Thank you in advance. Kahren