Merge GNU Classpath 0.99 into libjava.
From-SVN: r185741
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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). */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user