aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/gnu
diff options
context:
space:
mode:
authorAndrew John Hughes <gandalf@gcc.gnu.org>2012-03-23 15:19:26 +0000
committerAndrew John Hughes <gandalf@gcc.gnu.org>2012-03-23 15:19:26 +0000
commit0563022a206294757effa44686727bffc4f7c2bd (patch)
treefebe3d4d4c0c994db223fee8e819bde6582494c9 /libjava/classpath/gnu
parent21669dfe20db0246ece395db5558a081a5c7088f (diff)
downloadgcc-0563022a206294757effa44686727bffc4f7c2bd.zip
gcc-0563022a206294757effa44686727bffc4f7c2bd.tar.gz
gcc-0563022a206294757effa44686727bffc4f7c2bd.tar.bz2
Merge GNU Classpath 0.99 into libjava.
From-SVN: r185741
Diffstat (limited to 'libjava/classpath/gnu')
-rw-r--r--libjava/classpath/gnu/java/security/Properties.java5
-rw-r--r--libjava/classpath/gnu/java/security/der/DERWriter.java8
-rw-r--r--libjava/classpath/gnu/java/security/hash/Whirlpool.java6
-rw-r--r--libjava/classpath/gnu/java/security/jce/sig/EncodedKeyFactory.java5
-rw-r--r--libjava/classpath/gnu/java/security/jce/sig/SignatureAdapter.java5
-rw-r--r--libjava/classpath/gnu/java/security/key/dss/DSSKeyPairGenerator.java5
-rw-r--r--libjava/classpath/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java6
-rw-r--r--libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairGenerator.java5
-rw-r--r--libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java6
-rw-r--r--libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java6
-rw-r--r--libjava/classpath/gnu/java/security/pkcs/PKCS7SignedData.java5
-rw-r--r--libjava/classpath/gnu/java/security/pkcs/SignerInfo.java8
-rw-r--r--libjava/classpath/gnu/java/security/provider/PKIXCertPathValidatorImpl.java5
-rw-r--r--libjava/classpath/gnu/java/security/sig/rsa/EMSA_PSS.java5
-rw-r--r--libjava/classpath/gnu/java/security/sig/rsa/RSAPSSSignature.java5
-rw-r--r--libjava/classpath/gnu/java/security/x509/X509CRL.java6
-rw-r--r--libjava/classpath/gnu/java/security/x509/X509CRLEntry.java6
-rw-r--r--libjava/classpath/gnu/java/security/x509/ext/Extension.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/cipher/Anubis.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/cipher/Khazad.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/cipher/Rijndael.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/cipher/Twofish.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/jce/keyring/GnuKeyring.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/jce/params/BlockCipherParameters.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/jce/prng/ICMRandomSpi.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/jce/prng/UMacRandomSpi.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java11
-rw-r--r--libjava/classpath/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java6
-rw-r--r--libjava/classpath/gnu/javax/crypto/keyring/Entry.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/keyring/EnvelopeEntry.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/keyring/GnuPublicKeyring.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/mac/OMAC.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/pad/BasePad.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/pad/PKCS1_V1_5.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/pad/PKCS7.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/pad/TBC.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/prng/CSPRNG.java38
-rw-r--r--libjava/classpath/gnu/javax/crypto/sasl/SaslInputStream.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/sasl/SaslOutputStream.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java5
-rw-r--r--libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java5
-rw-r--r--libjava/classpath/gnu/javax/net/ssl/provider/CipherSuite.java109
-rw-r--r--libjava/classpath/gnu/javax/net/ssl/provider/OutputSecurityParameters.java18
-rw-r--r--libjava/classpath/gnu/javax/net/ssl/provider/SSLEngineImpl.java25
-rw-r--r--libjava/classpath/gnu/javax/print/PrinterDialog.java10
-rw-r--r--libjava/classpath/gnu/javax/security/auth/login/ConfigFileParser.java8
-rw-r--r--libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java11
-rw-r--r--libjava/classpath/gnu/javax/security/auth/login/GnuConfiguration.java6
50 files changed, 276 insertions, 178 deletions
diff --git a/libjava/classpath/gnu/java/security/Properties.java b/libjava/classpath/gnu/java/security/Properties.java
index 2213bde..1a4bf227 100644
--- a/libjava/classpath/gnu/java/security/Properties.java
+++ b/libjava/classpath/gnu/java/security/Properties.java
@@ -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";
diff --git a/libjava/classpath/gnu/java/security/der/DERWriter.java b/libjava/classpath/gnu/java/security/der/DERWriter.java
index 0c26336..cea3fa3 100644
--- a/libjava/classpath/gnu/java/security/der/DERWriter.java
+++ b/libjava/classpath/gnu/java/security/der/DERWriter.java
@@ -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)
diff --git a/libjava/classpath/gnu/java/security/hash/Whirlpool.java b/libjava/classpath/gnu/java/security/hash/Whirlpool.java
index 5741040..29eed59 100644
--- a/libjava/classpath/gnu/java/security/hash/Whirlpool.java
+++ b/libjava/classpath/gnu/java/security/hash/Whirlpool.java
@@ -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. */
diff --git a/libjava/classpath/gnu/java/security/jce/sig/EncodedKeyFactory.java b/libjava/classpath/gnu/java/security/jce/sig/EncodedKeyFactory.java
index 19ec088..ec74201 100644
--- a/libjava/classpath/gnu/java/security/jce/sig/EncodedKeyFactory.java
+++ b/libjava/classpath/gnu/java/security/jce/sig/EncodedKeyFactory.java
@@ -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
diff --git a/libjava/classpath/gnu/java/security/jce/sig/SignatureAdapter.java b/libjava/classpath/gnu/java/security/jce/sig/SignatureAdapter.java
index 0ed1e2f..efe3681 100644
--- a/libjava/classpath/gnu/java/security/jce/sig/SignatureAdapter.java
+++ b/libjava/classpath/gnu/java/security/jce/sig/SignatureAdapter.java
@@ -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;
diff --git a/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairGenerator.java b/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairGenerator.java
index 6bda4e8..70df734 100644
--- a/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairGenerator.java
+++ b/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairGenerator.java
@@ -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);
diff --git a/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java b/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java
index a59ca3c..1806ecf 100644
--- a/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java
+++ b/libjava/classpath/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java
@@ -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
diff --git a/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairGenerator.java b/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairGenerator.java
index bec60d3..99c31394 100644
--- a/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairGenerator.java
+++ b/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairGenerator.java
@@ -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;
diff --git a/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java b/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
index 2785f02..b07ed66 100644
--- a/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
+++ b/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
@@ -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
diff --git a/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java b/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java
index 9ad6ae0..36fd75c 100644
--- a/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java
+++ b/libjava/classpath/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java
@@ -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
diff --git a/libjava/classpath/gnu/java/security/pkcs/PKCS7SignedData.java b/libjava/classpath/gnu/java/security/pkcs/PKCS7SignedData.java
index adb00a3..e479d2e 100644
--- a/libjava/classpath/gnu/java/security/pkcs/PKCS7SignedData.java
+++ b/libjava/classpath/gnu/java/security/pkcs/PKCS7SignedData.java
@@ -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");
diff --git a/libjava/classpath/gnu/java/security/pkcs/SignerInfo.java b/libjava/classpath/gnu/java/security/pkcs/SignerInfo.java
index 645ed67..07ce4d7 100644
--- a/libjava/classpath/gnu/java/security/pkcs/SignerInfo.java
+++ b/libjava/classpath/gnu/java/security/pkcs/SignerInfo.java
@@ -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())
diff --git a/libjava/classpath/gnu/java/security/provider/PKIXCertPathValidatorImpl.java b/libjava/classpath/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
index d4ce4ae..e0d3187 100644
--- a/libjava/classpath/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
+++ b/libjava/classpath/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
@@ -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";
diff --git a/libjava/classpath/gnu/java/security/sig/rsa/EMSA_PSS.java b/libjava/classpath/gnu/java/security/sig/rsa/EMSA_PSS.java
index 917d963..7a8e591 100644
--- a/libjava/classpath/gnu/java/security/sig/rsa/EMSA_PSS.java
+++ b/libjava/classpath/gnu/java/security/sig/rsa/EMSA_PSS.java
@@ -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;
diff --git a/libjava/classpath/gnu/java/security/sig/rsa/RSAPSSSignature.java b/libjava/classpath/gnu/java/security/sig/rsa/RSAPSSSignature.java
index d8f8327..7b042f7 100644
--- a/libjava/classpath/gnu/java/security/sig/rsa/RSAPSSSignature.java
+++ b/libjava/classpath/gnu/java/security/sig/rsa/RSAPSSSignature.java
@@ -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;
diff --git a/libjava/classpath/gnu/java/security/x509/X509CRL.java b/libjava/classpath/gnu/java/security/x509/X509CRL.java
index 7c471c9..518edaa 100644
--- a/libjava/classpath/gnu/java/security/x509/X509CRL.java
+++ b/libjava/classpath/gnu/java/security/x509/X509CRL.java
@@ -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");
diff --git a/libjava/classpath/gnu/java/security/x509/X509CRLEntry.java b/libjava/classpath/gnu/java/security/x509/X509CRLEntry.java
index 26b4036..64adf7f 100644
--- a/libjava/classpath/gnu/java/security/x509/X509CRLEntry.java
+++ b/libjava/classpath/gnu/java/security/x509/X509CRLEntry.java
@@ -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;
diff --git a/libjava/classpath/gnu/java/security/x509/ext/Extension.java b/libjava/classpath/gnu/java/security/x509/ext/Extension.java
index 2b7e96d..b740c8a 100644
--- a/libjava/classpath/gnu/java/security/x509/ext/Extension.java
+++ b/libjava/classpath/gnu/java/security/x509/ext/Extension.java
@@ -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.
*/
diff --git a/libjava/classpath/gnu/javax/crypto/cipher/Anubis.java b/libjava/classpath/gnu/javax/crypto/cipher/Anubis.java
index 3526ad6..c2a7cce 100644
--- a/libjava/classpath/gnu/javax/crypto/cipher/Anubis.java
+++ b/libjava/classpath/gnu/javax/crypto/cipher/Anubis.java
@@ -1,5 +1,5 @@
/* Anubis.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.
@@ -67,7 +67,8 @@ import java.util.logging.Logger;
public final class Anubis
extends BaseCipher
{
- private static final Logger log = Logger.getLogger(Anubis.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(Anubis.class.getName()) : null;
private static final int DEFAULT_BLOCK_SIZE = 16; // in bytes
private static final int DEFAULT_KEY_SIZE = 16; // in bytes
private static final String Sd = // p. 25 [ANUBIS]
diff --git a/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java b/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java
index 45aa2d6..8dfd47e 100644
--- a/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java
+++ b/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java
@@ -1,5 +1,5 @@
/* BaseCipher.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.
@@ -56,7 +56,8 @@ import java.util.logging.Logger;
public abstract class BaseCipher
implements IBlockCipher, IBlockCipherSpi
{
- private static final Logger log = Logger.getLogger(BaseCipher.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(BaseCipher.class.getName()) : null;
/** The canonical name prefix of the cipher. */
protected String name;
/** The default block size, in bytes. */
diff --git a/libjava/classpath/gnu/javax/crypto/cipher/Khazad.java b/libjava/classpath/gnu/javax/crypto/cipher/Khazad.java
index 55e4262..1c3b778 100644
--- a/libjava/classpath/gnu/javax/crypto/cipher/Khazad.java
+++ b/libjava/classpath/gnu/javax/crypto/cipher/Khazad.java
@@ -1,5 +1,5 @@
/* Khazad.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.
@@ -67,7 +67,8 @@ import java.util.logging.Logger;
public final class Khazad
extends BaseCipher
{
- private static final Logger log = Logger.getLogger(Khazad.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(Khazad.class.getName()) : null;
private static final int DEFAULT_BLOCK_SIZE = 8; // in bytes
private static final int DEFAULT_KEY_SIZE = 16; // in bytes
private static final int R = 8; // standard number of rounds; para. 3.7
diff --git a/libjava/classpath/gnu/javax/crypto/cipher/Rijndael.java b/libjava/classpath/gnu/javax/crypto/cipher/Rijndael.java
index 0463fe5..6ce3943 100644
--- a/libjava/classpath/gnu/javax/crypto/cipher/Rijndael.java
+++ b/libjava/classpath/gnu/javax/crypto/cipher/Rijndael.java
@@ -1,5 +1,5 @@
/* Rijndael.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.
@@ -64,7 +64,8 @@ import java.util.logging.Logger;
public final class Rijndael
extends BaseCipher
{
- private static final Logger log = Logger.getLogger(Rijndael.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(Rijndael.class.getName()) : null;
private static final int DEFAULT_BLOCK_SIZE = 16; // in bytes
private static final int DEFAULT_KEY_SIZE = 16; // in bytes
private static final String SS =
diff --git a/libjava/classpath/gnu/javax/crypto/cipher/Twofish.java b/libjava/classpath/gnu/javax/crypto/cipher/Twofish.java
index c9789a6..7f3a341 100644
--- a/libjava/classpath/gnu/javax/crypto/cipher/Twofish.java
+++ b/libjava/classpath/gnu/javax/crypto/cipher/Twofish.java
@@ -1,5 +1,5 @@
/* Twofish.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.
@@ -69,7 +69,8 @@ import java.util.logging.Logger;
public final class Twofish
extends BaseCipher
{
- private static final Logger log = Logger.getLogger(Twofish.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(Twofish.class.getName()) : null;
private static final int DEFAULT_BLOCK_SIZE = 16; // in bytes
private static final int DEFAULT_KEY_SIZE = 16; // in bytes
private static final int MAX_ROUNDS = 16; // max # rounds (for allocating subkeys)
diff --git a/libjava/classpath/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java b/libjava/classpath/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java
index 97fdd53..b9ce378 100644
--- a/libjava/classpath/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java
+++ b/libjava/classpath/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java
@@ -1,5 +1,5 @@
/* KeyWrappingAlgorithmAdapter.java -- Base Adapter for Key Wrapping algorithms
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,7 +76,8 @@ import javax.crypto.spec.SecretKeySpec;
abstract class KeyWrappingAlgorithmAdapter
extends CipherSpi
{
- private static final Logger log = Logger.getLogger(KeyWrappingAlgorithmAdapter.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(KeyWrappingAlgorithmAdapter.class.getName()) : null;
/** JCE canonical name of a null-padder. */
private static final String NO_PADDING = "nopadding";
/** Concrete Key Wrapping Algorithm SPI. */
diff --git a/libjava/classpath/gnu/javax/crypto/jce/keyring/GnuKeyring.java b/libjava/classpath/gnu/javax/crypto/jce/keyring/GnuKeyring.java
index c30da69..39d402a 100644
--- a/libjava/classpath/gnu/javax/crypto/jce/keyring/GnuKeyring.java
+++ b/libjava/classpath/gnu/javax/crypto/jce/keyring/GnuKeyring.java
@@ -1,5 +1,5 @@
/* GnuKeyring.java -- KeyStore adapter for a pair of private and public Keyrings
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -77,7 +77,8 @@ import javax.crypto.SecretKey;
public class GnuKeyring
extends KeyStoreSpi
{
- private static final Logger log = Logger.getLogger(GnuKeyring.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(GnuKeyring.class.getName()) : null;
private static final String NOT_LOADED = "not loaded";
/** TRUE if the keystore is loaded; FALSE otherwise. */
diff --git a/libjava/classpath/gnu/javax/crypto/jce/params/BlockCipherParameters.java b/libjava/classpath/gnu/javax/crypto/jce/params/BlockCipherParameters.java
index fde83b1..a6dd247 100644
--- a/libjava/classpath/gnu/javax/crypto/jce/params/BlockCipherParameters.java
+++ b/libjava/classpath/gnu/javax/crypto/jce/params/BlockCipherParameters.java
@@ -1,5 +1,5 @@
/* BlockCipherParameters.java --
- Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,7 +59,8 @@ import javax.crypto.spec.IvParameterSpec;
public class BlockCipherParameters
extends AlgorithmParametersSpi
{
- private static final Logger log = Logger.getLogger(BlockCipherParameters.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(BlockCipherParameters.class.getName()) : null;
/** The underlying block cipher specification. */
protected BlockCipherParameterSpec cipherSpec;
private static final String DEFAULT_FORMAT = "ASN.1";
diff --git a/libjava/classpath/gnu/javax/crypto/jce/prng/ICMRandomSpi.java b/libjava/classpath/gnu/javax/crypto/jce/prng/ICMRandomSpi.java
index bbd5d47..b4fcdf8 100644
--- a/libjava/classpath/gnu/javax/crypto/jce/prng/ICMRandomSpi.java
+++ b/libjava/classpath/gnu/javax/crypto/jce/prng/ICMRandomSpi.java
@@ -1,5 +1,5 @@
/* ICMRandomSpi.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.
@@ -58,7 +58,8 @@ import java.util.logging.Logger;
public class ICMRandomSpi
extends SecureRandomSpi
{
- private static final Logger log = Logger.getLogger(ICMRandomSpi.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(ICMRandomSpi.class.getName()) : null;
/** Class-wide prng to generate random material for the underlying prng. */
private static final ICMGenerator prng; // blank final
static
diff --git a/libjava/classpath/gnu/javax/crypto/jce/prng/UMacRandomSpi.java b/libjava/classpath/gnu/javax/crypto/jce/prng/UMacRandomSpi.java
index 910e65c..20a467e 100644
--- a/libjava/classpath/gnu/javax/crypto/jce/prng/UMacRandomSpi.java
+++ b/libjava/classpath/gnu/javax/crypto/jce/prng/UMacRandomSpi.java
@@ -1,5 +1,5 @@
/* UMacRandomSpi.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.
@@ -57,7 +57,8 @@ import java.util.logging.Logger;
public class UMacRandomSpi
extends SecureRandomSpi
{
- private static final Logger log = Logger.getLogger(UMacRandomSpi.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(UMacRandomSpi.class.getName()) : null;
/** Class-wide prng to generate random material for the underlying prng. */
private static final UMacGenerator prng; // blank final
diff --git a/libjava/classpath/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java b/libjava/classpath/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java
index 89e9c4c..a1a19c3 100644
--- a/libjava/classpath/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java
+++ b/libjava/classpath/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java
@@ -1,5 +1,5 @@
/* GnuDHKeyPairGenerator.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -40,7 +40,6 @@ package gnu.javax.crypto.key.dh;
import gnu.java.security.Configuration;
import gnu.java.security.Registry;
-import gnu.java.security.hash.Sha160;
import gnu.java.security.key.IKeyPairGenerator;
import gnu.java.security.util.PRNG;
@@ -68,7 +67,9 @@ import javax.crypto.spec.DHParameterSpec;
public class GnuDHKeyPairGenerator
implements IKeyPairGenerator
{
- private static final Logger log = Logger.getLogger(GnuDHKeyPairGenerator.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(GnuDHKeyPairGenerator.class.getName()) : null;
+
/**
* Property name of an optional {@link SecureRandom} instance to use. The
* default is to use a classloader singleton from {@link PRNG}.
@@ -95,10 +96,8 @@ public class GnuDHKeyPairGenerator
public static final int DEFAULT_EXPONENT_SIZE = 160;
/** Default encoding format to use when none was specified. */
private static final int DEFAULT_ENCODING_FORMAT = Registry.RAW_ENCODING_ID;
- /** The SHA instance to use. */
- private Sha160 sha = new Sha160();
/** The optional {@link SecureRandom} instance to use. */
- private SecureRandom rnd = null;
+ private SecureRandom rnd;
/** The desired size in bits of the public prime (p). */
private int l;
/** The desired size in bits of the private exponent (x). */
diff --git a/libjava/classpath/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java b/libjava/classpath/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java
index 59e5bc9..25f3d84 100644
--- a/libjava/classpath/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java
+++ b/libjava/classpath/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java
@@ -1,5 +1,5 @@
/* SRPKeyPairGenerator.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,7 +59,9 @@ import java.util.logging.Logger;
public class SRPKeyPairGenerator
implements IKeyPairGenerator
{
- private static final Logger log = Logger.getLogger(SRPKeyPairGenerator.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(SRPKeyPairGenerator.class.getName()) : null;
+
private static final BigInteger ZERO = BigInteger.ZERO;
private static final BigInteger ONE = BigInteger.ONE;
private static final BigInteger TWO = BigInteger.valueOf(2L);
diff --git a/libjava/classpath/gnu/javax/crypto/keyring/Entry.java b/libjava/classpath/gnu/javax/crypto/keyring/Entry.java
index d459249..b29c044 100644
--- a/libjava/classpath/gnu/javax/crypto/keyring/Entry.java
+++ b/libjava/classpath/gnu/javax/crypto/keyring/Entry.java
@@ -1,5 +1,5 @@
/* Entry.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -50,7 +50,8 @@ import java.util.logging.Logger;
*/
public abstract class Entry
{
- private static final Logger log = Logger.getLogger(Entry.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(Entry.class.getName()) : null;
private static final String[] TYPES = new String[] {
"Encrypted",
"PasswordEncrypted",
diff --git a/libjava/classpath/gnu/javax/crypto/keyring/EnvelopeEntry.java b/libjava/classpath/gnu/javax/crypto/keyring/EnvelopeEntry.java
index 76aba7d..faaa7a8 100644
--- a/libjava/classpath/gnu/javax/crypto/keyring/EnvelopeEntry.java
+++ b/libjava/classpath/gnu/javax/crypto/keyring/EnvelopeEntry.java
@@ -1,5 +1,5 @@
/* EnvelopeEntry.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -58,7 +58,8 @@ import java.util.logging.Logger;
public abstract class EnvelopeEntry
extends Entry
{
- private static final Logger log = Logger.getLogger(EnvelopeEntry.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(EnvelopeEntry.class.getName()) : null;
/** The envelope that contains this one (if any). */
protected EnvelopeEntry containingEnvelope;
/** The contained entries. */
diff --git a/libjava/classpath/gnu/javax/crypto/keyring/GnuPublicKeyring.java b/libjava/classpath/gnu/javax/crypto/keyring/GnuPublicKeyring.java
index d7387f8..474014f 100644
--- a/libjava/classpath/gnu/javax/crypto/keyring/GnuPublicKeyring.java
+++ b/libjava/classpath/gnu/javax/crypto/keyring/GnuPublicKeyring.java
@@ -1,5 +1,5 @@
/* GnuPublicKeyring.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -55,7 +55,8 @@ public class GnuPublicKeyring
extends BaseKeyring
implements IPublicKeyring
{
- private static final Logger log = Logger.getLogger(GnuPublicKeyring.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(GnuPublicKeyring.class.getName()) : null;
public static final int USAGE = Registry.GKR_CERTIFICATES;
public GnuPublicKeyring(String mac, int macLen)
diff --git a/libjava/classpath/gnu/javax/crypto/mac/OMAC.java b/libjava/classpath/gnu/javax/crypto/mac/OMAC.java
index 6758b31..c9ea36e 100644
--- a/libjava/classpath/gnu/javax/crypto/mac/OMAC.java
+++ b/libjava/classpath/gnu/javax/crypto/mac/OMAC.java
@@ -1,5 +1,5 @@
/* OMAC.java --
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -65,7 +65,8 @@ import java.util.logging.Logger;
public class OMAC
implements IMac
{
- private static final Logger log = Logger.getLogger(OMAC.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(OMAC.class.getName()) : null;
private static final byte C1 = (byte) 0x87;
private static final byte C2 = 0x1b;
// Test key for OMAC-AES-128
diff --git a/libjava/classpath/gnu/javax/crypto/pad/BasePad.java b/libjava/classpath/gnu/javax/crypto/pad/BasePad.java
index feeaca2..50b3bf0 100644
--- a/libjava/classpath/gnu/javax/crypto/pad/BasePad.java
+++ b/libjava/classpath/gnu/javax/crypto/pad/BasePad.java
@@ -1,5 +1,5 @@
/* BasePad.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.
@@ -52,7 +52,8 @@ import java.util.logging.Logger;
public abstract class BasePad
implements IPad
{
- private static final Logger log = Logger.getLogger(BasePad.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(BasePad.class.getName()) : null;
/** The canonical name prefix of the padding algorithm. */
protected String name;
/** The block size, in bytes, for this instance. */
diff --git a/libjava/classpath/gnu/javax/crypto/pad/PKCS1_V1_5.java b/libjava/classpath/gnu/javax/crypto/pad/PKCS1_V1_5.java
index e303264..021107e 100644
--- a/libjava/classpath/gnu/javax/crypto/pad/PKCS1_V1_5.java
+++ b/libjava/classpath/gnu/javax/crypto/pad/PKCS1_V1_5.java
@@ -1,5 +1,5 @@
/* PKCS1_V1_5.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 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 PKCS1_V1_5
extends BasePad
{
- private static final Logger log = Logger.getLogger(PKCS1_V1_5.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(PKCS1_V1_5.class.getName()) : null;
private EME_PKCS1_V1_5 codec;
/**
diff --git a/libjava/classpath/gnu/javax/crypto/pad/PKCS7.java b/libjava/classpath/gnu/javax/crypto/pad/PKCS7.java
index 9dd67fc..1ee839e 100644
--- a/libjava/classpath/gnu/javax/crypto/pad/PKCS7.java
+++ b/libjava/classpath/gnu/javax/crypto/pad/PKCS7.java
@@ -1,5 +1,5 @@
/* PKCS7.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.
@@ -65,7 +65,8 @@ import java.util.logging.Logger;
public final class PKCS7
extends BasePad
{
- private static final Logger log = Logger.getLogger(PKCS7.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(PKCS7.class.getName()) : null;
/**
* Trivial package-private constructor for use by the <i>Factory</i> class.
diff --git a/libjava/classpath/gnu/javax/crypto/pad/TBC.java b/libjava/classpath/gnu/javax/crypto/pad/TBC.java
index 5cd1770..9fcc415 100644
--- a/libjava/classpath/gnu/javax/crypto/pad/TBC.java
+++ b/libjava/classpath/gnu/javax/crypto/pad/TBC.java
@@ -1,5 +1,5 @@
/* TBC.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.
@@ -64,7 +64,8 @@ import java.util.logging.Logger;
public final class TBC
extends BasePad
{
- private static final Logger log = Logger.getLogger(TBC.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(TBC.class.getName()) : null;
/**
* Trivial package-private constructor for use by the <i>Factory</i> class.
diff --git a/libjava/classpath/gnu/javax/crypto/prng/CSPRNG.java b/libjava/classpath/gnu/javax/crypto/prng/CSPRNG.java
index ecea2f4..04d381a 100644
--- a/libjava/classpath/gnu/javax/crypto/prng/CSPRNG.java
+++ b/libjava/classpath/gnu/javax/crypto/prng/CSPRNG.java
@@ -1,5 +1,5 @@
/* CSPRNG.java -- continuously-seeded pseudo-random number generator.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -87,7 +87,9 @@ import java.util.logging.Logger;
public class CSPRNG
extends BasePRNG
{
- private static final Logger log = Logger.getLogger(CSPRNG.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(CSPRNG.class.getName()) : null;
+
/**
* Property name for the list of files to read for random values. The mapped
* value is a list with the following values:
@@ -325,20 +327,24 @@ public class CSPRNG
attrib.put(PROGRAM_SOURCES, l);
l = new LinkedList();
for (int i = 0; (s = getProperty(OTHER + i)) != null; i++)
- try
- {
- Class c = Class.forName(s.trim());
- l.add(c.newInstance());
- }
- catch (ClassNotFoundException cnfe)
- {
- }
- catch (InstantiationException ie)
- {
- }
- catch (IllegalAccessException iae)
- {
- }
+ {
+ try
+ {
+ l.add((EntropySource)Class.forName(s.trim()).newInstance());
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ // ignore
+ }
+ catch (InstantiationException ie)
+ {
+ // ignore
+ }
+ catch (IllegalAccessException iae)
+ {
+ // ignore
+ }
+ }
attrib.put(OTHER_SOURCES, l);
instance.init(attrib);
return instance;
diff --git a/libjava/classpath/gnu/javax/crypto/sasl/SaslInputStream.java b/libjava/classpath/gnu/javax/crypto/sasl/SaslInputStream.java
index 6a6c857..e505d45 100644
--- a/libjava/classpath/gnu/javax/crypto/sasl/SaslInputStream.java
+++ b/libjava/classpath/gnu/javax/crypto/sasl/SaslInputStream.java
@@ -1,5 +1,5 @@
/* SaslInputStream.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -57,7 +57,8 @@ import javax.security.sasl.SaslServer;
public class SaslInputStream
extends InputStream
{
- private static final Logger log = Logger.getLogger(SaslInputStream.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(SaslInputStream.class.getName()) : null;
private SaslClient client;
private SaslServer server;
private int maxRawSendSize;
diff --git a/libjava/classpath/gnu/javax/crypto/sasl/SaslOutputStream.java b/libjava/classpath/gnu/javax/crypto/sasl/SaslOutputStream.java
index 0de1ce8..eee0ba0 100644
--- a/libjava/classpath/gnu/javax/crypto/sasl/SaslOutputStream.java
+++ b/libjava/classpath/gnu/javax/crypto/sasl/SaslOutputStream.java
@@ -1,5 +1,5 @@
/* SaslOutputStream.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -56,7 +56,8 @@ import javax.security.sasl.SaslServer;
public class SaslOutputStream
extends OutputStream
{
- private static final Logger log = Logger.getLogger(SaslOutputStream.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(SaslOutputStream.class.getName()) : null;
private SaslClient client;
private SaslServer server;
private int maxRawSendSize;
diff --git a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java
index 8e44e4e..c20d477 100644
--- a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java
+++ b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java
@@ -1,5 +1,5 @@
/* SRPClient.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -87,7 +87,8 @@ public class SRPClient
extends ClientMechanism
implements SaslClient
{
- private static final Logger log = Logger.getLogger(SRPClient.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(SRPClient.class.getName()) : null;
private String uid; // the unique key for this type of client
private String U; // the authentication identity
BigInteger N, g, A, B;
diff --git a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java
index fca5c3b..c92ada4 100644
--- a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java
+++ b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java
@@ -1,5 +1,5 @@
/* SRPServer.java --
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -79,7 +79,8 @@ public class SRPServer
extends ServerMechanism
implements SaslServer
{
- private static final Logger log = Logger.getLogger(SRPServer.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(SRPServer.class.getName()) : null;
private String U = null; // client's username
private BigInteger N, g, A, B;
private byte[] s; // salt
diff --git a/libjava/classpath/gnu/javax/net/ssl/provider/CipherSuite.java b/libjava/classpath/gnu/javax/net/ssl/provider/CipherSuite.java
index 1c59231..e3a0bc4 100644
--- a/libjava/classpath/gnu/javax/net/ssl/provider/CipherSuite.java
+++ b/libjava/classpath/gnu/javax/net/ssl/provider/CipherSuite.java
@@ -73,127 +73,127 @@ public final class CipherSuite implements Constructed
KeyExchangeAlgorithm.NONE,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.NULL, 0, 0x00, 0x00,
- "TLS_NULL_WITH_NULL_NULL");
+ "TLS_NULL_WITH_NULL_NULL", false);
public static final CipherSuite TLS_RSA_WITH_NULL_MD5 =
new CipherSuite (CipherAlgorithm.NULL,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.MD5, 0, 0x00, 0x01,
- "TLS_RSA_WITH_NULL_MD5");
+ "TLS_RSA_WITH_NULL_MD5", false);
public static final CipherSuite TLS_RSA_WITH_NULL_SHA =
new CipherSuite (CipherAlgorithm.NULL,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 0, 0x00, 0x02,
- "TLS_RSA_WITH_NULL_SHA");
+ "TLS_RSA_WITH_NULL_SHA", false);
public static final CipherSuite TLS_RSA_EXPORT_WITH_RC4_40_MD5 =
new CipherSuite (CipherAlgorithm.RC4,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.MD5, 5, 0x00, 0x03,
- "TLS_RSA_EXPORT_WITH_RC4_40_MD5");
+ "TLS_RSA_EXPORT_WITH_RC4_40_MD5", false);
public static final CipherSuite TLS_RSA_WITH_RC4_128_MD5 =
new CipherSuite (CipherAlgorithm.RC4,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.MD5, 16, 0x00, 0x04,
- "TLS_RSA_WITH_RC4_128_MD5");
+ "TLS_RSA_WITH_RC4_128_MD5", false);
public static final CipherSuite TLS_RSA_WITH_RC4_128_SHA =
new CipherSuite (CipherAlgorithm.RC4,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 16, 0x00, 0x05,
- "TLS_RSA_WITH_RC4_128_SHA");
+ "TLS_RSA_WITH_RC4_128_SHA", false);
public static final CipherSuite TLS_RSA_EXPORT_WITH_DES40_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 5, 0x00, 0x08,
- "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA");
+ "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA", true);
public static final CipherSuite TLS_RSA_WITH_DES_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 8, 0x00, 0x09,
- "TLS_RSA_WITH_DES_CBC_SHA");
+ "TLS_RSA_WITH_DES_CBC_SHA", true);
public static final CipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA =
new CipherSuite (CipherAlgorithm.DESede,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 24, 0x00, 0x0A,
- "TLS_RSA_WITH_3DES_EDE_CBC_SHA");
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA", true);
public static final CipherSuite TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DH_DSS,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 5, 0x00, 0x0B,
- "TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA");
+ "TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA", true);
public static final CipherSuite TLS_DH_DSS_WITH_DES_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DH_DSS,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 8, 0x00, 0x0C,
- "TLS_DH_DSS_WITH_DES_CBC_SHA");
+ "TLS_DH_DSS_WITH_DES_CBC_SHA", true);
public static final CipherSuite TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA =
new CipherSuite (CipherAlgorithm.DESede,
KeyExchangeAlgorithm.DH_DSS,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 24, 0x00, 0x0D,
- "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA");
+ "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA", true);
public static final CipherSuite TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DH_RSA,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 5, 0x00, 0x0E,
- "TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA");
+ "TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA", true);
public static final CipherSuite TLS_DH_RSA_WITH_DES_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DH_RSA,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 8, 0x00, 0x0F,
- "TLS_DH_RSA_WITH_DES_CBC_SHA");
+ "TLS_DH_RSA_WITH_DES_CBC_SHA", true);
public static final CipherSuite TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA =
new CipherSuite (CipherAlgorithm.DESede,
KeyExchangeAlgorithm.DH_RSA,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 24, 0x00, 0x10,
- "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA");
+ "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA", true);
public static final CipherSuite TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DHE_DSS, true,
SignatureAlgorithm.DSA,
MacAlgorithm.SHA, 5, 0x00, 0x11,
- "TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA");
+ "TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", true);
public static final CipherSuite TLS_DHE_DSS_WITH_DES_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DHE_DSS, true,
SignatureAlgorithm.DSA,
MacAlgorithm.SHA, 8, 0x00, 0x12,
- "TLS_DHE_DSS_WITH_DES_CBC_SHA");
+ "TLS_DHE_DSS_WITH_DES_CBC_SHA", true);
public static final CipherSuite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA =
new CipherSuite (CipherAlgorithm.DESede,
KeyExchangeAlgorithm.DHE_DSS, true,
SignatureAlgorithm.DSA,
MacAlgorithm.SHA, 24, 0x00, 0x13,
- "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA");
+ "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", true);
public static final CipherSuite TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DHE_RSA, true,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 5, 0x00, 0x14,
- "TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA");
+ "TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", true);
public static final CipherSuite TLS_DHE_RSA_WITH_DES_CBC_SHA =
new CipherSuite (CipherAlgorithm.DES,
KeyExchangeAlgorithm.DHE_RSA, true,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 8, 0x00, 0x15,
- "TLS_DHE_RSA_WITH_DES_CBC_SHA");
+ "TLS_DHE_RSA_WITH_DES_CBC_SHA", true);
public static final CipherSuite TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA =
new CipherSuite (CipherAlgorithm.DESede,
KeyExchangeAlgorithm.DHE_RSA, true,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 24, 0x00, 0x16,
- "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA");
+ "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA", true);
// AES CipherSuites.
public static final CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA =
@@ -201,61 +201,61 @@ public final class CipherSuite implements Constructed
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 16, 0x00, 0x2F,
- "TLS_RSA_WITH_AES_128_CBC_SHA");
+ "TLS_RSA_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_DH_DSS_WITH_AES_128_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DH_DSS,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x30,
- "TLS_DH_DSS_WITH_AES_128_CBC_SHA");
+ "TLS_DH_DSS_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_DH_RSA_WITH_AES_128_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DH_RSA,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x31,
- "TLS_DH_RSA_WITH_AES_128_CBC_SHA");
+ "TLS_DH_RSA_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DHE_DSS, true,
SignatureAlgorithm.DSA,
MacAlgorithm.SHA, 16, 0x00, 0x32,
- "TLS_DHE_DSS_WITH_AES_128_CBC_SHA");
+ "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DHE_RSA, true,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 16, 0x00, 0x33,
- "TLS_DHE_RSA_WITH_AES_128_CBC_SHA");
+ "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.RSA,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 32, 0x00, 0x35,
- "TLS_RSA_WITH_AES_256_CBC_SHA");
+ "TLS_RSA_WITH_AES_256_CBC_SHA", true);
public static final CipherSuite TLS_DH_DSS_WITH_AES_256_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DH_DSS,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 32, 0x00, 0x36,
- "TLS_DH_DSS_WITH_AES_256_CBC_SHA");
+ "TLS_DH_DSS_WITH_AES_256_CBC_SHA", true);
public static final CipherSuite TLS_DH_RSA_WITH_AES_256_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DH_RSA,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 32, 0x00, 0x37,
- "TLS_DH_RSA_WITH_AES_256_CBC_SHA");
+ "TLS_DH_RSA_WITH_AES_256_CBC_SHA", true);
public static final CipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DHE_DSS, true,
SignatureAlgorithm.DSA,
MacAlgorithm.SHA, 32, 0x00, 0x38,
- "TLS_DHE_DSS_WITH_AES_256_CBC_SHA");
+ "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", true);
public static final CipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA =
new CipherSuite (CipherAlgorithm.AES,
KeyExchangeAlgorithm.DHE_RSA, true,
SignatureAlgorithm.RSA,
MacAlgorithm.SHA, 32, 0x00, 0x39,
- "TLS_DHE_RSA_WITH_AES_256_CBC_SHA");
+ "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", true);
// Secure remote password (SRP) ciphersuites
// Actual ID values are TBD, so these are omitted until they are specified.
@@ -320,75 +320,75 @@ public final class CipherSuite implements Constructed
KeyExchangeAlgorithm.PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x8A,
- "TLS_PSK_WITH_RC4_128_SHA");
+ "TLS_PSK_WITH_RC4_128_SHA", true);
public static final CipherSuite TLS_PSK_WITH_3DES_EDE_CBC_SHA =
new CipherSuite(CipherAlgorithm.DESede,
KeyExchangeAlgorithm.PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 24, 0x00, 0x8B,
- "TLS_PSK_WITH_3DES_EDE_CBC_SHA");
+ "TLS_PSK_WITH_3DES_EDE_CBC_SHA", true);
public static final CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA =
new CipherSuite(CipherAlgorithm.AES,
KeyExchangeAlgorithm.PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x8C,
- "TLS_PSK_WITH_AES_128_CBC_SHA");
+ "TLS_PSK_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA =
new CipherSuite(CipherAlgorithm.AES,
KeyExchangeAlgorithm.PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 32, 0x00, 0x8D,
- "TLS_PSK_WITH_AES_256_CBC_SHA");
+ "TLS_PSK_WITH_AES_256_CBC_SHA", true);
public static final CipherSuite TLS_DHE_PSK_WITH_RC4_128_SHA =
new CipherSuite(CipherAlgorithm.RC4,
KeyExchangeAlgorithm.DHE_PSK, true,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x8E,
- "TLS_DHE_PSK_WITH_RC4_128_SHA");
+ "TLS_DHE_PSK_WITH_RC4_128_SHA", false);
public static final CipherSuite TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA =
new CipherSuite(CipherAlgorithm.DESede,
KeyExchangeAlgorithm.DHE_PSK, true,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 24, 0x00, 0x8F,
- "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA");
+ "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA", true);
public static final CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA =
new CipherSuite(CipherAlgorithm.AES,
KeyExchangeAlgorithm.DHE_PSK, true,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x90,
- "TLS_DHE_PSK_WITH_AES_128_CBC_SHA");
+ "TLS_DHE_PSK_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA =
new CipherSuite(CipherAlgorithm.AES,
KeyExchangeAlgorithm.DHE_PSK, true,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 32, 0x00, 0x91,
- "TLS_DHE_PSK_WITH_AES_256_CBC_SHA");
+ "TLS_DHE_PSK_WITH_AES_256_CBC_SHA", true);
public static final CipherSuite TLS_RSA_PSK_WITH_RC4_128_SHA =
new CipherSuite(CipherAlgorithm.RC4,
KeyExchangeAlgorithm.RSA_PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x92,
- "TLS_RSA_PSK_WITH_RC4_128_SHA");
+ "TLS_RSA_PSK_WITH_RC4_128_SHA", false);
public static final CipherSuite TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA =
new CipherSuite(CipherAlgorithm.DESede,
KeyExchangeAlgorithm.RSA_PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 24, 0x00, 0x93,
- "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA");
+ "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA", true);
public static final CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA =
new CipherSuite(CipherAlgorithm.AES,
KeyExchangeAlgorithm.RSA_PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 16, 0x00, 0x94,
- "TLS_RSA_PSK_WITH_AES_128_CBC_SHA");
+ "TLS_RSA_PSK_WITH_AES_128_CBC_SHA", true);
public static final CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA =
new CipherSuite(CipherAlgorithm.AES,
KeyExchangeAlgorithm.RSA_PSK,
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 32, 0x00, 0x95,
- "TLS_RSA_PSK_WITH_AES_256_CBC_SHA");
+ "TLS_RSA_PSK_WITH_AES_256_CBC_SHA", true);
// Ciphersuites from the OpenPGP extension draft.
// These disappeared from a more recent draft.
@@ -490,6 +490,7 @@ public final class CipherSuite implements Constructed
private final boolean ephemeralDH;
private final boolean exportable;
private final boolean isStream;
+ private final boolean isCBCMode;
private final int keyLength;
private final byte[] id;
private final String name;
@@ -505,10 +506,11 @@ public final class CipherSuite implements Constructed
final int keyLength,
final int id1,
final int id2,
- final String name)
+ final String name,
+ final boolean isCBCMode)
{
this (cipherAlgorithm, keyExchangeAlgorithm, false, signatureAlgorithm,
- macAlgorithm, keyLength, id1, id2, name);
+ macAlgorithm, keyLength, id1, id2, name, isCBCMode);
}
private CipherSuite (final CipherAlgorithm cipherAlgorithm,
@@ -519,7 +521,8 @@ public final class CipherSuite implements Constructed
final int keyLength,
final int id1,
final int id2,
- final String name)
+ final String name,
+ final boolean isCBCMode)
{
this.cipherAlgorithm = cipherAlgorithm;
this.keyExchangeAlgorithm = keyExchangeAlgorithm;
@@ -529,6 +532,7 @@ public final class CipherSuite implements Constructed
this.exportable = keyLength <= 5;
this.isStream = (cipherAlgorithm == CipherAlgorithm.NULL
|| cipherAlgorithm == CipherAlgorithm.RC4);
+ this.isCBCMode = isCBCMode;
this.keyLength = keyLength;
this.id = new byte[] { (byte) id1, (byte) id2 };
this.name = name.intern();
@@ -549,6 +553,7 @@ public final class CipherSuite implements Constructed
ephemeralDH = false;
exportable = false;
isStream = false;
+ isCBCMode = false;
keyLength = 0;
this.id = id;
name = null;
@@ -598,10 +603,10 @@ public final class CipherSuite implements Constructed
return new NullCipher ();
String alg = null;
- if (cipherAlgorithm == CipherAlgorithm.RC4)
- alg = "RC4";
- else
+ if (isCBCMode)
alg = cipherAlgorithm + "/CBC/NoPadding";
+ else
+ alg = cipherAlgorithm.toString();
GetSecurityPropertyAction gspa =
new GetSecurityPropertyAction ("jessie.jce.provider");
final String provider = (String) AccessController.doPrivileged (gspa);
@@ -834,4 +839,10 @@ public final class CipherSuite implements Constructed
}
return name;
}
+
+ public boolean isCBCMode()
+ {
+ return isCBCMode;
+ }
+
}
diff --git a/libjava/classpath/gnu/javax/net/ssl/provider/OutputSecurityParameters.java b/libjava/classpath/gnu/javax/net/ssl/provider/OutputSecurityParameters.java
index c6ed7d5..6174243 100644
--- a/libjava/classpath/gnu/javax/net/ssl/provider/OutputSecurityParameters.java
+++ b/libjava/classpath/gnu/javax/net/ssl/provider/OutputSecurityParameters.java
@@ -62,6 +62,17 @@ public class OutputSecurityParameters
private final CipherSuite suite;
private long sequence;
+ static final boolean enableCBCProtection;
+
+ static
+ {
+ String enabled = Util.getProperty("jsse.enableCBCProtection");
+ if (enabled == null)
+ enableCBCProtection = true;
+ else
+ enableCBCProtection = Boolean.valueOf(enabled);
+ }
+
public OutputSecurityParameters (final Cipher cipher, final Mac mac,
final Deflater deflater, SessionImpl session,
CipherSuite suite)
@@ -291,4 +302,11 @@ public class OutputSecurityParameters
{
return suite;
}
+
+ boolean needToSplitPayload()
+ {
+ return (session.version.compareTo(ProtocolVersion.TLS_1_1) < 0 &&
+ suite.isCBCMode() && enableCBCProtection);
+ }
+
}
diff --git a/libjava/classpath/gnu/javax/net/ssl/provider/SSLEngineImpl.java b/libjava/classpath/gnu/javax/net/ssl/provider/SSLEngineImpl.java
index b63fb2f..a62801f 100644
--- a/libjava/classpath/gnu/javax/net/ssl/provider/SSLEngineImpl.java
+++ b/libjava/classpath/gnu/javax/net/ssl/provider/SSLEngineImpl.java
@@ -768,10 +768,27 @@ public final class SSLEngineImpl extends SSLEngine
}
else
{
- inout = outsec.encrypt(sources, offset, length,
- ContentType.APPLICATION_DATA, sink);
- consumed = inout[0];
- produced = inout[1];
+ if (outsec.needToSplitPayload())
+ {
+ inout = outsec.encrypt(sources, offset, 1,
+ ContentType.APPLICATION_DATA, sink);
+ consumed = inout[0];
+ produced = inout[1];
+ if (length > 1)
+ {
+ inout = outsec.encrypt(sources, offset+1, length-1,
+ ContentType.APPLICATION_DATA, sink);
+ consumed += inout[0];
+ produced += inout[1];
+ }
+ }
+ else
+ {
+ inout = outsec.encrypt(sources, offset, length,
+ ContentType.APPLICATION_DATA, sink);
+ consumed = inout[0];
+ produced = inout[1];
+ }
}
if (Debug.DEBUG)
diff --git a/libjava/classpath/gnu/javax/print/PrinterDialog.java b/libjava/classpath/gnu/javax/print/PrinterDialog.java
index 6557baf..16ca7ed 100644
--- a/libjava/classpath/gnu/javax/print/PrinterDialog.java
+++ b/libjava/classpath/gnu/javax/print/PrinterDialog.java
@@ -1,5 +1,5 @@
/* PrinterDialog.java --
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -1452,12 +1452,8 @@ public final class PrinterDialog extends JDialog implements ActionListener
private boolean onlyPageDialog;
private PrintRequestAttributeSet atts;
- private final static ResourceBundle messages;
-
- static
- {
- messages = ResourceBundle.getBundle("gnu/javax/print/PrinterDialog");
- }
+ private final static ResourceBundle messages
+ = ResourceBundle.getBundle("gnu.javax.print.MessagesBundle");
// TODO LowPriority: Include checks so that if a specific value formerly
// selected is no more supported by the new service changes to the default.
diff --git a/libjava/classpath/gnu/javax/security/auth/login/ConfigFileParser.java b/libjava/classpath/gnu/javax/security/auth/login/ConfigFileParser.java
index 5c4c426..bebd036 100644
--- a/libjava/classpath/gnu/javax/security/auth/login/ConfigFileParser.java
+++ b/libjava/classpath/gnu/javax/security/auth/login/ConfigFileParser.java
@@ -1,5 +1,5 @@
/* ConfigFileParser.java -- JAAS Login Configuration default syntax parser
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,9 +91,11 @@ import javax.security.auth.login.AppConfigurationEntry;
*/
public final class ConfigFileParser
{
- private static final Logger log = Logger.getLogger(ConfigFileParser.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(ConfigFileParser.class.getName()) : null;
+
private ConfigFileTokenizer cft;
- private Map map = new HashMap();
+ private final Map map = new HashMap();
// default 0-arguments constructor
diff --git a/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java b/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java
index fc35bf7..f120f4e 100644
--- a/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java
+++ b/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java
@@ -1,5 +1,5 @@
/* ConfigFileTokenizer.java -- JAAS Login Configuration default syntax tokenizer
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -81,7 +81,9 @@ import java.util.logging.Logger;
*/
public class ConfigFileTokenizer
{
- private static final Logger log = Logger.getLogger(ConfigFileParser.class.getName());
+ private static final Logger log = Configuration.DEBUG ?
+ Logger.getLogger(ConfigFileParser.class.getName()) : null;
+
/** A constant indicating that the end of the stream has been read. */
public static final int TT_EOF = -1;
/** A constant indicating that a word token has been read. */
@@ -92,7 +94,7 @@ public class ConfigFileTokenizer
public String sval;
public int ttype;
- private BufferedReader br;
+ private final BufferedReader br;
boolean initialised;
private CPStringBuilder sb;
private int sbNdx;
@@ -103,10 +105,7 @@ public class ConfigFileTokenizer
/** Trivial constructor. */
ConfigFileTokenizer(Reader r)
{
- super();
-
br = r instanceof BufferedReader ? (BufferedReader) r : new BufferedReader(r);
- initialised = false;
}
// Class methods
diff --git a/libjava/classpath/gnu/javax/security/auth/login/GnuConfiguration.java b/libjava/classpath/gnu/javax/security/auth/login/GnuConfiguration.java
index 20d8f3a..6afe1cd 100644
--- a/libjava/classpath/gnu/javax/security/auth/login/GnuConfiguration.java
+++ b/libjava/classpath/gnu/javax/security/auth/login/GnuConfiguration.java
@@ -1,5 +1,5 @@
/* GnuConfiguration.java -- GNU Classpath implementation of JAAS Configuration
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -128,7 +128,9 @@ import javax.security.auth.login.Configuration;
*/
public final class GnuConfiguration extends Configuration
{
- private static final Logger log = Logger.getLogger(GnuConfiguration.class.getName());
+ private static final Logger log = gnu.java.security.Configuration.DEBUG ?
+ Logger.getLogger(GnuConfiguration.class.getName()) : null;
+
/**
* The internal map of login modules keyed by application name. Each entry in
* this map is a {@link List} of {@link AppConfigurationEntry}s for that