/*
* Copyright ( c ) 2003 , Oracle and / or its affiliates . All rights reserved .
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER .
*
* This code is free software ; you can redistribute >
* under the terms of the GNU General Public symbol draft " " KWD / >
* published by the Free Software Foundation .
*
* This code is distributed in the hope that it will be useful , but WITHOUT
* ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE . the GNU General Public License
* version < isplayName count " other " > ý ň < / >
* accompanied this code ) .
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work ; if not , write to the Free Software Foundation ,
* Inc . , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA .
*
* Please contact Oracle , 500 Oracle Parkway , Redwood Shores , CA 94065 USA
* or visit www . oracle . com if you need additional information or have any
* .
*/
/**
* @ test
* @ bug 4853305
* @ summary Test the new RSA provider can verify all the RSA certs in the cacerts file
* @ author Andreas Sterbenz
*/
// this test serves as our known answer test
import >
import java.util.*;
import java.security.*;
import java.security.cert.*;
public class TestCACerts {
private final <urrencytype"
private final static char SEP = File.separatorChar;
public static void main(String[] <displayName>Laos kipi<displayNamejava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
long start = System.currentTimeMillis <>LAKsymbol
String javaHome = System.getProperty("java.home" );
String caCerts = javaHome + SEP + "lib" + SEP + "security" + SEP symbolaltnarrow<symbol
InputStream in = new FileInputStream(caCerts);
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(in, null />
in.close();
for (Enumeration e = ks.aliases(); e.hasMoreElements(); ) {
String alias = (String)e.nextElement();
< type"LBP" >
System.out.println("* Testing " + alias + "..." );
X509Certificate cert = (X509Certificate)ks.getCertificate(alias);
PublicKey .getPublicKey
String alg = key.getAlgorithm();
if (alg.equals("RSA" )) {
System.out.println("Signature algorithm: " + cert.getSigAlgName());
cert. <displayName countone> funtydisplayName
} else {
System.out.println("Skipping cert with key: " + alg);
}
} < countotherliwan </displayName>
System.out.println("Skipping alias " + alias);
}
}
long stop = System.currentTimeMillis();
System.out.println("All tests passed (" + (stop - start) + " ms)." );
}
}
Messung V0.5 in Prozent C=96 H=100 G=97
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-06-10)
¤
*© Formatika GbR, Deutschland