Merge GNU Classpath 0.99 into libjava.

From-SVN: r185741
This commit is contained in:
Andrew John Hughes
2012-03-23 15:19:26 +00:00
parent 21669dfe20
commit 0563022a20
516 changed files with 64503 additions and 61116 deletions
@@ -1,5 +1,5 @@
/* Properties.java -- run-time configuration properties.
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -54,7 +54,8 @@ import java.util.logging.Logger;
*/
public final class Properties
{
private static final Logger log = Logger.getLogger(Properties.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(Properties.class.getName()) : null;
public static final String VERSION = "gnu.crypto.version";
@@ -1,5 +1,5 @@
/* DERWriter.java -- write Java types in DER format.
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2005, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -281,9 +281,9 @@ public class DERWriter implements DER
private static byte[] toUtf8(String string)
{
ByteArrayOutputStream buf =
new ByteArrayOutputStream((int)(string.length() * 1.5));
for (int i = 0; i < string.length(); i++)
int len = string.length();
ByteArrayOutputStream buf = new ByteArrayOutputStream(len + (len >> 1));
for (int i = 0; i < len; i++)
{
char c = string.charAt(i);
if (c < 0x0080)
@@ -1,5 +1,5 @@
/* Whirlpool.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -67,7 +67,9 @@ import java.util.logging.Logger;
public final class Whirlpool
extends BaseHash
{
private static final Logger log = Logger.getLogger(Whirlpool.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(Whirlpool.class.getName()) : null;
private static final int BLOCK_SIZE = 64; // inner block size in bytes
/** The digest of the 0-bit long message. */
@@ -1,5 +1,5 @@
/* EncodedKeyFactory.java -- JCE Encoded key factory Adapter
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -78,7 +78,8 @@ import javax.crypto.spec.DHPublicKeySpec;
public class EncodedKeyFactory
extends KeyFactorySpi
{
private static final Logger log = Logger.getLogger(EncodedKeyFactory.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(EncodedKeyFactory.class.getName()) : null;
private static Object invokeConstructor(String className, Object[] params)
throws InvalidKeySpecException
@@ -1,5 +1,5 @@
/* SignatureAdapter.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
Copyright 2001, 2002, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -75,7 +75,8 @@ class SignatureAdapter
extends SignatureSpi
implements Cloneable
{
private static final Logger log = Logger.getLogger(SignatureAdapter.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(SignatureAdapter.class.getName()) : null;
/** Our underlying signature instance. */
private ISignature adaptee;
@@ -1,5 +1,5 @@
/* DSSKeyPairGenerator.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
Copyright 2001, 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -66,7 +66,8 @@ import java.util.logging.Logger;
public class DSSKeyPairGenerator
implements IKeyPairGenerator
{
private static final Logger log = Logger.getLogger(DSSKeyPairGenerator.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(DSSKeyPairGenerator.class.getName()) : null;
/** The BigInteger constant 2. */
private static final BigInteger TWO = BigInteger.valueOf(2L);
@@ -1,5 +1,5 @@
/* DSSKeyPairPKCS8Codec.java -- PKCS#8 Encoding/Decoding handler
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,7 +67,9 @@ import java.util.logging.Logger;
public class DSSKeyPairPKCS8Codec
implements IKeyPairCodec
{
private static final Logger log = Logger.getLogger(DSSKeyPairPKCS8Codec.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(DSSKeyPairPKCS8Codec.class.getName()) : null;
private static final OID DSA_ALG_OID = new OID(Registry.DSA_OID_STRING);
// implicit 0-arguments constructor
@@ -1,5 +1,5 @@
/* RSAKeyPairGenerator.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
Copyright 2001, 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -70,7 +70,8 @@ import java.util.logging.Logger;
public class RSAKeyPairGenerator
implements IKeyPairGenerator
{
private static final Logger log = Logger.getLogger(RSAKeyPairGenerator.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(RSAKeyPairGenerator.class.getName()) : null;
/** The BigInteger constant 1. */
private static final BigInteger ONE = BigInteger.ONE;
@@ -1,5 +1,5 @@
/* RSAKeyPairPKCS8Codec.java -- PKCS#8 Encoding/Decoding handler
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,9 @@ import java.util.logging.Logger;
public class RSAKeyPairPKCS8Codec
implements IKeyPairCodec
{
private static final Logger log = Logger.getLogger(RSAKeyPairPKCS8Codec.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(RSAKeyPairPKCS8Codec.class.getName()) : null;
private static final OID RSA_ALG_OID = new OID(Registry.RSA_OID_STRING);
// implicit 0-arguments constructor
@@ -1,5 +1,5 @@
/* RSAKeyPairX509Codec.java -- X.509 Encoding/Decoding handler
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,9 @@ import java.util.logging.Logger;
public class RSAKeyPairX509Codec
implements IKeyPairCodec
{
private static final Logger log = Logger.getLogger(RSAKeyPairX509Codec.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(RSAKeyPairX509Codec.class.getName()) : null;
private static final OID RSA_ALG_OID = new OID(Registry.RSA_OID_STRING);
// implicit 0-arguments constructor
@@ -1,5 +1,5 @@
/* PKCS7SignedData.java -- reader/writer for PKCS#7 signedData objects
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -78,7 +78,8 @@ import java.util.logging.Logger;
*/
public class PKCS7SignedData
{
private static final Logger log = Logger.getLogger(PKCS7SignedData.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(PKCS7SignedData.class.getName()) : null;
public static final OID PKCS7_SIGNED_DATA = new OID("1.2.840.113549.1.7.2");
@@ -1,5 +1,5 @@
/* SignerInfo.java -- a SignerInfo object, from PKCS #7
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,8 @@ import javax.security.auth.x500.X500Principal;
public class SignerInfo
{
private static final Logger log = Logger.getLogger(SignerInfo.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(SignerInfo.class.getName()) : null;
private final BigInteger version;
private final BigInteger serialNumber;
@@ -111,7 +112,8 @@ public class SignerInfo
throw new BEREncodingException("malformed Version");
version = (BigInteger) val.getValue();
log.fine(" Version: " + version);
if (Configuration.DEBUG)
log.fine(" Version: " + version);
val = ber.read();
if (!val.isConstructed())
@@ -1,5 +1,5 @@
/* PKIXCertPathValidatorImpl.java -- PKIX certificate path validator.
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -97,7 +97,8 @@ import java.util.logging.Logger;
public class PKIXCertPathValidatorImpl
extends CertPathValidatorSpi
{
private static final Logger log = Logger.getLogger(PKIXCertPathValidatorImpl.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(PKIXCertPathValidatorImpl.class.getName()) : null;
public static final String ANY_POLICY = "2.5.29.32.0";
@@ -1,5 +1,5 @@
/* EMSA_PSS.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -73,7 +73,8 @@ import java.util.logging.Logger;
public class EMSA_PSS
implements Cloneable
{
private static final Logger log = Logger.getLogger(EMSA_PSS.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(EMSA_PSS.class.getName()) : null;
/** The underlying hash function to use with this instance. */
private IMessageDigest hash;
@@ -1,5 +1,5 @@
/* RSAPSSSignature.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -75,7 +75,8 @@ import java.util.logging.Logger;
public class RSAPSSSignature
extends BaseSignature
{
private static final Logger log = Logger.getLogger(RSAPSSSignature.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(RSAPSSSignature.class.getName()) : null;
/** The underlying EMSA-PSS instance for this object. */
private EMSA_PSS pss;
@@ -1,5 +1,5 @@
/* X509CRL.java -- X.509 certificate revocation list.
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,7 +77,9 @@ import javax.security.auth.x500.X500Principal;
public class X509CRL extends java.security.cert.X509CRL
implements GnuPKIExtension
{
private static final Logger log = Logger.getLogger(X509CRL.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(X509CRL.class.getName()) : null;
private static final OID ID_DSA = new OID("1.2.840.10040.4.1");
private static final OID ID_DSA_WITH_SHA1 = new OID("1.2.840.10040.4.3");
private static final OID ID_RSA = new OID("1.2.840.113549.1.1.1");
@@ -1,5 +1,5 @@
/* X509CRLEntry.java -- an entry in a X.509 CRL.
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,9 @@ import java.util.logging.Logger;
class X509CRLEntry extends java.security.cert.X509CRLEntry
implements GnuPKIExtension
{
private static final Logger log = Logger.getLogger(X509CRLEntry.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(X509CRLEntry.class.getName()) : null;
/** The DER encoded form of this CRL entry. */
private byte[] encoded;
@@ -1,5 +1,5 @@
/* Extension.java -- an X.509 certificate or CRL extension.
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 2004, 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,7 +53,8 @@ import java.util.logging.Logger;
public class Extension
{
private static final Logger log = Logger.getLogger(Extension.class.getName());
private static final Logger log = Configuration.DEBUG ?
Logger.getLogger(Extension.class.getName()) : null;
/**
* This extension's object identifier.
*/