From owner-freebsd-java@FreeBSD.ORG Fri Nov 4 09:03:04 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17FEC16A420 for ; Fri, 4 Nov 2005 09:03:04 +0000 (GMT) (envelope-from past@ebs.gr) Received: from fly.ebs.gr (fly.ebs.gr [62.103.84.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83A9843D45 for ; Fri, 4 Nov 2005 09:03:00 +0000 (GMT) (envelope-from past@ebs.gr) Received: from ebs.gr (root@hal.ebs.gr [10.1.1.2]) by fly.ebs.gr (8.12.9p1/8.12.9) with ESMTP id jA492v9V011174; Fri, 4 Nov 2005 11:02:57 +0200 (EET) (envelope-from past@ebs.gr) Received: from [10.1.1.158] (pc158.ebs.gr [10.1.1.158]) by ebs.gr (8.13.3/8.12.11) with ESMTP id jA4937lA057791; Fri, 4 Nov 2005 11:03:13 +0200 (EET) (envelope-from past@ebs.gr) Message-ID: <436B238C.7080703@ebs.gr> Date: Fri, 04 Nov 2005 11:02:04 +0200 From: Panagiotis Astithas Organization: EBS Ltd. User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051008) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-15?Q?Niels_C=F6lle?= References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-java@freebsd.org Subject: Re: JDK15: Cipher.getInstance throws UnsupportedOperationException X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 09:03:04 -0000 Niels Cölle wrote: > Hello, > > are there any known restrictions in the JCE implementation of > jdk-1.5.0p2_1? > > If I use the native jdk15 I get the Exception below. On other platforms > my code works: > - FreeBSD linux-jdk15 > - Windows XP jdk1.5.0_05 > - RedHat EE 3.x jdk1.5.0_05 > - Solaris 8 jdk1.5.0_05 > - Solaris 9 jdk1.5.0_05 > > I checked jce.jar with jarsigner -verify : OK. > I installed the jce_policy files for 1.5.0 : failed. > I replaced the jce.jar and the security directory with files from one > of the working platforms : failed (of course?) > > Maybe I am searching in the wrong direction, but if I formerly got > these "java.lang.SecurityException: Cannot set up certs for trusted > CAs" errors, there was something wrong with the > certificates/signatures/policy in jre/lib jre/lib/security. > Has anybody new ideas? > > Thanks in advance > Niels > > java.lang.ExceptionInInitializerError > at javax.crypto.Cipher.getInstance(DashoA12275) > at javax.crypto.Cipher.getInstance(DashoA12275) > at com.coelle_online.Token.init(IAIKToken.java:253) > at com.coelle_online.GenerateMasterKey.run(GenerateMasterKey.java:59) > at com.coelle_online.GenerateMasterKey.main(GenerateMasterKey.java:91) > Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs > at javax.crypto.SunJCE_b.(DashoA12275) > ... 5 more > Caused by: java.lang.UnsupportedOperationException > at > java.security.cert.CertificateFactorySpi.engineGenerateCertPath(CertificateFactorySpi.java:162) > > at > java.security.cert.CertificateFactory.generateCertPath(CertificateFactory.java:353) > > at > sun.security.util.SignatureFileVerifier.getSigners(SignatureFileVerifier.java:464) > > at > sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:208) > > at > sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176) > > at java.util.jar.JarVerifier.processEntry(JarVerifier.java:282) > at java.util.jar.JarVerifier.update(JarVerifier.java:194) > at java.util.jar.JarFile.initializeVerifier(JarFile.java:317) > at java.util.jar.JarFile.getInputStream(JarFile.java:382) > at > sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:119) > > at javax.crypto.SunJCE_d.a(DashoA12275) > at javax.crypto.SunJCE_b.g(DashoA12275) > at javax.crypto.SunJCE_b.e(DashoA12275) > at javax.crypto.SunJCE_q.run(DashoA12275) > at java.security.AccessController.doPrivileged(Native Method) > ... 6 more Have you replaced the installed cacerts file with the one from a working Sun JDK (say Linux)? You can find the installed file in /usr/local/jdk1.5.0/jre/lib/security/cacerts. Cheers, Panagiotis