diff options
Diffstat (limited to 'libjava/classpath/java/security')
82 files changed, 872 insertions, 873 deletions
diff --git a/libjava/classpath/java/security/AccessControlContext.java b/libjava/classpath/java/security/AccessControlContext.java index ffcfc0e..fd96475 100644 --- a/libjava/classpath/java/security/AccessControlContext.java +++ b/libjava/classpath/java/security/AccessControlContext.java @@ -40,8 +40,8 @@ package java.security; import java.util.HashSet; /** - * AccessControlContext makes system resource access decsion - * based on permission rights. + * AccessControlContext makes system resource access decsion + * based on permission rights. * * It is used for a specific context and has only one method * checkPermission. It is similar to AccessController except @@ -60,7 +60,7 @@ public final class AccessControlContext /** * Construct a new AccessControlContext with the specified - * ProtectionDomains. <code>context</code> must not be + * ProtectionDomains. <code>context</code> must not be * null and duplicates will be removed. * * @param context The ProtectionDomains to use @@ -87,29 +87,29 @@ public final class AccessControlContext * @since 1.3 */ public AccessControlContext(AccessControlContext acc, - DomainCombiner combiner) + DomainCombiner combiner) { AccessControlContext acc2 = null; SecurityManager sm = System.getSecurityManager (); if (sm != null) { - Permission perm = - new SecurityPermission ("createAccessControlContext"); - - // The default SecurityManager.checkPermission(perm) just calls - // AccessController.checkPermission(perm) which in turn just - // calls AccessController.getContext().checkPermission(perm). - // This means AccessController.getContext() is called twice, - // once for the security check and once by us. It's a very - // expensive call (on gcj at least) so if we're using the - // default security manager we avoid this duplication. - if (sm.getClass() == SecurityManager.class) - { - acc2 = AccessController.getContext (); - acc2.checkPermission (perm); - } - else - sm.checkPermission (perm); + Permission perm = + new SecurityPermission ("createAccessControlContext"); + + // The default SecurityManager.checkPermission(perm) just calls + // AccessController.checkPermission(perm) which in turn just + // calls AccessController.getContext().checkPermission(perm). + // This means AccessController.getContext() is called twice, + // once for the security check and once by us. It's a very + // expensive call (on gcj at least) so if we're using the + // default security manager we avoid this duplication. + if (sm.getClass() == SecurityManager.class) + { + acc2 = AccessController.getContext (); + acc2.checkPermission (perm); + } + else + sm.checkPermission (perm); } if (acc2 == null) acc2 = AccessController.getContext (); @@ -137,7 +137,7 @@ public final class AccessControlContext /** * Determines whether or not the specific permission is granted - * depending on the context it is within. + * depending on the context it is within. * * @param perm a permission to check * @@ -146,19 +146,19 @@ public final class AccessControlContext public void checkPermission(Permission perm) throws AccessControlException { if (protectionDomains.length == 0) - throw new AccessControlException ("permission " - + perm - + " not granted: no protection domains"); + throw new AccessControlException ("permission " + + perm + + " not granted: no protection domains"); for (int i = 0; i < protectionDomains.length; i++) { - final ProtectionDomain domain = protectionDomains[i]; - if (!domain.implies(perm)) - throw new AccessControlException ("permission " - + perm - + " not granted: " - + domain - + " does not imply it."); + final ProtectionDomain domain = protectionDomains[i]; + if (!domain.implies(perm)) + throw new AccessControlException ("permission " + + perm + + " not granted: " + + domain + + " does not imply it."); } } @@ -176,10 +176,10 @@ public final class AccessControlContext { if (obj instanceof AccessControlContext) { - AccessControlContext acc = (AccessControlContext) obj; + AccessControlContext acc = (AccessControlContext) obj; - if (acc.protectionDomains.length != protectionDomains.length) - return false; + if (acc.protectionDomains.length != protectionDomains.length) + return false; int i, j; for (i = 0; i < protectionDomains.length; i++) diff --git a/libjava/classpath/java/security/AccessController.java b/libjava/classpath/java/security/AccessController.java index 6f8b3ec..ec5b14c 100644 --- a/libjava/classpath/java/security/AccessController.java +++ b/libjava/classpath/java/security/AccessController.java @@ -155,7 +155,7 @@ public final class AccessController } catch (RuntimeException e) { - throw e; + throw e; } catch (Exception e) { @@ -196,7 +196,7 @@ public final class AccessController } catch (RuntimeException e) { - throw e; + throw e; } catch (Exception e) { diff --git a/libjava/classpath/java/security/AlgorithmParameterGenerator.java b/libjava/classpath/java/security/AlgorithmParameterGenerator.java index da1ea46..a92552b 100644 --- a/libjava/classpath/java/security/AlgorithmParameterGenerator.java +++ b/libjava/classpath/java/security/AlgorithmParameterGenerator.java @@ -48,7 +48,7 @@ import java.security.spec.AlgorithmParameterSpec; /** * <code>AlgorithmParameterGenerator</code> is used to generate algorithm * parameters for specified algorithms. - * + * * <p>In case the client does not explicitly initialize the * <code>AlgorithmParameterGenerator</code> (via a call to an * <code>init()</code> method), each provider must supply (and document) a @@ -73,7 +73,7 @@ public class AlgorithmParameterGenerator /** * Constructs a new instance of <code>AlgorithmParameterGenerator</code>. - * + * * @param paramGenSpi * the generator to use. * @param provider @@ -82,8 +82,8 @@ public class AlgorithmParameterGenerator * the algorithm to use. */ protected AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi - paramGenSpi, Provider provider, - String algorithm) + paramGenSpi, Provider provider, + String algorithm) { this.paramGenSpi = paramGenSpi; this.provider = provider; @@ -99,7 +99,7 @@ public class AlgorithmParameterGenerator /** * Returns a new <code>AlgorithmParameterGenerator</code> instance which * generates algorithm parameters for the specified algorithm. - * + * * @param algorithm the name of algorithm to use. * @return the new instance. * @throws NoSuchAlgorithmException if <code>algorithm</code> is not @@ -129,7 +129,7 @@ public class AlgorithmParameterGenerator /** * Returns a new <code>AlgorithmParameterGenerator</code> instance which * generates algorithm parameters for the specified algorithm. - * + * * @param algorithm the name of algorithm to use. * @param provider the name of the {@link Provider} to use. * @return the new instance. @@ -157,7 +157,7 @@ public class AlgorithmParameterGenerator /** * Returns a new <code>AlgorithmParameterGenerator</code> instance which * generates algorithm parameters for the specified algorithm. - * + * * @param algorithm the name of algorithm to use. * @param provider the {@link Provider} to use. * @return the new instance. @@ -213,7 +213,7 @@ public class AlgorithmParameterGenerator /** * Initializes this instance with the specified size. Since no source of * randomness is supplied, a default one will be used. - * + * * @param size * size (in bits) to use. */ @@ -225,7 +225,7 @@ public class AlgorithmParameterGenerator /** * Initializes this instance with the specified key-size and source of * randomness. - * + * * @param size * the size (in bits) to use. * @param random @@ -239,7 +239,7 @@ public class AlgorithmParameterGenerator /** * Initializes this instance with the specified {@link AlgorithmParameterSpec}. * Since no source of randomness is supplied, a default one will be used. - * + * * @param genParamSpec * the {@link AlgorithmParameterSpec} to use. * @throws InvalidAlgorithmParameterException @@ -254,7 +254,7 @@ public class AlgorithmParameterGenerator /** * Initializes this instance with the specified {@link AlgorithmParameterSpec} * and source of randomness. - * + * * @param genParamSpec * the {@link AlgorithmParameterSpec} to use. * @param random diff --git a/libjava/classpath/java/security/AlgorithmParameterGeneratorSpi.java b/libjava/classpath/java/security/AlgorithmParameterGeneratorSpi.java index 3143ea7..15f39f6 100644 --- a/libjava/classpath/java/security/AlgorithmParameterGeneratorSpi.java +++ b/libjava/classpath/java/security/AlgorithmParameterGeneratorSpi.java @@ -39,8 +39,8 @@ package java.security; import java.security.spec.AlgorithmParameterSpec; /** - AlgorithmParameterGeneratorSpi is the Service Provider - Interface for the AlgorithmParameterGenerator class. + AlgorithmParameterGeneratorSpi is the Service Provider + Interface for the AlgorithmParameterGenerator class. This class is used to generate the algorithm parameters for a specific algorithm. @@ -61,7 +61,7 @@ public abstract class AlgorithmParameterGeneratorSpi Initializes the parameter generator with the specified size and SecureRandom - @param size the size( in number of bits) + @param size the size( in number of bits) @param random the SecureRandom class to use for randomness */ protected abstract void engineInit(int size, SecureRandom random); @@ -80,7 +80,7 @@ public abstract class AlgorithmParameterGeneratorSpi @throws InvalidAlgorithmParameterException genParamSpec is invalid */ protected abstract void engineInit(AlgorithmParameterSpec genParamSpec, - SecureRandom random) throws + SecureRandom random) throws InvalidAlgorithmParameterException; diff --git a/libjava/classpath/java/security/AlgorithmParameters.java b/libjava/classpath/java/security/AlgorithmParameters.java index 3de8ad0..ba80514 100644 --- a/libjava/classpath/java/security/AlgorithmParameters.java +++ b/libjava/classpath/java/security/AlgorithmParameters.java @@ -69,7 +69,7 @@ public class AlgorithmParameters /** * Constructs a new instance of <code>AlgorithmParameters</code>. - * + * * @param paramSpi * the engine to use. * @param provider @@ -97,7 +97,7 @@ public class AlgorithmParameters * <p> * The returned <code>AlgorithmParameters</code> must still be initialized * with an <code>init()</code> method. - * + * * @param algorithm the algorithm to use. * @return the new instance repesenting the desired algorithm. * @throws NoSuchAlgorithmException if the algorithm is not implemented by any @@ -131,7 +131,7 @@ public class AlgorithmParameters * The returned <code>AlgorithmParameters</code> must still be intialized * with an <code>init()</code> method. * </p> - * + * * @param algorithm the algorithm to use. * @param provider the name of the {@link Provider} to use. * @return the new instance repesenting the desired algorithm. @@ -162,7 +162,7 @@ public class AlgorithmParameters * <p> * The returned <code>AlgorithmParameters</code> must still be intialized * with an <code>init()</code> method. - * + * * @param algorithm the algorithm to use. * @param provider the {@link Provider} to use. * @return the new instance repesenting the desired algorithm. @@ -213,7 +213,7 @@ public class AlgorithmParameters /** * Initializes the engine with the specified {@link AlgorithmParameterSpec}. - * + * * @param paramSpec * A {@link AlgorithmParameterSpec} to use. * @throws InvalidParameterSpecException @@ -230,7 +230,7 @@ public class AlgorithmParameters * array and decodes them according to the ASN.1 specification. If the ASN.1 * specification exists then it succeeds otherwise an {@link IOException} is * thrown. - * + * * @param params * the parameters to use. * @throws IOException @@ -247,7 +247,7 @@ public class AlgorithmParameters * If <code>format</code> is <code>null</code>, then this method decodes the * byte array using the ASN.1 specification if it exists, otherwise it throws * an {@link IOException}. - * + * * @param params * the parameters to use. * @param format @@ -263,7 +263,7 @@ public class AlgorithmParameters /** * Returns a new instance of <code>AlgorithmParameters</code> as a * designated parameter specification {@link Class}. - * + * * @param paramSpec * the {@link Class} to use. * @return the parameter specification. @@ -280,7 +280,7 @@ public class AlgorithmParameters /** * Returns the parameters in the default encoding format. The primary encoding * format is ASN.1 if it exists for the specified type. - * + * * @return byte array representing the parameters. */ public final byte[] getEncoded() throws IOException @@ -292,7 +292,7 @@ public class AlgorithmParameters * Returns the parameters in the specified encoding format. If * <code>format</code> is <code>null</code> then the ASN.1 encoding * format is used if it exists for the specified type. - * + * * @param format * the name of the encoding format to use. * @return the parameters encoded using the specified encoding scheme. @@ -307,7 +307,7 @@ public class AlgorithmParameters /** * Returns a string representation of the encoded form. - * + * * @return a string representation of the encoded form. */ public final String toString() diff --git a/libjava/classpath/java/security/AlgorithmParametersSpi.java b/libjava/classpath/java/security/AlgorithmParametersSpi.java index bd61ce7..15cc1c6 100644 --- a/libjava/classpath/java/security/AlgorithmParametersSpi.java +++ b/libjava/classpath/java/security/AlgorithmParametersSpi.java @@ -60,7 +60,7 @@ public abstract class AlgorithmParametersSpi } /** - * Initializes the engine with the specified + * Initializes the engine with the specified * AlgorithmParameterSpec class. * * @param paramSpec A AlgorithmParameterSpec to initialize with @@ -72,7 +72,7 @@ public abstract class AlgorithmParametersSpi throws InvalidParameterSpecException; /** - * Initializes the engine with the specified + * Initializes the engine with the specified * parameters stored in the byte array and decodes them * according to the ASN.1 specification. If the ASN.1 * specification exists then it succeeds or else it throws @@ -85,10 +85,10 @@ public abstract class AlgorithmParametersSpi protected abstract void engineInit(byte[]params) throws IOException; /** - * Initializes the engine with the specified + * Initializes the engine with the specified * parameters stored in the byte array and decodes them - * according to the specified decoding specification. - * If format is null, then it is decoded using the ASN.1 + * according to the specified decoding specification. + * If format is null, then it is decoded using the ASN.1 * specification if it exists or else it throws * IOException. * @@ -113,13 +113,13 @@ public abstract class AlgorithmParametersSpi * @throws InvalidParameterSpecException if the paramSpec is an * invalid parameter class */ - protected abstract <T extends AlgorithmParameterSpec> + protected abstract <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException; /** - * Returns the parameters in the default encoding format. + * Returns the parameters in the default encoding format. * The primary encoding format is ASN.1 format if it exists * for the specified type. * @@ -129,9 +129,9 @@ public abstract class AlgorithmParametersSpi /** - * Returns the parameters in the specified encoding format. - * If <code>format</code> is <code>null</code> then the - * primary encoding format is used, the ASN.1 format, + * Returns the parameters in the specified encoding format. + * If <code>format</code> is <code>null</code> then the + * primary encoding format is used, the ASN.1 format, * if it exists for the specified type. * * @return byte array representing the parameters @@ -140,7 +140,7 @@ public abstract class AlgorithmParametersSpi throws IOException; /** - * Returns a string describing the parameters in the + * Returns a string describing the parameters in the * AlgorithmParametersSpi class. * * @return A string representing the format of the parameters. diff --git a/libjava/classpath/java/security/CodeSource.java b/libjava/classpath/java/security/CodeSource.java index 90eb089..dd353ed 100644 --- a/libjava/classpath/java/security/CodeSource.java +++ b/libjava/classpath/java/security/CodeSource.java @@ -195,14 +195,14 @@ public class CodeSource implements Serializable * * <p>For example, each of these locations imply the location * "http://java.sun.com/classes/foo.jar":</p> - * + * * <pre> * http: * http://*.sun.com/classes/* * http://java.sun.com/classes/- * http://java.sun.com/classes/foo.jar * </pre> - * + * * <p>Note that the code source with null location and null certificates implies * all other code sources.</p> * diff --git a/libjava/classpath/java/security/DigestInputStream.java b/libjava/classpath/java/security/DigestInputStream.java index 0d4a9d0..c0a74f3 100644 --- a/libjava/classpath/java/security/DigestInputStream.java +++ b/libjava/classpath/java/security/DigestInputStream.java @@ -43,8 +43,8 @@ import java.io.IOException; import java.io.InputStream; /** - * DigestInputStream is a class that ties an InputStream with a - * MessageDigest. The Message Digest is used by the class to + * DigestInputStream is a class that ties an InputStream with a + * MessageDigest. The Message Digest is used by the class to * update it self as bytes are read from the InputStream. * * The updating to the digest depends on the on flag which is set @@ -57,7 +57,7 @@ import java.io.InputStream; public class DigestInputStream extends FilterInputStream { /** - * The message digest for the DigestInputStream + * The message digest for the DigestInputStream */ protected MessageDigest digest; @@ -66,7 +66,7 @@ public class DigestInputStream extends FilterInputStream /** * Constructs a new DigestInputStream. - * It associates a MessageDigest with the stream to + * It associates a MessageDigest with the stream to * compute the stream as data is written. * * @param stream An InputStream to associate this stream with @@ -80,7 +80,7 @@ public class DigestInputStream extends FilterInputStream } /** - * Returns the MessageDigest associated with this DigestInputStream + * Returns the MessageDigest associated with this DigestInputStream * * @return The MessageDigest used to hash this stream */ @@ -99,12 +99,12 @@ public class DigestInputStream extends FilterInputStream this.digest = digest; } - /** + /** * Reads a byte from the input stream and updates the digest. - * This method reads the underlying input stream and if the + * This method reads the underlying input stream and if the * on flag is true then updates the message digest. * - * @return Returns a byte from the input stream, -1 is returned to indicate that + * @return Returns a byte from the input stream, -1 is returned to indicate that * the end of stream was reached before this read call * * @throws IOException if an IO error occurs in the underlying input stream, @@ -120,15 +120,15 @@ public class DigestInputStream extends FilterInputStream return temp; } - /** + /** * Reads bytes from the input stream and updates the digest. - * This method reads the underlying input stream and if the + * This method reads the underlying input stream and if the * on flag is true then updates the message digest. * * @param b a byte array to store the data from the input stream * @param off an offset to start at in the array * @param len length of data to read - * @return Returns count of bytes read, -1 is returned to indicate that + * @return Returns count of bytes read, -1 is returned to indicate that * the end of stream was reached before this read call * * @throws IOException if an IO error occurs in the underlying input stream, diff --git a/libjava/classpath/java/security/DigestOutputStream.java b/libjava/classpath/java/security/DigestOutputStream.java index 037b39e..748f83d 100644 --- a/libjava/classpath/java/security/DigestOutputStream.java +++ b/libjava/classpath/java/security/DigestOutputStream.java @@ -105,7 +105,7 @@ public class DigestOutputStream extends FilterOutputStream * * @param b A byte to write to the output stream * - * @exception IOException if the underlying output stream + * @exception IOException if the underlying output stream * cannot write the byte, this is thrown. */ public void write(int b) throws IOException @@ -124,7 +124,7 @@ public class DigestOutputStream extends FilterOutputStream * @param off Offset to start to start at in array * @param len Length of data to write * - * @exception IOException if the underlying output stream + * @exception IOException if the underlying output stream * cannot write the bytes, this is thrown. */ public void write(byte[]b, int off, int len) throws IOException diff --git a/libjava/classpath/java/security/GeneralSecurityException.java b/libjava/classpath/java/security/GeneralSecurityException.java index 87e51ce..b2594c5 100644 --- a/libjava/classpath/java/security/GeneralSecurityException.java +++ b/libjava/classpath/java/security/GeneralSecurityException.java @@ -40,7 +40,7 @@ package java.security; /** * This class is the common superclass of all security exceptions. All * exceptions in java.security extend this class with the exception (no - * pun intended) of <code>AccessControlException</code> and + * pun intended) of <code>AccessControlException</code> and * <code>CertificateException</code> (which extend * <code>SecurityException</code>), <code>ProviderException</code> * (<code>RuntimeException</code>), and <code>InvalidParamterException</code> diff --git a/libjava/classpath/java/security/Identity.java b/libjava/classpath/java/security/Identity.java index c9df0a5..83ec4c8 100644 --- a/libjava/classpath/java/security/Identity.java +++ b/libjava/classpath/java/security/Identity.java @@ -44,14 +44,14 @@ import java.util.Vector; * The <code>Identity</code> class is used to represent people and companies * that can be authenticated using public key encryption. The identities can * also be abstract objects such as smart cards. - * + * * <p><code>Identity</code> objects store a name and public key for each * identity. The names cannot be changed and the identities can be scoped. Each * identity (name and public key) within a scope are unique to that scope.</p> - * + * * <p>Each identity has a set of ceritificates which all specify the same * public key, but not necessarily the same name.</p> - * + * * <p>The <code>Identity</code> class can be subclassed to allow additional * information to be attached to it.</p> * @@ -81,7 +81,7 @@ public abstract class Identity implements Principal, Serializable /** * Constructs a new instance of <code>Identity</code> with the specified * name and scope. - * + * * @param name * the name to use. * @param scope @@ -99,7 +99,7 @@ public abstract class Identity implements Principal, Serializable /** * Constructs a new instance of <code>Identity</code> with the specified * name and no scope. - * + * * @param name * the name to use. */ @@ -133,7 +133,7 @@ public abstract class Identity implements Principal, Serializable /** * Sets the public key for this identity. The old key and all certificates * are removed. - * + * * @param key * the public key to use. * @throws KeyManagementException @@ -154,7 +154,7 @@ public abstract class Identity implements Principal, Serializable /** * Sets the general information string. - * + * * @param info * the general information string. * @throws SecurityException @@ -183,7 +183,7 @@ public abstract class Identity implements Principal, Serializable * Adds a certificate to the list of ceritificates for this identity. The * public key in this certificate must match the existing public key if it * exists. - * + * * @param certificate * the certificate to add. * @throws KeyManagementException @@ -202,15 +202,15 @@ public abstract class Identity implements Principal, Serializable // Check public key of this certificate against the first one in the vector if (certificates.size() > 0) { - if (((Certificate) certificates.firstElement()).getPublicKey() != publicKey) - throw new KeyManagementException("Public key does not match"); + if (((Certificate) certificates.firstElement()).getPublicKey() != publicKey) + throw new KeyManagementException("Public key does not match"); } certificates.addElement(certificate); } /** * Removes a certificate from the list of ceritificates for this identity. - * + * * @param certificate * the certificate to remove. * @throws KeyManagementException @@ -248,7 +248,7 @@ public abstract class Identity implements Principal, Serializable * checks if they are the same object, then if the name and scope match and * returns <code>true</code> if successful. If these tests fail, the * {@link #identityEquals(Identity)} method is called. - * + * * @return <code>true</code> if they are equal, <code>false</code> * otherwise. */ @@ -256,14 +256,14 @@ public abstract class Identity implements Principal, Serializable { if (identity instanceof Identity) { - if (identity == this) - return true; + if (identity == this) + return true; - if ((((Identity) identity).getName().equals(this.name)) && - (((Identity) identity).getScope().equals(this.scope))) - return true; + if ((((Identity) identity).getName().equals(this.name)) && + (((Identity) identity).getScope().equals(this.scope))) + return true; - return identityEquals((Identity) identity); + return identityEquals((Identity) identity); } return false; } @@ -272,19 +272,19 @@ public abstract class Identity implements Principal, Serializable * Checks for equality between this Identity and a specified object. A * subclass should override this method. The default behavior is to return * <code>true</code> if the public key and names match. - * + * * @return <code>true</code> if they are equal, <code>false</code> * otherwise. */ protected boolean identityEquals(Identity identity) { return ((identity.getName().equals(this.name)) && - (identity.getPublicKey().equals(this.publicKey))); + (identity.getPublicKey().equals(this.publicKey))); } /** * Returns a string representation of this Identity. - * + * * @return a string representation of this Identity. * @throws SecurityException * if a {@link SecurityManager} is installed which disallows this @@ -302,7 +302,7 @@ public abstract class Identity implements Principal, Serializable /** * Returns a detailed string representation of this Identity. - * + * * @param detailed * indicates whether or detailed information is desired. * @return a string representation of this Identity. @@ -318,13 +318,13 @@ public abstract class Identity implements Principal, Serializable if (detailed) { - /* TODO: Insert proper detailed format here */ - return (name + ":@" + scope + " Public Key: " + publicKey); + /* TODO: Insert proper detailed format here */ + return (name + ":@" + scope + " Public Key: " + publicKey); } else { - /* TODO: Insert proper format here */ - return (name + ":@" + scope + " Public Key: " + publicKey); + /* TODO: Insert proper format here */ + return (name + ":@" + scope + " Public Key: " + publicKey); } } diff --git a/libjava/classpath/java/security/IdentityScope.java b/libjava/classpath/java/security/IdentityScope.java index 610d353..4391fbd 100644 --- a/libjava/classpath/java/security/IdentityScope.java +++ b/libjava/classpath/java/security/IdentityScope.java @@ -43,14 +43,14 @@ import java.util.Enumeration; * <code>IdentityScope</code> represents a scope of an identity. * <code>IdentityScope</code> is also an {@link Identity} and can have a name * and scope along with the other qualitites identities possess. - * + * * <p>An <code>IdentityScope</code> contains other {@link Identity} objects. * All {@link Identity} objects are manipulated in the scope the same way. The * scope is supposed to apply different scope to different type of * Identities.</p> - * + * * <p>No identity within the same scope can have the same public key.</p> - * + * * @author Mark Benvenuto * @see Identity * @see Signer @@ -73,7 +73,7 @@ public abstract class IdentityScope extends Identity /** * Constructs a new instance of <code>IdentityScope</code> with the * specified name and no scope. - * + * * @param name * the name to use. */ @@ -85,7 +85,7 @@ public abstract class IdentityScope extends Identity /** * Constructs a new instance of <code>IdentityScope</code> with the * specified name and {@link IdentityScope}. - * + * * @param name * the name to use. * @param scope @@ -101,22 +101,22 @@ public abstract class IdentityScope extends Identity /** * Returns the system's Scope. - * + * * @return the system's Scope. */ public static IdentityScope getSystemScope() { if (systemScope == null) { - //Load it - //systemScope; + //Load it + //systemScope; } return systemScope; } /** * Sets the scope of the system. - * + * * @param scope * the new system scope. * @throws SecurityException @@ -134,14 +134,14 @@ public abstract class IdentityScope extends Identity /** * Returns the number of entries within this <code>IdentityScope</code>. - * + * * @return the number of entries within this <code>IdentityScope</code>. */ public abstract int size(); /** * Returns the specified {@link Identity}, by name, within this scope. - * + * * @param name * name of {@link Identity} to get. * @return an {@link Identity} representing the name or <code>null</code> if @@ -152,7 +152,7 @@ public abstract class IdentityScope extends Identity /** * Returns the specified {@link Identity}, by {@link Principal}, within this * scope. - * + * * @param principal * the {@link Principal} to use. * @return an identity representing the {@link Principal} or <code>null</code> @@ -165,7 +165,7 @@ public abstract class IdentityScope extends Identity /** * Returns the specified {@link Identity}, by public key, within this scope. - * + * * @param key * the {@link PublicKey} to use. * @return an identity representing the public key or <code>null</code> if @@ -175,7 +175,7 @@ public abstract class IdentityScope extends Identity /** * Adds an identity to his scope. - * + * * @param identity * the {@link Identity} to add. * @throws KeyManagementException @@ -187,7 +187,7 @@ public abstract class IdentityScope extends Identity /** * Removes an identity in this scope. - * + * * @param identity * the {@link Identity} to remove. * @throws KeyManagementException @@ -198,7 +198,7 @@ public abstract class IdentityScope extends Identity /** * Returns an {@link Enumeration} of identities in this scope. - * + * * @return an {@link Enumeration} of the identities in this scope. */ public abstract Enumeration<Identity> identities(); @@ -206,7 +206,7 @@ public abstract class IdentityScope extends Identity /** * Returns a string representing this instance. It includes the name, the * scope name, and number of identities. - * + * * @return a string representation of this instance. */ public String toString() diff --git a/libjava/classpath/java/security/KeyFactory.java b/libjava/classpath/java/security/KeyFactory.java index f06004b..6f47de0 100644 --- a/libjava/classpath/java/security/KeyFactory.java +++ b/libjava/classpath/java/security/KeyFactory.java @@ -50,7 +50,7 @@ import java.security.spec.KeySpec; * Key factories are used to convert keys (opaque cryptographic keys of type * {@link Key}) into key specifications (transparent representations of the * underlying key material). - * + * * <p>Key factories are bi-directional. They allow a key class to be converted * into a key specification (key material) and back again. For example DSA * public keys can be specified as <code>DSAPublicKeySpec</code> or @@ -76,7 +76,7 @@ public class KeyFactory /** * Constructs a new instance of <code>KeyFactory</code> with the specified * parameters. - * + * * @param keyFacSpi * the key factory to use. * @param provider @@ -85,7 +85,7 @@ public class KeyFactory * the name of the key algorithm to use. */ protected KeyFactory(KeyFactorySpi keyFacSpi, Provider provider, - String algorithm) + String algorithm) { this.keyFacSpi = keyFacSpi; this.provider = provider; @@ -95,7 +95,7 @@ public class KeyFactory /** * Returns a new instance of <code>KeyFactory</code> representing the * specified key factory. - * + * * @param algorithm the name of algorithm to use. * @return a new instance repesenting the desired algorithm. * @throws NoSuchAlgorithmException if the algorithm is not implemented by any @@ -125,7 +125,7 @@ public class KeyFactory /** * Returns a new instance of <code>KeyFactory</code> representing the * specified key factory from the specified provider. - * + * * @param algorithm the name of algorithm to use. * @param provider the name of the provider to use. * @return a new instance repesenting the desired algorithm. @@ -152,7 +152,7 @@ public class KeyFactory /** * Returns a new instance of <code>KeyFactory</code> representing the * specified key factory from the designated {@link Provider}. - * + * * @param algorithm the name of algorithm to use. * @param provider the {@link Provider} to use. * @return a new instance repesenting the desired algorithm. @@ -195,7 +195,7 @@ public class KeyFactory /** * Returns the {@link Provider} of this instance. - * + * * @return the {@link Provider} of this instance. */ public final Provider getProvider() @@ -205,7 +205,7 @@ public class KeyFactory /** * Returns the name of the algorithm used. - * + * * @return the name of the algorithm used. */ public final String getAlgorithm() @@ -215,7 +215,7 @@ public class KeyFactory /** * Generates a public key from the provided key specification. - * + * * @param keySpec * the key specification. * @return the public key. @@ -230,7 +230,7 @@ public class KeyFactory /** * Generates a private key from the provided key specification. - * + * * @param keySpec * the key specification. * @return the private key. @@ -246,7 +246,7 @@ public class KeyFactory /** * Returns a key specification for the given key. <code>keySpec</code> * identifies the specification class to return the key material in. - * + * * @param key * the key to use. * @param keySpec @@ -266,7 +266,7 @@ public class KeyFactory /** * Translates the key from an unknown or untrusted provider into a key from * this key factory. - * + * * @param key * the key to translate from. * @return the translated key. diff --git a/libjava/classpath/java/security/KeyFactorySpi.java b/libjava/classpath/java/security/KeyFactorySpi.java index fa56378..b842463 100644 --- a/libjava/classpath/java/security/KeyFactorySpi.java +++ b/libjava/classpath/java/security/KeyFactorySpi.java @@ -42,21 +42,21 @@ import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; /** - * KeyFactorySpi is the Service Provider Interface (SPI) for the - * KeyFactory class. This is the interface for providers to + * KeyFactorySpi is the Service Provider Interface (SPI) for the + * KeyFactory class. This is the interface for providers to * supply to implement a key factory for an algorithm. * - * Key factories are used to convert keys (opaque cryptographic - * keys of type Key) into key specifications (transparent + * Key factories are used to convert keys (opaque cryptographic + * keys of type Key) into key specifications (transparent * representations of the underlying key material). * - * Key factories are bi-directional. They allow a key class + * Key factories are bi-directional. They allow a key class * to be converted into a key specification (key material) and * back again. * - * For example DSA public keys can be specified as + * For example DSA public keys can be specified as * DSAPublicKeySpec or X509EncodedKeySpec. The key factory - * translate these key specifications. + * translate these key specifications. * * @since JDK 1.2 * @author Mark Benvenuto @@ -98,19 +98,19 @@ public abstract class KeyFactorySpi throws InvalidKeySpecException; /** - * Returns a key specification for the given key. keySpec - * identifies the specification class to return the key + * Returns a key specification for the given key. keySpec + * identifies the specification class to return the key * material in. * * @param key the key - * @param keySpec the specification class to return the + * @param keySpec the specification class to return the * key material in. * * @return the key specification in an instance of the requested * specification class * * @throws InvalidKeySpecException the requested key specification - * is inappropriate for this key or the key is + * is inappropriate for this key or the key is * unrecognized. */ protected abstract <T extends KeySpec> T engineGetKeySpec(Key key, @@ -126,7 +126,7 @@ public abstract class KeyFactorySpi * * @return the translated key * - * @throws InvalidKeyException if the key cannot be + * @throws InvalidKeyException if the key cannot be * processed by this key factory */ protected abstract Key engineTranslateKey(Key key) diff --git a/libjava/classpath/java/security/KeyPairGenerator.java b/libjava/classpath/java/security/KeyPairGenerator.java index f4ca206..5e6bb1a 100644 --- a/libjava/classpath/java/security/KeyPairGenerator.java +++ b/libjava/classpath/java/security/KeyPairGenerator.java @@ -48,7 +48,7 @@ import java.security.spec.AlgorithmParameterSpec; /** * <code>KeyPairGenerator</code> is a class used to generate key-pairs for a * security algorithm. - * + * * <p>The <code>KeyPairGenerator</code> is created with the * <code>getInstance()</code> Factory methods. It is used to generate a pair of * public and private keys for a specific algorithm and associate this key-pair @@ -69,7 +69,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Constructs a new instance of <code>KeyPairGenerator</code>. - * + * * @param algorithm * the algorithm to use. */ @@ -81,7 +81,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Returns the name of the algorithm used. - * + * * @return the name of the algorithm used. */ public String getAlgorithm() @@ -92,7 +92,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Returns a new instance of <code>KeyPairGenerator</code> which generates * key-pairs for the specified algorithm. - * + * * @param algorithm the name of the algorithm to use. * @return a new instance repesenting the desired algorithm. * @throws NoSuchAlgorithmException if the algorithm is not implemented by any @@ -122,7 +122,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Returns a new instance of <code>KeyPairGenerator</code> which generates * key-pairs for the specified algorithm from a named provider. - * + * * @param algorithm the name of the algorithm to use. * @param provider the name of a {@link Provider} to use. * @return a new instance repesenting the desired algorithm. @@ -149,7 +149,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Returns a new instance of <code>KeyPairGenerator</code> which generates * key-pairs for the specified algorithm from a designated {@link Provider}. - * + * * @param algorithm * the name of the algorithm to use. * @param provider @@ -163,8 +163,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi * @since 1.4 * @see Provider */ - public static KeyPairGenerator getInstance(String algorithm, - Provider provider) + public static KeyPairGenerator getInstance(String algorithm, + Provider provider) throws NoSuchAlgorithmException { CPStringBuilder sb = new CPStringBuilder("KeyPairGenerator for algorithm [") @@ -206,7 +206,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Returns the {@link Provider} of this instance. - * + * * @return the {@link Provider} of this instance. */ public final Provider getProvider() @@ -217,7 +217,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Initializes this instance for the specified key size. Since no source of * randomness is specified, a default one will be used. - * + * * @param keysize * the size of keys to use. */ @@ -229,7 +229,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Initializes this instance for the specified key size and * {@link SecureRandom}. - * + * * @param keysize * the size of keys to use. * @param random @@ -244,7 +244,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi * Initializes this instance with the specified * {@link AlgorithmParameterSpec}. Since no source of randomness is specified, * a default one will be used. - * + * * @param params * the {@link AlgorithmParameterSpec} to use. * @throws InvalidAlgorithmParameterException @@ -260,7 +260,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Initializes this instance with the specified {@link AlgorithmParameterSpec} * and {@link SecureRandom}. - * + * * @param params * the {@link AlgorithmParameterSpec} to use. * @param random @@ -277,9 +277,9 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Generates a new "DSA" {@link KeyPair} from the "GNU" security provider. - * + * * <p>This method generates a unique key-pair each time it is called.</p> - * + * * @return a new unique {@link KeyPair}. * @see #generateKeyPair() * @since 1.2 @@ -300,9 +300,9 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi /** * Generates a new "DSA" {@link KeyPair} from the "GNU" security provider. - * + * * <p>This method generates a unique key pair each time it is called.</p> - * + * * @return a new unique {@link KeyPair}. * @see #genKeyPair() */ diff --git a/libjava/classpath/java/security/KeyPairGeneratorSpi.java b/libjava/classpath/java/security/KeyPairGeneratorSpi.java index 689fbec..1eaad98 100644 --- a/libjava/classpath/java/security/KeyPairGeneratorSpi.java +++ b/libjava/classpath/java/security/KeyPairGeneratorSpi.java @@ -58,7 +58,7 @@ public abstract class KeyPairGeneratorSpi key size and source of randomness @param keysize size of the key to generate - @param random A SecureRandom source of randomness + @param random A SecureRandom source of randomness */ public abstract void initialize(int keysize, SecureRandom random); @@ -72,7 +72,7 @@ public abstract class KeyPairGeneratorSpi method just throws UnsupportedOperationException. @param params A AlgorithmParameterSpec to intialize with - @param random A SecureRandom source of randomness + @param random A SecureRandom source of randomness @throws InvalidAlgorithmParameterException */ @@ -84,7 +84,7 @@ public abstract class KeyPairGeneratorSpi /** Generates a KeyPair according the rules for the algorithm. - Unless intialized, algorithm defaults will be used. It + Unless intialized, algorithm defaults will be used. It creates a unique key pair each time. @return a key pair diff --git a/libjava/classpath/java/security/KeyStore.java b/libjava/classpath/java/security/KeyStore.java index 1d036c3..b7a0e2a 100644 --- a/libjava/classpath/java/security/KeyStore.java +++ b/libjava/classpath/java/security/KeyStore.java @@ -49,19 +49,19 @@ import java.util.Date; import java.util.Enumeration; /** - * Keystore represents an in-memory collection of keys and + * Keystore represents an in-memory collection of keys and * certificates. There are two types of entries: * * <dl> * <dt>Key Entry</dt> * * <dd><p>This type of keystore entry store sensitive crytographic key - * information in a protected format.Typically this is a secret + * information in a protected format.Typically this is a secret * key or a private key with a certificate chain.</p></dd> * * <dt>Trusted Ceritificate Entry</dt> * - * <dd><p>This type of keystore entry contains a single public key + * <dd><p>This type of keystore entry contains a single public key * certificate belonging to annother entity. It is called trusted * because the keystore owner trusts that the certificates * belongs to the subject (owner) of the certificate.</p></dd> @@ -70,10 +70,10 @@ import java.util.Enumeration; * <p>Entries in a key store are referred to by their "alias": a simple * unique string. * - * <p>The structure and persistentence of the key store is not - * specified. Any method could be used to protect sensitive - * (private or secret) keys. Smart cards or integrated - * cryptographic engines could be used or the keystore could + * <p>The structure and persistentence of the key store is not + * specified. Any method could be used to protect sensitive + * (private or secret) keys. Smart cards or integrated + * cryptographic engines could be used or the keystore could * be simply stored in a file.</p> * * @see java.security.cert.Certificate @@ -112,7 +112,7 @@ public class KeyStore /** * Returns an instance of a <code>KeyStore</code> representing the specified * type, from the first provider that implements it. - * + * * @param type the type of keystore to create. * @return a <code>KeyStore</code> repesenting the desired type. * @throws KeyStoreException if the designated type of is not implemented by @@ -141,7 +141,7 @@ public class KeyStore /** * Returns an instance of a <code>KeyStore</code> representing the specified * type, from the named provider. - * + * * @param type the type of keystore to create. * @param provider the name of the provider to use. * @return a <code>KeyStore</code> repesenting the desired type. @@ -168,7 +168,7 @@ public class KeyStore /** * Returns an instance of a <code>KeyStore</code> representing the specified * type, from the specified provider. - * + * * @param type the type of keystore to create. * @param provider the provider to use. * @return a <code>KeyStore</code> repesenting the desired type. @@ -207,13 +207,13 @@ public class KeyStore /** * Returns the default KeyStore type. This method looks up the - * type in <JAVA_HOME>/lib/security/java.security with the + * type in <JAVA_HOME>/lib/security/java.security with the * property "keystore.type" or if that fails then "gkr" . */ public static final String getDefaultType() { - // Security reads every property in java.security so it - // will return this property if it exists. + // Security reads every property in java.security so it + // will return this property if it exists. String tmp = Security.getProperty("keystore.type"); if (tmp == null) @@ -246,7 +246,7 @@ public class KeyStore } /** - Returns the key associated with given alias using the + Returns the key associated with given alias using the supplied password. @param alias an alias for the key to get @@ -271,8 +271,8 @@ public class KeyStore @param alias the alias name - @return a chain of Certificates ( ordered from the user's - certificate to the Certificate Authority's ) or + @return a chain of Certificates ( ordered from the user's + certificate to the Certificate Authority's ) or null if the alias does not exist or there is no certificate chain for the alias ( the alias refers to a trusted certificate entry or there is no entry). @@ -292,7 +292,7 @@ public class KeyStore @param alias the alias name - @return a Certificate or null if the alias does not exist + @return a Certificate or null if the alias does not exist or there is no certificate for the alias */ public final java.security.cert.Certificate getCertificate(String alias) @@ -315,8 +315,8 @@ public class KeyStore /** Assign the key to the alias in the keystore, protecting it - with the given password. It will overwrite an existing - entry and if the key is a PrivateKey, also add the + with the given password. It will overwrite an existing + entry and if the key is a PrivateKey, also add the certificate chain representing the corresponding public key. @param alias the alias name @@ -328,16 +328,16 @@ public class KeyStore @throws KeyStoreException if it fails */ public final void setKeyEntry(String alias, Key key, char[]password, - java.security.cert. - Certificate[]chain) throws KeyStoreException + java.security.cert. + Certificate[]chain) throws KeyStoreException { keyStoreSpi.engineSetKeyEntry(alias, key, password, chain); } /** Assign the key to the alias in the keystore. It will overwrite - an existing entry and if the key is a PrivateKey, also - add the certificate chain representing the corresponding + an existing entry and if the key is a PrivateKey, also + add the certificate chain representing the corresponding public key. @param alias the alias name @@ -348,14 +348,14 @@ public class KeyStore @throws KeyStoreException if it fails */ public final void setKeyEntry(String alias, byte[]key, - java.security.cert. - Certificate[]chain) throws KeyStoreException + java.security.cert. + Certificate[]chain) throws KeyStoreException { keyStoreSpi.engineSetKeyEntry(alias, key, chain); } /** - Assign the certificate to the alias in the keystore. It + Assign the certificate to the alias in the keystore. It will overwrite an existing entry. @param alias the alias name @@ -364,8 +364,8 @@ public class KeyStore @throws KeyStoreException if it fails */ public final void setCertificateEntry(String alias, - java.security.cert. - Certificate cert) throws + java.security.cert. + Certificate cert) throws KeyStoreException { keyStoreSpi.engineSetCertificateEntry(alias, cert); @@ -416,7 +416,7 @@ public class KeyStore } /** - Determines if the keystore contains a key entry for + Determines if the keystore contains a key entry for the specified alias. @param alias the alias name @@ -430,7 +430,7 @@ public class KeyStore /** - Determines if the keystore contains a certificate entry for + Determines if the keystore contains a certificate entry for the specified alias. @param alias the alias name @@ -444,7 +444,7 @@ public class KeyStore } /** - Determines if the keystore contains the specified certificate + Determines if the keystore contains the specified certificate entry and returns the alias. It checks every entry and for a key entry checks only the @@ -452,7 +452,7 @@ public class KeyStore @param cert Certificate to look for - @return alias of first matching certificate, null if it + @return alias of first matching certificate, null if it does not exist. */ public final String getCertificateAlias(java.security.cert.Certificate cert) @@ -469,7 +469,7 @@ public class KeyStore @param password the password to protect the keystore integrity with @throws IOException if an I/O error occurs. - @throws NoSuchAlgorithmException the data integrity algorithm + @throws NoSuchAlgorithmException the data integrity algorithm used cannot be found. @throws CertificateException if any certificates could not be stored in the output stream. @@ -489,7 +489,7 @@ public class KeyStore @param password the password to check the keystore integrity with @throws IOException if an I/O error occurs. - @throws NoSuchAlgorithmException the data integrity algorithm + @throws NoSuchAlgorithmException the data integrity algorithm used cannot be found. @throws CertificateException if any certificates could not be stored in the output stream. diff --git a/libjava/classpath/java/security/KeyStoreSpi.java b/libjava/classpath/java/security/KeyStoreSpi.java index c8d2316..b44bd84 100644 --- a/libjava/classpath/java/security/KeyStoreSpi.java +++ b/libjava/classpath/java/security/KeyStoreSpi.java @@ -46,9 +46,9 @@ import java.util.Date; import java.util.Enumeration; /** - * KeyStoreSpi is the Service Provider Interface (SPI) for the - * KeyStore class. This is the interface for providers to - * supply to implement a keystore for a particular keystore + * KeyStoreSpi is the Service Provider Interface (SPI) for the + * KeyStore class. This is the interface for providers to + * supply to implement a keystore for a particular keystore * type. * * @since 1.2 @@ -64,7 +64,7 @@ public abstract class KeyStoreSpi } /** - * Returns the key associated with given alias using the + * Returns the key associated with given alias using the * supplied password. * * @param alias an alias for the key to get @@ -85,8 +85,8 @@ public abstract class KeyStoreSpi * * @param alias the alias name * - * @return a chain of Certificates ( ordered from the user's - * certificate to the Certificate Authority's ) or + * @return a chain of Certificates ( ordered from the user's + * certificate to the Certificate Authority's ) or * null if the alias does not exist or there is no * certificate chain for the alias ( the alias refers * to a trusted certificate entry or there is no entry). @@ -104,7 +104,7 @@ public abstract class KeyStoreSpi * * @param alias the alias name * - * @return a Certificate or null if the alias does not exist + * @return a Certificate or null if the alias does not exist * or there is no certificate for the alias */ public abstract java.security.cert. @@ -121,8 +121,8 @@ public abstract class KeyStoreSpi /** * Assign the key to the alias in the keystore, protecting it - * with the given password. It will overwrite an existing - * entry and if the key is a PrivateKey, also add the + * with the given password. It will overwrite an existing + * entry and if the key is a PrivateKey, also add the * certificate chain representing the corresponding public key. * * @param alias the alias name @@ -134,15 +134,15 @@ public abstract class KeyStoreSpi * @throws KeyStoreException if it fails */ public abstract void engineSetKeyEntry(String alias, Key key, - char[]password, - java.security.cert. - Certificate[]chain) throws + char[]password, + java.security.cert. + Certificate[]chain) throws KeyStoreException; /** * Assign the key to the alias in the keystore. It will overwrite - * an existing entry and if the key is a PrivateKey, also - * add the certificate chain representing the corresponding + * an existing entry and if the key is a PrivateKey, also + * add the certificate chain representing the corresponding * public key. * * @param alias the alias name @@ -153,13 +153,13 @@ public abstract class KeyStoreSpi * @throws KeyStoreException if it fails */ public abstract void engineSetKeyEntry(String alias, byte[]key, - java.security.cert. - Certificate[]chain) throws + java.security.cert. + Certificate[]chain) throws KeyStoreException; /** - * Assign the certificate to the alias in the keystore. It + * Assign the certificate to the alias in the keystore. It * will overwrite an existing entry. * * @param alias the alias name @@ -168,8 +168,8 @@ public abstract class KeyStoreSpi * @throws KeyStoreException if it fails */ public abstract void engineSetCertificateEntry(String alias, - java.security.cert. - Certificate cert) throws + java.security.cert. + Certificate cert) throws KeyStoreException; /** @@ -206,7 +206,7 @@ public abstract class KeyStoreSpi public abstract int engineSize(); /** - * Determines if the keystore contains a key entry for + * Determines if the keystore contains a key entry for * the specified alias. * * @param alias the alias name @@ -216,7 +216,7 @@ public abstract class KeyStoreSpi public abstract boolean engineIsKeyEntry(String alias); /** - * Determines if the keystore contains a certificate entry for + * Determines if the keystore contains a certificate entry for * the specified alias. * * @param alias the alias name @@ -226,7 +226,7 @@ public abstract class KeyStoreSpi public abstract boolean engineIsCertificateEntry(String alias); /** - * Determines if the keystore contains the specified certificate + * Determines if the keystore contains the specified certificate * entry and returns the alias. * * It checks every entry and for a key entry checks only the @@ -234,11 +234,11 @@ public abstract class KeyStoreSpi * * @param cert Certificate to look for * - * @return alias of first matching certificate, null if it + * @return alias of first matching certificate, null if it * does not exist. */ public abstract String engineGetCertificateAlias(java.security.cert. - Certificate cert); + Certificate cert); /** * Stores the keystore in the specified output stream and it @@ -248,7 +248,7 @@ public abstract class KeyStoreSpi * @param password the password to protect the keystore integrity with * * @throws IOException if an I/O error occurs. - * @throws NoSuchAlgorithmException the data integrity algorithm + * @throws NoSuchAlgorithmException the data integrity algorithm * used cannot be found. * @throws CertificateException if any certificates could not be * stored in the output stream. @@ -265,7 +265,7 @@ public abstract class KeyStoreSpi * @param password the password to check the keystore integrity with * * @throws IOException if an I/O error occurs. - * @throws NoSuchAlgorithmException the data integrity algorithm + * @throws NoSuchAlgorithmException the data integrity algorithm * used cannot be found. * @throws CertificateException if any certificates could not be * stored in the output stream. diff --git a/libjava/classpath/java/security/MessageDigest.java b/libjava/classpath/java/security/MessageDigest.java index d94d96b..a4eeab4 100644 --- a/libjava/classpath/java/security/MessageDigest.java +++ b/libjava/classpath/java/security/MessageDigest.java @@ -63,7 +63,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Constructs a new instance of <code>MessageDigest</code> representing the * specified algorithm. - * + * * @param algorithm * the name of the digest algorithm to use. */ @@ -76,7 +76,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Returns a new instance of <code>MessageDigest</code> representing the * specified algorithm. - * + * * @param algorithm the name of the digest algorithm to use. * @return a new instance representing the desired algorithm. * @throws NoSuchAlgorithmException if the algorithm is not implemented by any @@ -106,7 +106,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Returns a new instance of <code>MessageDigest</code> representing the * specified algorithm from a named provider. - * + * * @param algorithm the name of the digest algorithm to use. * @param provider the name of the provider to use. * @return a new instance representing the desired algorithm. @@ -133,7 +133,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Returns a new instance of <code>MessageDigest</code> representing the * specified algorithm from a designated {@link Provider}. - * + * * @param algorithm the name of the digest algorithm to use. * @param provider the {@link Provider} to use. * @return a new instance representing the desired algorithm. @@ -187,7 +187,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Returns the {@link Provider} of this instance. - * + * * @return the {@link Provider} of this instance. */ public final Provider getProvider() @@ -197,7 +197,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Updates the digest with the byte. - * + * * @param input byte to update the digest with. */ public void update(byte input) @@ -208,7 +208,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Updates the digest with the bytes from the array starting from the * specified offset and using the specified length of bytes. - * + * * @param input * bytes to update the digest with. * @param offset @@ -223,7 +223,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Updates the digest with the bytes of an array. - * + * * @param input bytes to update the digest with. */ public void update(byte[] input) @@ -233,7 +233,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Updates the digest with the remaining bytes of a buffer. - * + * * @param input The input byte buffer. * @since 1.5 */ @@ -241,10 +241,10 @@ public abstract class MessageDigest extends MessageDigestSpi { engineUpdate (input); } - + /** * Computes the final digest of the stored data. - * + * * @return a byte array representing the message digest. */ public byte[] digest() @@ -254,7 +254,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Computes the final digest of the stored bytes and returns the result. - * + * * @param buf * an array of bytes to store the result in. * @param offset @@ -272,7 +272,7 @@ public abstract class MessageDigest extends MessageDigestSpi * Computes a final update using the input array of bytes, then computes a * final digest and returns it. It calls {@link #update(byte[])} and then * {@link #digest(byte[])}. - * + * * @param input * an array of bytes to perform final update with. * @return a byte array representing the message digest. @@ -285,7 +285,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Returns a string representation of this instance. - * + * * @return a string representation of this instance. */ public String toString() @@ -295,7 +295,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Does a simple byte comparison of the two digests. - * + * * @param digesta * first digest to compare. * @param digestb @@ -323,7 +323,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Returns the name of message digest algorithm. - * + * * @return the name of message digest algorithm. */ public final String getAlgorithm() @@ -334,7 +334,7 @@ public abstract class MessageDigest extends MessageDigestSpi /** * Returns the length of the message digest. The default is zero which means * that the concrete implementation does not implement this method. - * + * * @return length of the message digest. * @since 1.2 */ @@ -348,7 +348,7 @@ public abstract class MessageDigest extends MessageDigestSpi * then a {@link CloneNotSupportedException} is thrown. Cloning depends on * whether the subclass {@link MessageDigestSpi} implements {@link Cloneable} * which contains the actual implementation of the appropriate algorithm. - * + * * @return a clone of this instance. * @throws CloneNotSupportedException * the implementation does not support cloning. diff --git a/libjava/classpath/java/security/MessageDigestSpi.java b/libjava/classpath/java/security/MessageDigestSpi.java index 6615b1d..63cc960 100644 --- a/libjava/classpath/java/security/MessageDigestSpi.java +++ b/libjava/classpath/java/security/MessageDigestSpi.java @@ -101,7 +101,7 @@ public abstract class MessageDigestSpi /** * Updates this digest with the remaining bytes of a byte buffer. - * + * * @param input The input buffer. * @since 1.5 */ @@ -115,7 +115,7 @@ public abstract class MessageDigestSpi engineUpdate (buf, 0, n); } } - + /** Computes the final digest of the stored bytes and returns them. It performs any necessary padding. The message digest diff --git a/libjava/classpath/java/security/Permission.java b/libjava/classpath/java/security/Permission.java index 8f3e2a2..cf6399b 100644 --- a/libjava/classpath/java/security/Permission.java +++ b/libjava/classpath/java/security/Permission.java @@ -183,20 +183,20 @@ public abstract class Permission implements Guard, Serializable */ public String toString() { - CPStringBuilder string = new CPStringBuilder(); - + CPStringBuilder string = new CPStringBuilder(); + string = string.append('('); string = string.append(getClass().getName()); string = string.append(' '); string = string.append(getName()); - + if (!(getActions().equals(""))) { string = string.append(' '); string = string.append(getActions()); } - + string = string.append(')'); - return string.toString(); + return string.toString(); } } // class Permission diff --git a/libjava/classpath/java/security/Permissions.java b/libjava/classpath/java/security/Permissions.java index 56f5ad8..d814064 100644 --- a/libjava/classpath/java/security/Permissions.java +++ b/libjava/classpath/java/security/Permissions.java @@ -231,13 +231,13 @@ public final class Permissions extends PermissionCollection public boolean implies(Permission perm) { Enumeration elements = elements(); - + while (elements.hasMoreElements()) - { - Permission p = (Permission)elements.nextElement(); - if (p.implies(perm)) - return true; - } + { + Permission p = (Permission)elements.nextElement(); + if (p.implies(perm)) + return true; + } return false; } diff --git a/libjava/classpath/java/security/Policy.java b/libjava/classpath/java/security/Policy.java index de1ab80..118626e 100644 --- a/libjava/classpath/java/security/Policy.java +++ b/libjava/classpath/java/security/Policy.java @@ -47,36 +47,36 @@ import java.util.Map; * policy for the Java application environment. It specifies which permissions * are available for code from various sources. The security policy is * represented through a subclass of <code>Policy</code>. - * + * * <p>Only one <code>Policy</code> is in effect at any time. A * {@link ProtectionDomain} initializes itself with information from this class * on the set of permssions to grant.</p> - * + * * <p>The location for the actual <code>Policy</code> could be anywhere in any * form because it depends on the Policy implementation. The default system is * in a flat ASCII file or it could be in a database.</p> - * + * * <p>The current installed <code>Policy</code> can be accessed with * {@link #getPolicy()} and changed with {@link #setPolicy(Policy)} if the code * has the correct permissions.</p> - * + * * <p>The {@link #refresh()} method causes the <code>Policy</code> instance to * refresh/reload its configuration. The method used to refresh depends on the * <code>Policy</code> implementation.</p> - * + * * <p>When a protection domain initializes its permissions, it uses code like * the following:</p> - * + * * <code> * policy = Policy.getPolicy(); * PermissionCollection perms = policy.getPermissions(myCodeSource); * </code> - * + * * <p>The protection domain passes the <code>Policy</code> handler a * {@link CodeSource} instance which contains the codebase URL and a public key. * The <code>Policy</code> implementation then returns the proper set of * permissions for that {@link CodeSource}.</p> - * + * * <p>The default <code>Policy</code> implementation can be changed by setting * the "policy.provider" security provider in the "java.security" file to the * correct <code>Policy</code> implementation class.</p> @@ -103,7 +103,7 @@ public abstract class Policy * Returns the currently installed <code>Policy</code> handler. The value * should not be cached as it can be changed any time by * {@link #setPolicy(Policy)}. - * + * * @return the current <code>Policy</code>. * @throws SecurityException * if a {@link SecurityManager} is installed which disallows this @@ -120,7 +120,7 @@ public abstract class Policy /** * Sets the <code>Policy</code> handler to a new value. - * + * * @param policy * the new <code>Policy</code> to use. * @throws SecurityException @@ -177,10 +177,10 @@ public abstract class Policy { currentPolicy = (Policy) Class.forName(pp).newInstance(); } - catch (Exception e) - { - // Ignored. - } + catch (Exception e) + { + // Ignored. + } if (currentPolicy == null) currentPolicy = new gnu.java.security.provider.DefaultPolicy(); @@ -200,7 +200,7 @@ public abstract class Policy /** * Returns the set of Permissions allowed for a given {@link CodeSource}. - * + * * @param codesource * the {@link CodeSource} for which, the caller needs to find the * set of granted permissions. @@ -214,7 +214,7 @@ public abstract class Policy /** * Returns the set of Permissions allowed for a given {@link ProtectionDomain}. - * + * * @param domain * the {@link ProtectionDomain} for which, the caller needs to find * the set of granted permissions. @@ -257,7 +257,7 @@ public abstract class Policy /** * Checks if the designated {@link Permission} is granted to a designated * {@link ProtectionDomain}. - * + * * @param domain * the {@link ProtectionDomain} to test. * @param permission diff --git a/libjava/classpath/java/security/ProtectionDomain.java b/libjava/classpath/java/security/ProtectionDomain.java index b1eb049..d5d657d 100644 --- a/libjava/classpath/java/security/ProtectionDomain.java +++ b/libjava/classpath/java/security/ProtectionDomain.java @@ -47,7 +47,7 @@ import gnu.java.lang.CPStringBuilder; * class loaded from the specified {@link CodeSource} is treated as part of * this domain. The set of permissions is represented by an instance of * {@link PermissionCollection}. - * + * * <p>Every class in the system will belong to one and only one * <code>ProtectionDomain</code>.</p> * @@ -77,7 +77,7 @@ public class ProtectionDomain * can be added later to the {@link PermissionCollection} and this contructor * will call the <code>setReadOnly</code> method on the specified set of * permissions. - * + * * @param codesource * The {@link CodeSource} for this domain. * @param permissions @@ -93,11 +93,11 @@ public class ProtectionDomain * This method initializes a new instance of <code>ProtectionDomain</code> * given its {@link CodeSource}, granted permissions, associated * {@link ClassLoader} and {@link Principal}s. - * + * * <p>Similar to the previous constructor, if the designated set of * permissions is not <code>null</code>, the <code>setReadOnly</code> method * is called on that set.</p> - * + * * @param codesource * The {@link CodeSource} for this domain. * @param permissions @@ -138,7 +138,7 @@ public class ProtectionDomain /** * Returns the {@link CodeSource} of this domain. - * + * * @return the {@link CodeSource} of this domain. * @since 1.2 */ @@ -149,7 +149,7 @@ public class ProtectionDomain /** * Returns the {@link ClassLoader} of this domain. - * + * * @return the {@link ClassLoader} of this domain. * @since 1.4 */ @@ -160,7 +160,7 @@ public class ProtectionDomain /** * Returns a clone of the {@link Principal}s of this domain. - * + * * @return a clone of the {@link Principal}s of this domain. * @since 1.4 */ @@ -171,7 +171,7 @@ public class ProtectionDomain /** * Returns the {@link PermissionCollection} of this domain. - * + * * @return The {@link PermissionCollection} of this domain. */ public final PermissionCollection getPermissions() @@ -182,7 +182,7 @@ public class ProtectionDomain /** * Tests whether or not the specified {@link Permission} is implied by the * set of permissions granted to this domain. - * + * * @param permission * the {@link Permission} to test. * @return <code>true</code> if the specified {@link Permission} is implied @@ -200,7 +200,7 @@ public class ProtectionDomain /** * Returns a string representation of this object. It will include the * {@link CodeSource} and set of permissions associated with this domain. - * + * * @return A string representation of this object. */ public String toString() diff --git a/libjava/classpath/java/security/Provider.java b/libjava/classpath/java/security/Provider.java index ea1dd9d..b1d6d9c 100644 --- a/libjava/classpath/java/security/Provider.java +++ b/libjava/classpath/java/security/Provider.java @@ -48,7 +48,7 @@ import java.util.Properties; * Providers are installed by name and version number. See the static * initializer of the {@link java.security.Security} class for the default * security providers installed by this class library. - * + * * @author Aaron M. Renn (arenn@urbanophile.com) */ public abstract class Provider @@ -99,7 +99,7 @@ public abstract class Provider /** * This method retunrs the version number of this <code>Provider</code>. - * + * * @return The <code>Provider</code>'s version number. */ public double getVersion() @@ -126,7 +126,7 @@ public abstract class Provider * <code>name</code> is this provider's name. For the default implementation * this translates into a {@link SecurityManager#checkPermission(Permission)} * for a <code>SecurityPermission("putProviderProperty." + name)</code>. - * + * * @param key The property key. * @param value The property value. * @return The previous value of the specified property (<code>key</code>), @@ -162,7 +162,7 @@ public abstract class Provider * <code>name</code> is this provider's name. For the default implementation * this translates into a {@link SecurityManager#checkPermission(Permission)} * for a <code>SecurityPermission("removeProviderProperty." + name)</code>. - * + * * @param key The key to remove * @return The previous value for this key, or <code>null</code> if no * previous value. @@ -206,7 +206,7 @@ public abstract class Provider public String toString() { return (getClass().getName() + ": name=" + getName() + " version=" + - version); + version); } private Object toCanonicalKey(Object key) diff --git a/libjava/classpath/java/security/ProviderException.java b/libjava/classpath/java/security/ProviderException.java index 4559a17..a2b469a 100644 --- a/libjava/classpath/java/security/ProviderException.java +++ b/libjava/classpath/java/security/ProviderException.java @@ -39,7 +39,7 @@ package java.security; /** * This exception indicates that a runtime problem was encounterd with - * a security provider. + * a security provider. * * @author Aaron M. Renn (arenn@urbanophile.com) * @status updated to 1.4 diff --git a/libjava/classpath/java/security/SecureClassLoader.java b/libjava/classpath/java/security/SecureClassLoader.java index 6e17300..1480b71 100644 --- a/libjava/classpath/java/security/SecureClassLoader.java +++ b/libjava/classpath/java/security/SecureClassLoader.java @@ -41,7 +41,7 @@ import java.nio.ByteBuffer; import java.util.HashMap; /** - * A Secure Class Loader for loading classes with additional + * A Secure Class Loader for loading classes with additional * support for specifying code source and permissions when * they are retrieved by the system policy handler. * @@ -63,8 +63,8 @@ public class SecureClassLoader extends ClassLoader { } - /** - * Creates a class using an array of bytes and a + /** + * Creates a class using an array of bytes and a * CodeSource. * * @param name the name to give the class. null if unknown. @@ -78,13 +78,13 @@ public class SecureClassLoader extends ClassLoader * @exception ClassFormatError if the byte array is not in proper classfile format. */ protected final Class<?> defineClass(String name, byte[] b, int off, int len, - CodeSource cs) + CodeSource cs) { return super.defineClass(name, b, off, len, getProtectionDomain(cs)); } - /** - * Creates a class using an ByteBuffer and a + /** + * Creates a class using an ByteBuffer and a * CodeSource. * * @param name the name to give the class. null if unknown. @@ -109,31 +109,31 @@ public class SecureClassLoader extends ClassLoader ProtectionDomain protectionDomain = null; if (cs != null) { - synchronized (protectionDomainCache) - { - protectionDomain = protectionDomainCache.get(cs); - } - - if (protectionDomain == null) - { - protectionDomain - = new ProtectionDomain(cs, getPermissions(cs), this, null); - synchronized (protectionDomainCache) - { - ProtectionDomain domain = protectionDomainCache.get(cs); - if (domain == null) - protectionDomainCache.put(cs, protectionDomain); - else - protectionDomain = domain; - } - } + synchronized (protectionDomainCache) + { + protectionDomain = protectionDomainCache.get(cs); + } + + if (protectionDomain == null) + { + protectionDomain + = new ProtectionDomain(cs, getPermissions(cs), this, null); + synchronized (protectionDomainCache) + { + ProtectionDomain domain = protectionDomainCache.get(cs); + if (domain == null) + protectionDomainCache.put(cs, protectionDomain); + else + protectionDomain = domain; + } + } } return protectionDomain; } /** * Returns a PermissionCollection for the specified CodeSource. - * The default implementation invokes + * The default implementation invokes * java.security.Policy.getPermissions. * * This method is called by defineClass that takes a CodeSource diff --git a/libjava/classpath/java/security/SecureRandom.java b/libjava/classpath/java/security/SecureRandom.java index 0c71838..abf4ff3 100644 --- a/libjava/classpath/java/security/SecureRandom.java +++ b/libjava/classpath/java/security/SecureRandom.java @@ -77,9 +77,9 @@ public class SecureRandom extends Random private static final long serialVersionUID = 4940670005562187L; //Serialized Field - long counter = 0; //Serialized + long counter = 0; //Serialized Provider provider = null; - byte[] randomBytes = null; //Always null + byte[] randomBytes = null; //Always null int randomBytesUsed = 0; SecureRandomSpi secureRandomSpi = null; byte[] state = null; @@ -91,9 +91,9 @@ public class SecureRandom extends Random // ------------------------------------------------------------------------ /** - Default constructor for SecureRandom. It constructs a - new SecureRandom by instantating the first SecureRandom - algorithm in the default security provier. + Default constructor for SecureRandom. It constructs a + new SecureRandom by instantating the first SecureRandom + algorithm in the default security provier. It is not seeded and should be seeded using setSeed or else on the first call to getnextBytes it will force a seed. @@ -134,9 +134,9 @@ public class SecureRandom extends Random throw death; } catch (Throwable t) - { - // Ignore. - } + { + // Ignore. + } } } } @@ -148,9 +148,9 @@ public class SecureRandom extends Random } /** - A constructor for SecureRandom. It constructs a new - SecureRandom by instantating the first SecureRandom algorithm - in the default security provier. + A constructor for SecureRandom. It constructs a new + SecureRandom by instantating the first SecureRandom algorithm + in the default security provier. It is seeded with the passed function and is useful if the user has access to hardware random device (like a radiation detector). @@ -167,9 +167,9 @@ public class SecureRandom extends Random } /** - A constructor for SecureRandom. It constructs a new + A constructor for SecureRandom. It constructs a new SecureRandom using the specified SecureRandomSpi from - the specified security provier. + the specified security provier. @param secureRandomSpi A SecureRandomSpi class @param provider A Provider class @@ -183,7 +183,7 @@ public class SecureRandom extends Random * Private constructor called from the getInstance() method. */ private SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider, - String algorithm) + String algorithm) { this.secureRandomSpi = secureRandomSpi; this.provider = provider; @@ -193,7 +193,7 @@ public class SecureRandom extends Random /** * Returns an instance of a <code>SecureRandom</code> from the first provider * that implements it. - * + * * @param algorithm The algorithm name. * @return A new <code>SecureRandom</code> implementing the given algorithm. * @throws NoSuchAlgorithmException If no installed provider implements the @@ -223,7 +223,7 @@ public class SecureRandom extends Random /** * Returns an instance of a <code>SecureRandom</code> for the specified * algorithm from the named provider. - * + * * @param algorithm The algorithm name. * @param provider The provider name. * @return A new <code>SecureRandom</code> implementing the chosen @@ -252,7 +252,7 @@ public class SecureRandom extends Random /** * Returns an instance of a <code>SecureRandom</code> for the specified * algorithm from the given provider. - * + * * @param algorithm The <code>SecureRandom</code> algorithm to create. * @param provider The provider to use. * @throws NoSuchAlgorithmException If the algorithm cannot be found, or if @@ -313,7 +313,7 @@ public class SecureRandom extends Random } /** - Seeds the SecureRandom. The class is re-seeded for each call and + Seeds the SecureRandom. The class is re-seeded for each call and each seed builds on the previous seed so as not to weaken security. @param seed seed bytes to seed with @@ -325,7 +325,7 @@ public class SecureRandom extends Random } /** - Seeds the SecureRandom. The class is re-seeded for each call and + Seeds the SecureRandom. The class is re-seeded for each call and each seed builds on the previous seed so as not to weaken security. @param seed 8 seed bytes to seed with @@ -340,13 +340,13 @@ public class SecureRandom extends Random if (secureRandomSpi != null) { byte[] tmp = { (byte) (0xff & (seed >> 56)), - (byte) (0xff & (seed >> 48)), - (byte) (0xff & (seed >> 40)), - (byte) (0xff & (seed >> 32)), - (byte) (0xff & (seed >> 24)), - (byte) (0xff & (seed >> 16)), - (byte) (0xff & (seed >> 8)), - (byte) (0xff & seed) + (byte) (0xff & (seed >> 48)), + (byte) (0xff & (seed >> 40)), + (byte) (0xff & (seed >> 32)), + (byte) (0xff & (seed >> 24)), + (byte) (0xff & (seed >> 16)), + (byte) (0xff & (seed >> 8)), + (byte) (0xff & seed) }; secureRandomSpi.engineSetSeed(tmp); isSeeded = true; @@ -394,7 +394,7 @@ public class SecureRandom extends Random /** Returns the given number of seed bytes. This method is - maintained only for backwards capability. + maintained only for backwards capability. @param numBytes number of seed bytes to get diff --git a/libjava/classpath/java/security/SecureRandomSpi.java b/libjava/classpath/java/security/SecureRandomSpi.java index 7759097..08488ce 100644 --- a/libjava/classpath/java/security/SecureRandomSpi.java +++ b/libjava/classpath/java/security/SecureRandomSpi.java @@ -40,11 +40,11 @@ import java.io.Serializable; /** SecureRandomSpi is the Service Provider Interface for SecureRandom - providers. It provides an interface for providers to the + providers. It provides an interface for providers to the SecureRandom engine to write their own pseudo-random number generator. - @since JDK 1.2 + @since JDK 1.2 @author Mark Benvenuto (ivymccough@worldnet.att.net) */ @@ -60,7 +60,7 @@ public abstract class SecureRandomSpi implements Serializable } /** - Updates the seed for SecureRandomSpi but does not reset seed. + Updates the seed for SecureRandomSpi but does not reset seed. It does to this so repeated called never decrease randomness. */ protected abstract void engineSetSeed(byte[] seed); @@ -74,7 +74,7 @@ public abstract class SecureRandomSpi implements Serializable protected abstract void engineNextBytes(byte[] bytes); /** - Gets a user specified number of bytes specified by the + Gets a user specified number of bytes specified by the parameter. @param numBytes number of random bytes to generate diff --git a/libjava/classpath/java/security/Security.java b/libjava/classpath/java/security/Security.java index 6b7b664..6cd98b0 100644 --- a/libjava/classpath/java/security/Security.java +++ b/libjava/classpath/java/security/Security.java @@ -70,7 +70,7 @@ public final class Security private static Vector providers = new Vector(); private static Properties secprops = new Properties(); - + static { String base = SystemProperties.getProperty("gnu.classpath.home.url"); @@ -78,36 +78,36 @@ public final class Security // Try VM specific security file boolean loaded = loadProviders (base, vendor); - + // Append classpath standard provider if possible if (!loadProviders (base, "classpath") - && !loaded - && providers.size() == 0) - { - if (Configuration.DEBUG) - { - /* No providers found and both security files failed to - * load properly. Give a warning in case of DEBUG is - * enabled. Could be done with java.util.logging later. - */ - System.err.println - ("WARNING: could not properly read security provider files:"); - System.err.println - (" " + base + "/security/" + vendor - + ".security"); - System.err.println - (" " + base + "/security/" + "classpath" - + ".security"); - System.err.println - (" Falling back to standard GNU security provider"); - } + && !loaded + && providers.size() == 0) + { + if (Configuration.DEBUG) + { + /* No providers found and both security files failed to + * load properly. Give a warning in case of DEBUG is + * enabled. Could be done with java.util.logging later. + */ + System.err.println + ("WARNING: could not properly read security provider files:"); + System.err.println + (" " + base + "/security/" + vendor + + ".security"); + System.err.println + (" " + base + "/security/" + "classpath" + + ".security"); + System.err.println + (" Falling back to standard GNU security provider"); + } // Note that this matches our classpath.security file. - providers.addElement (new gnu.java.security.provider.Gnu()); - providers.addElement(new gnu.javax.crypto.jce.GnuCrypto()); + providers.addElement (new gnu.java.security.provider.Gnu()); + providers.addElement(new gnu.javax.crypto.jce.GnuCrypto()); providers.addElement(new gnu.javax.crypto.jce.GnuSasl()); providers.addElement(new gnu.javax.net.ssl.provider.Jessie()); providers.addElement(new gnu.javax.security.auth.callback.GnuCallbacks()); - } + } } // This class can't be instantiated. private Security() @@ -128,44 +128,44 @@ public final class Security String secfilestr = baseUrl + "/security/" + vendor + ".security"; try { - InputStream fin = new URL(secfilestr).openStream(); - secprops.load(fin); - - int i = 1; - String name; - while ((name = secprops.getProperty("security.provider." + i)) != null) - { - Exception exception = null; - try - { - ClassLoader sys = ClassLoader.getSystemClassLoader(); - providers.addElement(Class.forName(name, true, sys).newInstance()); - } - catch (ClassNotFoundException x) - { - exception = x; - } - catch (InstantiationException x) - { - exception = x; - } - catch (IllegalAccessException x) - { - exception = x; - } - - if (exception != null) - { - System.err.println ("WARNING: Error loading security provider " - + name + ": " + exception); - result = false; - } - i++; - } + InputStream fin = new URL(secfilestr).openStream(); + secprops.load(fin); + + int i = 1; + String name; + while ((name = secprops.getProperty("security.provider." + i)) != null) + { + Exception exception = null; + try + { + ClassLoader sys = ClassLoader.getSystemClassLoader(); + providers.addElement(Class.forName(name, true, sys).newInstance()); + } + catch (ClassNotFoundException x) + { + exception = x; + } + catch (InstantiationException x) + { + exception = x; + } + catch (IllegalAccessException x) + { + exception = x; + } + + if (exception != null) + { + System.err.println ("WARNING: Error loading security provider " + + name + ": " + exception); + result = false; + } + i++; + } } catch (IOException ignored) { - result = false; + result = false; } return result; @@ -174,7 +174,7 @@ public final class Security /** * Returns the value associated to a designated property name for a given * algorithm. - * + * * @param algName * the algorithm name. * @param propName @@ -208,7 +208,7 @@ public final class Security /** * Inserts a new designated {@link Provider} at a designated (1-based) * position in the current list of installed {@link Provider}s, - * + * * @param provider * the new {@link Provider} to add. * @param position @@ -235,8 +235,8 @@ public final class Security int max = providers.size (); for (int i = 0; i < max; i++) { - if (((Provider) providers.elementAt(i)).getName().equals(provider.getName())) - return -1; + if (((Provider) providers.elementAt(i)).getName().equals(provider.getName())) + return -1; } if (position < 0) @@ -252,7 +252,7 @@ public final class Security /** * Appends the designated new {@link Provider} to the current list of * installed {@link Provider}s. - * + * * @param provider * the new {@link Provider} to append. * @return the position (starting from 1) of <code>provider</code> in the @@ -273,7 +273,7 @@ public final class Security /** * Removes an already installed {@link Provider}, given its name, from the * current list of installed {@link Provider}s. - * + * * @param name * the name of an already installed {@link Provider} to remove. * @throws SecurityException @@ -291,18 +291,18 @@ public final class Security int max = providers.size (); for (int i = 0; i < max; i++) { - if (((Provider) providers.elementAt(i)).getName().equals(name)) - { - providers.remove(i); - break; - } + if (((Provider) providers.elementAt(i)).getName().equals(name)) + { + providers.remove(i); + break; + } } } /** * Returns the current list of installed {@link Provider}s as an array * ordered according to their installation preference order. - * + * * @return an array of all the installed providers. */ public static Provider[] getProviders() @@ -314,7 +314,7 @@ public final class Security /** * Returns an already installed {@link Provider} given its name. - * + * * @param name * the name of an already installed {@link Provider}. * @return the {@link Provider} known by <code>name</code>. Returns @@ -337,16 +337,16 @@ public final class Security int max = providers.size (); for (int i = 0; i < max; i++) { - p = (Provider) providers.elementAt(i); - if (p.getName().equals(name)) - return p; + p = (Provider) providers.elementAt(i); + if (p.getName().equals(name)) + return p; } return null; } /** * Returns the value associated with a Security propery. - * + * * @param key * the key of the property to fetch. * @return the value of the Security property associated with @@ -372,7 +372,7 @@ public final class Security /** * Sets or changes a designated Security property to a designated value. - * + * * @param key * the name of the property to set. * @param datum @@ -399,7 +399,7 @@ public final class Security * For a given <i>service</i> (e.g. Signature, MessageDigest, etc...) this * method returns the {@link Set} of all available algorithm names (instances * of {@link String}, from all currently installed {@link Provider}s. - * + * * @param serviceName * the case-insensitive name of a service (e.g. Signature, * MessageDigest, etc). @@ -441,21 +441,21 @@ public final class Security * Returns an array of currently installed {@link Provider}s, ordered * according to their installation preference order, which satisfy a given * <i>selection</i> criterion. - * + * * <p>This implementation recognizes a <i>selection</i> criterion written in * one of two following forms:</p> - * + * * <ul> * <li><crypto_service>.<algorithm_or_type>: Where * <i>crypto_service</i> is a case-insensitive string, similar to what has * been described in the {@link #getAlgorithms(String)} method, and * <i>algorithm_or_type</i> is a known case-insensitive name of an * Algorithm, or one of its aliases. - * + * * <p>For example, "CertificateFactory.X.509" would return all the installed * {@link Provider}s which provide a <i>CertificateFactory</i> * implementation of <i>X.509</i>.</p></li> - * + * * <li><crypto_service>.<algorithm_or_type> <attribute_name>:<value>: * Where <i>crypto_service</i> is a case-insensitive string, similar to what * has been described in the {@link #getAlgorithms(String)} method, @@ -463,13 +463,13 @@ public final class Security * or one of its aliases, <i>attribute_name</i> is a case-insensitive * property name with no whitespace characters, and no dots, in-between, and * <i>value</i> is a {@link String} with no whitespace characters in-between. - * + * * <p>For example, "Signature.Sha1WithDSS KeySize:1024" would return all the * installed {@link Provider}s which declared their ability to provide * <i>Signature</i> services, using the <i>Sha1WithDSS</i> algorithm with * key sizes of <i>1024</i>.</p></li> * </ul> - * + * * @param filter * the <i>selection</i> criterion for selecting among the installed * {@link Provider}s. @@ -503,11 +503,11 @@ public final class Security /** * Returns an array of currently installed {@link Provider}s which satisfy a * set of <i>selection</i> criteria. - * + * * <p>The <i>selection</i> criteria are defined in a {@link Map} where each * element specifies a <i>selection</i> querry. The <i>Keys</i> in this * {@link Map} must be in one of the two following forms:</p> - * + * * <ul> * <li><crypto_service>.<algorithm_or_type>: Where * <i>crypto_service</i> is a case-insensitive string, similar to what has @@ -517,7 +517,7 @@ public final class Security * {@link Map} for such a <i>Key</i> MUST be the empty string. * {@link Provider}s which provide an implementation for the designated * <i>service algorithm</i> are included in the result.</li> - * + * * <li><crypto_service>.<algorithm_or_type> <attribute_name>: * Where <i>crypto_service</i> is a case-insensitive string, similar to what * has been described in the {@link #getAlgorithms(String)} method, @@ -529,7 +529,7 @@ public final class Security * declare the designated <i>attribute_name</i> and <i>value</i> for the * designated <i>service algorithm</i> are included in the result.</li> * </ul> - * + * * @param filter * a {@link Map} of <i>selection querries</i>. * @return all currently installed {@link Provider}s which satisfy ALL the diff --git a/libjava/classpath/java/security/Signature.java b/libjava/classpath/java/security/Signature.java index 26333b6..d718639 100644 --- a/libjava/classpath/java/security/Signature.java +++ b/libjava/classpath/java/security/Signature.java @@ -52,30 +52,30 @@ import java.security.spec.AlgorithmParameterSpec; * <code>Signature</code> is used to provide an interface to digital signature * algorithms. Digital signatures provide authentication and data integrity of * digital data. - * + * * <p>The GNU provider provides the NIST standard DSA which uses DSA and SHA-1. * It can be specified by SHA/DSA, SHA-1/DSA or its OID. If the RSA signature * algorithm is provided then it could be MD2/RSA. MD5/RSA, or SHA-1/RSA. The * algorithm must be specified because there is no default.</p> - * + * * <p>Signature provides implementation-independent algorithms which are * requested by the user through the <code>getInstance()<?code> methods. It can * be requested by specifying just the algorithm name or by specifying both the * algorithm name and provider name.</p> - * + * * <p>The three phases of using <code>Signature</code> are:</p> - * + * * <ol> * <li>Initializing: * <ul> * <li>It must be initialized with a private key for signing.</li> * <li>It must be initialized with a public key for verifying.</li> * </li> - * + * * <li>Updating: * <p>Update the bytes for signing or verifying with calls to update.</p> * </li> - * + * * <li>Signing or Verify the signature on the currently stored bytes by * calling sign or verify.</li> * </ol> @@ -117,7 +117,7 @@ public abstract class Signature extends SignatureSpi /** * Constructs a new <code>Signature</code> instance for a designated digital * signature algorithm. - * + * * @param algorithm * the algorithm to use. */ @@ -130,7 +130,7 @@ public abstract class Signature extends SignatureSpi /** * Returns an instance of <code>Signature</code> representing the specified * signature. - * + * * @param algorithm the algorithm to use. * @return a new instance repesenting the desired algorithm. * @throws NoSuchAlgorithmException if the algorithm is not implemented by any @@ -160,7 +160,7 @@ public abstract class Signature extends SignatureSpi /** * Returns an instance of <code>Signature</code> representing the specified * signature from the named provider. - * + * * @param algorithm the algorithm to use. * @param provider the name of the provider to use. * @return a new instance repesenting the desired algorithm. @@ -187,7 +187,7 @@ public abstract class Signature extends SignatureSpi /** * Returns an instance of <code>Signature</code> representing the specified * signature from the specified {@link Provider}. - * + * * @param algorithm the algorithm to use. * @param provider the {@link Provider} to use. * @return a new instance repesenting the desired algorithm. @@ -239,7 +239,7 @@ public abstract class Signature extends SignatureSpi /** * Returns the {@link Provider} of this instance. - * + * * @return the {@link Provider} of this instance. */ public final Provider getProvider() @@ -249,7 +249,7 @@ public abstract class Signature extends SignatureSpi /** * Initializes this instance with the public key for verification purposes. - * + * * @param publicKey * the public key to verify with. * @throws InvalidKeyException @@ -264,11 +264,11 @@ public abstract class Signature extends SignatureSpi /** * Verify a signature with a designated {@link Certificate}. This is a FIPS * 140-1 compatible method since it verifies a signature with a certificate. - * + * * <p>If the {@link Certificate} is an X.509 one, has a <i>KeyUsage</i> * parameter and that parameter indicates this key is not to be used for * signing then an exception is thrown.</p> - * + * * @param certificate * a {@link Certificate} containing a public key to verify with. * @throws InvalidKeyException if the key is invalid. @@ -290,7 +290,7 @@ public abstract class Signature extends SignatureSpi /** * Initializes this class with the private key for signing purposes. - * + * * @param privateKey * the private key to sign with. * @throws InvalidKeyException @@ -305,7 +305,7 @@ public abstract class Signature extends SignatureSpi /** * Initializes this class with the private key and source of randomness for * signing purposes. - * + * * @param privateKey * the private key to sign with. * @param random @@ -323,7 +323,7 @@ public abstract class Signature extends SignatureSpi /** * Returns the signature bytes of all the data fed to this instance. The * format of the output depends on the underlying signature algorithm. - * + * * @return the signature bytes. * @throws SignatureException * if the engine is not properly initialized. @@ -340,15 +340,15 @@ public abstract class Signature extends SignatureSpi * Generates signature bytes of all the data fed to this instance and stores * it in the designated array. The format of the result depends on the * underlying signature algorithm. - * + * * <p>After calling this method, the instance is reset to its initial state * and can then be used to generate additional signatures.</p> - * + * * <p><b>IMPLEMENTATION NOTE:</b> Neither this method nor the GNU provider * will return partial digests. If <code>len</code> is less than the * signature length, this method will throw a {@link SignatureException}. If * it is greater than or equal then it is ignored.</p> - * + * * @param outbuf * array of bytes of where to store the resulting signature bytes. * @param offset @@ -371,7 +371,7 @@ public abstract class Signature extends SignatureSpi /** * Verifies a designated signature. - * + * * @param signature * the signature bytes to verify. * @return <code>true</code> if verified, <code>false</code> otherwise. @@ -389,7 +389,7 @@ public abstract class Signature extends SignatureSpi /** * Verifies a designated signature. - * + * * @param signature * the signature bytes to verify. * @param offset @@ -427,7 +427,7 @@ public abstract class Signature extends SignatureSpi /** * Updates the data to be signed or verified with the specified byte. - * + * * @param b * the byte to update with. * @throws SignatureException @@ -443,7 +443,7 @@ public abstract class Signature extends SignatureSpi /** * Updates the data to be signed or verified with the specified bytes. - * + * * @param data * the array of bytes to use. * @throws SignatureException @@ -459,7 +459,7 @@ public abstract class Signature extends SignatureSpi /** * Updates the data to be signed or verified with the specified bytes. - * + * * @param data * an array of bytes to use. * @param off @@ -477,11 +477,11 @@ public abstract class Signature extends SignatureSpi else throw new SignatureException(); } - + /** * Update this signature with the {@link java.nio.Buffer#remaining()} * bytes of the input buffer. - * + * * @param input The input buffer. * @throws SignatureException If this instance was not properly * initialized. @@ -497,7 +497,7 @@ public abstract class Signature extends SignatureSpi /** * Returns the name of the algorithm currently used. The names of algorithms * are usually SHA/DSA or SHA/RSA. - * + * * @return name of algorithm. */ public final String getAlgorithm() @@ -507,7 +507,7 @@ public abstract class Signature extends SignatureSpi /** * Returns a rstring representation of this instance. - * + * * @return a rstring representation of this instance. */ public String toString() @@ -517,7 +517,7 @@ public abstract class Signature extends SignatureSpi /** * Sets the specified algorithm parameter to the specified value. - * + * * @param param * the parameter name. * @param value @@ -535,10 +535,10 @@ public abstract class Signature extends SignatureSpi /** * Sets the signature engine with the specified {@link AlgorithmParameterSpec}. - * + * * <p>By default, and unless overriden by the concrete SPI, this method always * throws an {@link UnsupportedOperationException}.</p> - * + * * @param params * the parameters to use for intializing this instance. * @throws InvalidParameterException @@ -554,7 +554,7 @@ public abstract class Signature extends SignatureSpi /** * Return the parameters of the algorithm used in this instance as an * {@link AlgorithmParameters}. - * + * * @return the parameters used with this instance, or <code>null</code> if * this instance does not use any parameters. */ @@ -565,7 +565,7 @@ public abstract class Signature extends SignatureSpi /** * Returns the value for the specified algorithm parameter. - * + * * @param param * the parameter name. * @return the parameter value. @@ -581,7 +581,7 @@ public abstract class Signature extends SignatureSpi /** * Returns a clone of this instance. - * + * * @return a clone of this instace. * @throws CloneNotSupportedException * if the implementation does not support cloning. diff --git a/libjava/classpath/java/security/SignatureSpi.java b/libjava/classpath/java/security/SignatureSpi.java index 80ecbfd..1ed078c 100644 --- a/libjava/classpath/java/security/SignatureSpi.java +++ b/libjava/classpath/java/security/SignatureSpi.java @@ -65,7 +65,7 @@ public abstract class SignatureSpi /** * Initializes this instance with the public key for verification purposes. - * + * * @param publicKey * the public key to verify with. * @throws InvalidKeyException @@ -76,7 +76,7 @@ public abstract class SignatureSpi /** * Initializes this instance with the private key for signing purposes. - * + * * @param privateKey * the private key to sign with. * @throws InvalidKeyException @@ -88,9 +88,9 @@ public abstract class SignatureSpi /** * Initializes this instance with the private key and source of randomness for * signing purposes. - * + * * <p>This method cannot be abstract for backward compatibility reasons.</p> - * + * * @param privateKey * the private key to sign with. * @param random @@ -108,7 +108,7 @@ public abstract class SignatureSpi /** * Updates the data to be signed or verified with the specified byte. - * + * * @param b * byte to update with. * @throws SignatureException @@ -118,7 +118,7 @@ public abstract class SignatureSpi /** * Updates the data to be signed or verified with the specified bytes. - * + * * @param b * the array of bytes to use. * @param off @@ -134,7 +134,7 @@ public abstract class SignatureSpi /** * Update this signature with the {@link java.nio.Buffer#remaining()} * bytes of the given buffer. - * + * * @param input The input buffer. * @throws IllegalStateException if the engine is not properly initialized. */ @@ -155,11 +155,11 @@ public abstract class SignatureSpi } } } - + /** * Returns the signature bytes of all the data fed to this instance. The * format of the output depends on the underlying signature algorithm. - * + * * @return the signature bytes. * @throws SignatureException * if the engine is not properly initialized. @@ -170,16 +170,16 @@ public abstract class SignatureSpi * Generates signature bytes of all the data fed to this instance and stores * the result in the designated array. The format of the output depends on * the underlying signature algorithm. - * + * * <p>This method cannot be abstract for backward compatibility reasons. * After calling this method, the signature is reset to its initial state and * can be used to generate additional signatures.</p> - * + * * <p><b>IMPLEMENTATION NOTE:</b>: Neither this method nor the GNU provider * will return partial digests. If <code>len</code> is less than the * signature length, this method will throw a {@link SignatureException}. If * it is greater than or equal then it is ignored.</p> - * + * * @param outbuf * the array of bytes to store the result in. * @param offset @@ -204,7 +204,7 @@ public abstract class SignatureSpi /** * Verifies a designated signature. - * + * * @param sigBytes * the signature bytes to verify. * @return <code>true</code> if verified, <code>false</code> otherwise. @@ -219,7 +219,7 @@ public abstract class SignatureSpi * Convenience method which calls the method with the same name and one * argument after copying the designated bytes into a temporary byte array. * Subclasses may override this method for performance reasons. - * + * * @param sigBytes * the array of bytes to use. * @param offset @@ -240,7 +240,7 @@ public abstract class SignatureSpi /** * Sets the specified algorithm parameter to the specified value. - * + * * @param param * the parameter name. * @param value @@ -255,11 +255,11 @@ public abstract class SignatureSpi /** * Sets the signature engine with the specified {@link AlgorithmParameterSpec}. - * + * * <p>This method cannot be abstract for backward compatibility reasons. By * default it always throws {@link UnsupportedOperationException} unless * overridden.</p> - * + * * @param params * the parameters. * @throws InvalidParameterException @@ -278,7 +278,7 @@ public abstract class SignatureSpi * implementations to return the appropriate {@link AlgorithmParameters} for * this signature engine (or <code>null</code> when that engine does not use * any parameters. - * + * * @return the parameters used with this signature engine, or * <code>null</code> if it does not use any parameters. * @throws UnsupportedOperationException @@ -291,7 +291,7 @@ public abstract class SignatureSpi /** * Returns the value for the specified algorithm parameter. - * + * * @param param * the parameter name. * @return the parameter value. @@ -304,7 +304,7 @@ public abstract class SignatureSpi /** * Returns a clone of this instance. - * + * * @return a clone of this instance. * @throws CloneNotSupportedException * if the implementation does not support cloning. diff --git a/libjava/classpath/java/security/SignedObject.java b/libjava/classpath/java/security/SignedObject.java index be5a674..79f551c 100644 --- a/libjava/classpath/java/security/SignedObject.java +++ b/libjava/classpath/java/security/SignedObject.java @@ -48,27 +48,27 @@ import java.io.Serializable; /** * <code>SignedObject</code> is used for storing runtime objects whose * integrity cannot be compromised without being detected. - * + * * <p><code>SignedObject</code> contains a {@link Serializable} object which is * yet to be signed and a digital signature of that object.</p> - * + * * <p>The signed copy is a "deep copy" (in serialized form) of an original * object. Any changes to that original instance are not reflected in the * enclosed copy inside this <code>SignedObject</code>.</p> - * + * * <p>Several things to note are that, first there is no need to initialize the * signature engine as this class will handle that automatically. Second, * verification will only succeed if the public key corresponds to the private * key used to generate the digital signature inside this * <code>SignedObject</code>.</p> - * + * * <p>For fexibility, the signature engine can be specified in the constructor * or the <code>verify()</code> method. Programmers wishing to verify * <code>SignedObject</code>s should be aware of the {@link Signature} engine * they use. A malicious or flawed {@link Signature} implementation may always * return true on verification thus circumventing the intended secrity check * provided by the <code>SignedObject</code>.</p> - * + * * <p>The GNU security provider offers an implementation of the standard NIST * DSA which uses "DSA" and "SHA-1". It can be specified by "SHA/DSA", * "SHA-1/DSA" or its OID. If the RSA signature algorithm is provided then it @@ -94,7 +94,7 @@ public final class SignedObject implements Serializable * Constructs a new instance of <code>SignedObject</code> from a * {@link Serializable} object. The object is signed with a designated * private key and a signature engine. - * + * * @param object * the object to sign. * @param signingKey @@ -109,7 +109,7 @@ public final class SignedObject implements Serializable * if a signing error occurs. */ public SignedObject(Serializable object, PrivateKey signingKey, - Signature signingEngine) + Signature signingEngine) throws IOException, InvalidKeyException, SignatureException { thealgorithm = signingEngine.getAlgorithm(); @@ -130,7 +130,7 @@ public final class SignedObject implements Serializable /** * Returns the encapsulated object. The object is de-serialized before being * returned. - * + * * @return the encapsulated object. * @throws IOException * if a de-serialization error occurs. @@ -150,7 +150,7 @@ public final class SignedObject implements Serializable /** * Returns the signature bytes of the encapsulated object. - * + * * @return the signature bytes of the encapsulated object. */ public byte[] getSignature() @@ -161,7 +161,7 @@ public final class SignedObject implements Serializable /** * Returns the name of the signature algorithm. - * + * * @return the name of the signature algorithm. */ public String getAlgorithm() @@ -172,7 +172,7 @@ public final class SignedObject implements Serializable /** * Verifies the encapsulated digital signature by checking that it was * generated by the owner of a designated public key. - * + * * @param verificationKey * the public key to use. * @param verificationEngine diff --git a/libjava/classpath/java/security/Signer.java b/libjava/classpath/java/security/Signer.java index c7780f6..18259c8 100644 --- a/libjava/classpath/java/security/Signer.java +++ b/libjava/classpath/java/security/Signer.java @@ -58,7 +58,7 @@ public abstract class Signer extends Identity /** * Constructs a new instance of <code>Signer</code> with the specified * identity name. - * + * * @param name * the name of the identity to use. */ @@ -70,7 +70,7 @@ public abstract class Signer extends Identity /** * Constructs a new instance of <code>Signer</code> with the specified * identity name and {@link IdentityScope}. - * + * * @param name * the name of the the identity to use. * @param scope @@ -86,7 +86,7 @@ public abstract class Signer extends Identity /** * Returns the private key of this <code>Signer</code>. - * + * * @returns the private key of this <code>Signer</code>. * @throws SecurityException * if a {@link SecurityManager} is installed which disallows this @@ -103,7 +103,7 @@ public abstract class Signer extends Identity /** * Specifies the {@link KeyPair} associated with this <code>Signer</code>. - * + * * @param pair * the {@link KeyPair} to use. * @throws InvalidParameterException diff --git a/libjava/classpath/java/security/acl/Acl.java b/libjava/classpath/java/security/acl/Acl.java index 6a3f7d5..10a59fd 100644 --- a/libjava/classpath/java/security/acl/Acl.java +++ b/libjava/classpath/java/security/acl/Acl.java @@ -50,7 +50,7 @@ import java.util.Enumeration; * denied, the ACL treats it as if it were never granted or denied. If * both a <code>Principal</code> and a <code>Group</code> to which the * <code>Principal</code> belongs have an ACL entry, the permissions for - * the individual <code>Principal</code> take precedence over the + * the individual <code>Principal</code> take precedence over the * permissions of the <code>Group</code> if there is a conflict. * <p> * Additionally, the ACL interface extends the <code>Owner</code> interface @@ -94,7 +94,7 @@ public interface Acl extends Owner * * @exception NotOwnerException If the caller is not an owner of this ACL. */ - boolean addEntry(Principal caller, AclEntry entry) + boolean addEntry(Principal caller, AclEntry entry) throws NotOwnerException; /** diff --git a/libjava/classpath/java/security/acl/AclEntry.java b/libjava/classpath/java/security/acl/AclEntry.java index ea906f1..47154b2 100644 --- a/libjava/classpath/java/security/acl/AclEntry.java +++ b/libjava/classpath/java/security/acl/AclEntry.java @@ -42,10 +42,10 @@ import java.util.Enumeration; /** * This interface models an entry in an access control list (ACL). Java - * ACL's consist of a list of entries, where each consists of a + * ACL's consist of a list of entries, where each consists of a * <code>Principal</code> and a list of <code>Permission</code>'s which * have been granted to that <code>Principal</code>. An ACL can also - * be <em>negative</em>, which indicates that the list of + * be <em>negative</em>, which indicates that the list of * <code>Permission</code>'s is a list of permissions that are <em>not</em> * granted to the <code>Principal</code>. A <code>Principal</code> can * have at most one regular (or positive) ACL entry and one negative diff --git a/libjava/classpath/java/security/acl/Group.java b/libjava/classpath/java/security/acl/Group.java index ed6d56a..a0df755 100644 --- a/libjava/classpath/java/security/acl/Group.java +++ b/libjava/classpath/java/security/acl/Group.java @@ -81,7 +81,7 @@ public interface Group extends Principal boolean isMember(Principal member); /** - * This method returns a list of all members of the group as an + * This method returns a list of all members of the group as an * <code>Enumeration</code>. * * @return The list of all members of the group diff --git a/libjava/classpath/java/security/acl/Owner.java b/libjava/classpath/java/security/acl/Owner.java index df1605b..c671cd3 100644 --- a/libjava/classpath/java/security/acl/Owner.java +++ b/libjava/classpath/java/security/acl/Owner.java @@ -64,7 +64,7 @@ public interface Owner * * @exception NotOwnerException If the caller is not already an owner of this ACL */ - boolean addOwner(Principal caller, Principal owner) + boolean addOwner(Principal caller, Principal owner) throws NotOwnerException; /** @@ -82,7 +82,7 @@ public interface Owner * @exception NotOwnerException If the caller is not already an owner of this ACL * @exception LastOwnerException If completing the operation would delete the last ACL owner */ - boolean deleteOwner(Principal caller, Principal owner) + boolean deleteOwner(Principal caller, Principal owner) throws NotOwnerException, LastOwnerException; /** diff --git a/libjava/classpath/java/security/cert/CRL.java b/libjava/classpath/java/security/cert/CRL.java index e763663..1eaa70f 100644 --- a/libjava/classpath/java/security/cert/CRL.java +++ b/libjava/classpath/java/security/cert/CRL.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -43,11 +43,11 @@ package java.security.cert; have different formats but the same general use. They all serve as lists of revoked certificates and can be queried for a given certificate. - + Specialized CRLs extend this class. - + @author Mark Benvenuto - + @since JDK 1.2 */ public abstract class CRL @@ -59,7 +59,7 @@ public abstract class CRL Creates a new CRL for the specified type. An example is "X.509". - @param type the standard name for the CRL type. + @param type the standard name for the CRL type. */ protected CRL(String type) { @@ -90,7 +90,7 @@ public abstract class CRL @param cert A certificate to check if it is revoked @return true if the certificate is revoked, - false otherwise. + false otherwise. */ public abstract boolean isRevoked(Certificate cert); diff --git a/libjava/classpath/java/security/cert/CRLSelector.java b/libjava/classpath/java/security/cert/CRLSelector.java index 1fa5a20..6cd657c 100644 --- a/libjava/classpath/java/security/cert/CRLSelector.java +++ b/libjava/classpath/java/security/cert/CRLSelector.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/CertPathBuilder.java b/libjava/classpath/java/security/cert/CertPathBuilder.java index 99f7c97..47bae6d 100644 --- a/libjava/classpath/java/security/cert/CertPathBuilder.java +++ b/libjava/classpath/java/security/cert/CertPathBuilder.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -116,7 +116,7 @@ public class CertPathBuilder /** * Returns an instance of a named <code>CertPathBuilder</code> from the * first provider that implements it. - * + * * @param algorithm The name of the <code>CertPathBuilder</code> to create. * @return The new instance. * @throws NoSuchAlgorithmException If no installed provider implements the @@ -146,7 +146,7 @@ public class CertPathBuilder /** * Returns an instance of a named <code>CertPathBuilder</code> from a named * provider. - * + * * @param algorithm The name of the <code>CertPathBuilder</code> to create. * @param provider The name of the provider to use. * @return The new instance. @@ -171,7 +171,7 @@ public class CertPathBuilder /** * Returns an instance of a named <code>CertPathBuilder</code> from the * specified provider. - * + * * @param algorithm The name of the <code>CertPathBuilder</code> to create. * @param provider The provider to use. * @return The new instance. diff --git a/libjava/classpath/java/security/cert/CertPathBuilderResult.java b/libjava/classpath/java/security/cert/CertPathBuilderResult.java index 737ba94..edae88f6 100644 --- a/libjava/classpath/java/security/cert/CertPathBuilderResult.java +++ b/libjava/classpath/java/security/cert/CertPathBuilderResult.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -47,17 +47,17 @@ package java.security.cert; */ public interface CertPathBuilderResult extends Cloneable { - /** + /** * Creates a copy of this builder result. * * @return The copy. */ - Object clone(); + Object clone(); /** * Get the certificate path that was built. * * @retrn The certificate path. */ - CertPath getCertPath(); + CertPath getCertPath(); } diff --git a/libjava/classpath/java/security/cert/CertPathValidator.java b/libjava/classpath/java/security/cert/CertPathValidator.java index af08b54..8bd7b58 100644 --- a/libjava/classpath/java/security/cert/CertPathValidator.java +++ b/libjava/classpath/java/security/cert/CertPathValidator.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -129,7 +129,7 @@ public class CertPathValidator { /** * Returns an instance of the given validator from the first provider that * implements it. - * + * * @param algorithm The name of the algorithm to get. * @return The new instance. * @throws NoSuchAlgorithmException If no installed provider implements the @@ -158,7 +158,7 @@ public class CertPathValidator { /** * Returns an instance of the given validator from the named provider. - * + * * @param algorithm The name of the algorithm to get. * @param provider The name of the provider from which to get the * implementation. @@ -184,7 +184,7 @@ public class CertPathValidator { /** * Returns an instance of the given validator from the given provider. - * + * * @param algorithm The name of the algorithm to get. * @param provider The provider from which to get the implementation. * @return The new instance. diff --git a/libjava/classpath/java/security/cert/CertPathValidatorResult.java b/libjava/classpath/java/security/cert/CertPathValidatorResult.java index 71aaf89..0ccd1be 100644 --- a/libjava/classpath/java/security/cert/CertPathValidatorResult.java +++ b/libjava/classpath/java/security/cert/CertPathValidatorResult.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/CertPathValidatorSpi.java b/libjava/classpath/java/security/cert/CertPathValidatorSpi.java index 282b7a6..d4531e7 100644 --- a/libjava/classpath/java/security/cert/CertPathValidatorSpi.java +++ b/libjava/classpath/java/security/cert/CertPathValidatorSpi.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/CertSelector.java b/libjava/classpath/java/security/cert/CertSelector.java index aea614a..4a2e7d9 100644 --- a/libjava/classpath/java/security/cert/CertSelector.java +++ b/libjava/classpath/java/security/cert/CertSelector.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/CertStore.java b/libjava/classpath/java/security/cert/CertStore.java index 1ebdb50..630e967 100644 --- a/libjava/classpath/java/security/cert/CertStore.java +++ b/libjava/classpath/java/security/cert/CertStore.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -128,7 +128,7 @@ public class CertStore /** * Returns an instance of the given certificate store type from the first * installed provider. - * + * * @param type The type of <code>CertStore</code> to create. * @param params The parameters to initialize this cert store with. * @return The new instance. @@ -161,7 +161,7 @@ public class CertStore /** * Returns an instance of the given certificate store type from a named * provider. - * + * * @param type The type of <code>CertStore</code> to create. * @param params The parameters to initialize this cert store with. * @param provider The name of the provider to use. diff --git a/libjava/classpath/java/security/cert/CertStoreParameters.java b/libjava/classpath/java/security/cert/CertStoreParameters.java index aab22f0..71bcd61 100644 --- a/libjava/classpath/java/security/cert/CertStoreParameters.java +++ b/libjava/classpath/java/security/cert/CertStoreParameters.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/CertStoreSpi.java b/libjava/classpath/java/security/cert/CertStoreSpi.java index 976d65c..a47978a 100644 --- a/libjava/classpath/java/security/cert/CertStoreSpi.java +++ b/libjava/classpath/java/security/cert/CertStoreSpi.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/Certificate.java b/libjava/classpath/java/security/cert/Certificate.java index 33a14a4..be1713c 100644 --- a/libjava/classpath/java/security/cert/Certificate.java +++ b/libjava/classpath/java/security/cert/Certificate.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -49,18 +49,18 @@ import java.security.PublicKey; import java.security.SignatureException; /** - * The Certificate class is an abstract class used to manage + * The Certificate class is an abstract class used to manage * identity certificates. An identity certificate is a - * combination of a principal and a public key which is - * certified by another principal. This is the puprose of + * combination of a principal and a public key which is + * certified by another principal. This is the puprose of * Certificate Authorities (CA). - * + * * <p>This class is used to manage different types of certificates - * but have important common puposes. Different types of + * but have important common puposes. Different types of * certificates like X.509 and OpenPGP share general certificate * functions (like encoding and verifying) and information like * public keys. - * + * * <p>X.509, OpenPGP, and SDSI can be implemented by subclassing this * class even though they differ in storage methods and information * stored. @@ -74,7 +74,7 @@ import java.security.SignatureException; public abstract class Certificate implements Serializable { private static final long serialVersionUID = -3585440601605666277L; - + private String type; /** @@ -111,19 +111,19 @@ public abstract class Certificate implements Serializable { if( other instanceof Certificate ) { try { - Certificate x = (Certificate) other; - if( getEncoded().length != x.getEncoded().length ) - return false; + Certificate x = (Certificate) other; + if( getEncoded().length != x.getEncoded().length ) + return false; - byte[] b1 = getEncoded(); - byte[] b2 = x.getEncoded(); + byte[] b1 = getEncoded(); + byte[] b2 = x.getEncoded(); - for( int i = 0; i < b1.length; i++ ) - if( b1[i] != b2[i] ) - return false; + for( int i = 0; i < b1.length; i++ ) + if( b1[i] != b2[i] ) + return false; - } catch( CertificateEncodingException cee ) { - return false; + } catch( CertificateEncodingException cee ) { + return false; } return true; } @@ -154,7 +154,7 @@ public abstract class Certificate implements Serializable /** Verifies that this Certificate was properly signed with the - PublicKey that corresponds to its private key. + PublicKey that corresponds to its private key. @param key PublicKey to verify with @@ -174,7 +174,7 @@ public abstract class Certificate implements Serializable /** Verifies that this Certificate was properly signed with the PublicKey that corresponds to its private key and uses - the signature engine provided by the provider. + the signature engine provided by the provider. @param key PublicKey to verify with @param sigProvider Provider to use for signature algorithm @@ -186,7 +186,7 @@ public abstract class Certificate implements Serializable @throws SignatureException signature error */ public abstract void verify(PublicKey key, - String sigProvider) + String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, @@ -251,7 +251,7 @@ public abstract class Certificate implements Serializable /** From JDK1.4. */ private static final long serialVersionUID = -8563758940495660020L; - + /** The certificate type, e.g. "X.509". */ private String type; diff --git a/libjava/classpath/java/security/cert/CertificateFactory.java b/libjava/classpath/java/security/cert/CertificateFactory.java index d83b816..4fd5b39 100644 --- a/libjava/classpath/java/security/cert/CertificateFactory.java +++ b/libjava/classpath/java/security/cert/CertificateFactory.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -88,7 +88,7 @@ public class CertificateFactory /** * Returns an instance of a <code>CertificateFactory</code> representing the * specified certificate factory type. - * + * * @param type The type of certificate factory to create. * @return A <code>CertificateFactory</code> of the desired type. * @throws CertificateException If the type of certificate factory is not @@ -118,7 +118,7 @@ public class CertificateFactory /** * Returns an instance of a <code>CertificateFactory</code> representing the * specified certificate factory type from the named provider. - * + * * @param type The type of certificate factory to create. * @param provider The name of the provider to use. * @return A <code>CertificateFactory</code> for the desired type. @@ -130,7 +130,7 @@ public class CertificateFactory * <code>type</code> is an empty string. */ public static final CertificateFactory getInstance(String type, - String provider) + String provider) throws CertificateException, NoSuchProviderException { if (provider == null) @@ -144,7 +144,7 @@ public class CertificateFactory /** * Returns an instance of a <code>CertificateFactory</code> representing the * specified certificate factory type from the designated provider. - * + * * @param type The type of certificate factory to create. * @param provider The provider from which to get the implementation. * @return A <code>CertificateFactory</code> for the desired type. @@ -213,10 +213,10 @@ public class CertificateFactory * Ex: A X.509 CertificateFactory should return X509Certificate. * * <p>For X.509 certificates, the certificate in inStream must be - * DER encoded and supplied in binary or printable (Base64) - * encoding. If the certificate is in Base64 encoding, it must be - * bounded by -----BEGINCERTIFICATE-----, and - * -----END CERTIFICATE-----. + * DER encoded and supplied in binary or printable (Base64) + * encoding. If the certificate is in Base64 encoding, it must be + * bounded by -----BEGINCERTIFICATE-----, and + * -----END CERTIFICATE-----. * * @param inStream An input stream containing the certificate data. * @return A certificate initialized from the decoded InputStream data. @@ -230,16 +230,16 @@ public class CertificateFactory } /** - * Returns a collection of certificates that were read from the - * input stream. It may be empty, have only one, or have + * Returns a collection of certificates that were read from the + * input stream. It may be empty, have only one, or have * multiple certificates. * * For a X.509 certificate factory, the stream may contain a - * single DER encoded certificate or a PKCS#7 certificate - * chain. This is a PKCS#7 <I>SignedData</I> object with the - * most significant field being <I>certificates</I>. If no + * single DER encoded certificate or a PKCS#7 certificate + * chain. This is a PKCS#7 <I>SignedData</I> object with the + * most significant field being <I>certificates</I>. If no * CRLs are present, then an empty collection is returned. - * + * * @param inStream An input stream containing the certificate data. * @return A collection of certificates initialized from the decoded * InputStream data. @@ -278,8 +278,8 @@ public class CertificateFactory * from the InputStream. * * <p>For a X.509 certificate factory, the stream may contain a - * single DER encoded CRL or a PKCS#7 CRL set. This is a - * PKCS#7 <I>SignedData</I> object with the most significant + * single DER encoded CRL or a PKCS#7 CRL set. This is a + * PKCS#7 <I>SignedData</I> object with the most significant * field being <I>crls</I>. If no CRLs are present, then an * empty collection is returned. * diff --git a/libjava/classpath/java/security/cert/CertificateFactorySpi.java b/libjava/classpath/java/security/cert/CertificateFactorySpi.java index e6a22b4..2c9ca5d 100644 --- a/libjava/classpath/java/security/cert/CertificateFactorySpi.java +++ b/libjava/classpath/java/security/cert/CertificateFactorySpi.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -47,15 +47,15 @@ import java.util.List; /** CertificateFactorySpi is the abstract class Service Provider Interface (SPI) for the CertificateFactory class. A provider - must implement all the abstract methods if they wish to + must implement all the abstract methods if they wish to supply a certificate factory for a particular certificate type. Ex: X.509 - + Certificate factories are used to generate certificates and certificate revocation lists (CRL) from their encoding. - + @since 1.2 - + @author Mark Benvenuto */ public abstract class CertificateFactorySpi @@ -85,10 +85,10 @@ public abstract class CertificateFactorySpi Ex: A X.509 CertificateFactory should return X509Certificate. For X.509 certificates, the certificate in inStream must be - DER encoded and supplied in binary or printable (Base64) - encoding. If the certificate is in Base64 encoding, it must be - bounded by -----BEGIN CERTIFICATE-----, and - -----END CERTIFICATE-----. + DER encoded and supplied in binary or printable (Base64) + encoding. If the certificate is in Base64 encoding, it must be + bounded by -----BEGIN CERTIFICATE-----, and + -----END CERTIFICATE-----. @param inStream an input stream containing the certificate data @@ -100,19 +100,19 @@ public abstract class CertificateFactorySpi throws CertificateException; /** - Returns a collection of certificates that were read from the - input stream. It may be empty, have only one, or have + Returns a collection of certificates that were read from the + input stream. It may be empty, have only one, or have multiple certificates. For a X.509 certificate factory, the stream may contain a - single DER encoded certificate or a PKCS#7 certificate - chain. This is a PKCS#7 <I>SignedData</I> object with the - most significant field being <I>certificates</I>. If no + single DER encoded certificate or a PKCS#7 certificate + chain. This is a PKCS#7 <I>SignedData</I> object with the + most significant field being <I>certificates</I>. If no CRLs are present, then an empty collection is returned. - + @param inStream an input stream containing the certificates - @return a collection of certificates initialized with + @return a collection of certificates initialized with the InputStream data. @throws CertificateException Certificate parsing error @@ -145,14 +145,14 @@ public abstract class CertificateFactorySpi from the InputStream. For a X.509 certificate factory, the stream may contain a - single DER encoded CRL or a PKCS#7 CRL set. This is a - PKCS#7 <I>SignedData</I> object with the most significant + single DER encoded CRL or a PKCS#7 CRL set. This is a + PKCS#7 <I>SignedData</I> object with the most significant field being <I>crls</I>. If no CRLs are present, then an empty collection is returned. @param inStream an input stream containing the CRLs - @return a collection of CRLs initialized with + @return a collection of CRLs initialized with the InputStream data. @throws CRLException CRL parsing error @@ -222,4 +222,3 @@ public abstract class CertificateFactorySpi throw new UnsupportedOperationException("not implemented"); } } - diff --git a/libjava/classpath/java/security/cert/CollectionCertStoreParameters.java b/libjava/classpath/java/security/cert/CollectionCertStoreParameters.java index b3ee932..3898748 100644 --- a/libjava/classpath/java/security/cert/CollectionCertStoreParameters.java +++ b/libjava/classpath/java/security/cert/CollectionCertStoreParameters.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/LDAPCertStoreParameters.java b/libjava/classpath/java/security/cert/LDAPCertStoreParameters.java index 4414e65..f2dff76 100644 --- a/libjava/classpath/java/security/cert/LDAPCertStoreParameters.java +++ b/libjava/classpath/java/security/cert/LDAPCertStoreParameters.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/PKIXBuilderParameters.java b/libjava/classpath/java/security/cert/PKIXBuilderParameters.java index fd5f1f8..3a29b52 100644 --- a/libjava/classpath/java/security/cert/PKIXBuilderParameters.java +++ b/libjava/classpath/java/security/cert/PKIXBuilderParameters.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/PKIXCertPathBuilderResult.java b/libjava/classpath/java/security/cert/PKIXCertPathBuilderResult.java index fa16091..52984b5 100644 --- a/libjava/classpath/java/security/cert/PKIXCertPathBuilderResult.java +++ b/libjava/classpath/java/security/cert/PKIXCertPathBuilderResult.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/PKIXCertPathChecker.java b/libjava/classpath/java/security/cert/PKIXCertPathChecker.java index a69347f..0bedf40 100644 --- a/libjava/classpath/java/security/cert/PKIXCertPathChecker.java +++ b/libjava/classpath/java/security/cert/PKIXCertPathChecker.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/PKIXCertPathValidatorResult.java b/libjava/classpath/java/security/cert/PKIXCertPathValidatorResult.java index 5a1660c..17b5c86 100644 --- a/libjava/classpath/java/security/cert/PKIXCertPathValidatorResult.java +++ b/libjava/classpath/java/security/cert/PKIXCertPathValidatorResult.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/PKIXParameters.java b/libjava/classpath/java/security/cert/PKIXParameters.java index bb68cb9..bbb7557 100644 --- a/libjava/classpath/java/security/cert/PKIXParameters.java +++ b/libjava/classpath/java/security/cert/PKIXParameters.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/PolicyNode.java b/libjava/classpath/java/security/cert/PolicyNode.java index b119603..5da78c1 100644 --- a/libjava/classpath/java/security/cert/PolicyNode.java +++ b/libjava/classpath/java/security/cert/PolicyNode.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/PolicyQualifierInfo.java b/libjava/classpath/java/security/cert/PolicyQualifierInfo.java index d4d9f99..b53faa9 100644 --- a/libjava/classpath/java/security/cert/PolicyQualifierInfo.java +++ b/libjava/classpath/java/security/cert/PolicyQualifierInfo.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/java/security/cert/X509CRL.java b/libjava/classpath/java/security/cert/X509CRL.java index a00706e..895ba33 100644 --- a/libjava/classpath/java/security/cert/X509CRL.java +++ b/libjava/classpath/java/security/cert/X509CRL.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -56,48 +56,48 @@ import javax.security.auth.x500.X500Principal; time stamped entries which indicate which lists have been revoked. The list is signed by a Certificate Authority (CA) and made publically available in a repository. - - Each revoked certificate in the CRL is identified by its - certificate serial number. When a piece of code uses a - certificate, the certificates validity is checked by + + Each revoked certificate in the CRL is identified by its + certificate serial number. When a piece of code uses a + certificate, the certificates validity is checked by validating its signature and determing that it is not only a recently acquired CRL. The recently aquired CRL is depends on the local policy in affect. The CA issues - a new CRL periodically and entries are removed as the + a new CRL periodically and entries are removed as the certificate expiration date is reached - - + + A description of the X.509 v2 CRL follows below from rfc2459. - + "The X.509 v2 CRL syntax is as follows. For signature calculation, the data that is to be signed is ASN.1 DER encoded. ASN.1 DER encoding is a tag, length, value encoding system for each element. - - CertificateList ::= SEQUENCE { - tbsCertList TBSCertList, - signatureAlgorithm AlgorithmIdentifier, - signatureValue BIT STRING } - - TBSCertList ::= SEQUENCE { - version Version OPTIONAL, + + CertificateList ::= SEQUENCE { + tbsCertList TBSCertList, + signatureAlgorithm AlgorithmIdentifier, + signatureValue BIT STRING } + + TBSCertList ::= SEQUENCE { + version Version OPTIONAL, -- if present, shall be v2 - signature AlgorithmIdentifier, - issuer Name, - thisUpdate Time, - nextUpdate Time OPTIONAL, - revokedCertificates SEQUENCE OF SEQUENCE { - userCertificate CertificateSerialNumber, - revocationDate Time, - crlEntryExtensions Extensions OPTIONAL - -- if present, shall be v2 - } OPTIONAL, - crlExtensions [0] EXPLICIT Extensions OPTIONAL - -- if present, shall be v2 - }" - - @author Mark Benvenuto - - @since 1.2 + signature AlgorithmIdentifier, + issuer Name, + thisUpdate Time, + nextUpdate Time OPTIONAL, + revokedCertificates SEQUENCE OF SEQUENCE { + userCertificate CertificateSerialNumber, + revocationDate Time, + crlEntryExtensions Extensions OPTIONAL + -- if present, shall be v2 + } OPTIONAL, + crlExtensions [0] EXPLICIT Extensions OPTIONAL + -- if present, shall be v2 + }" + + @author Mark Benvenuto + + @since 1.2 */ public abstract class X509CRL extends CRL implements X509Extension { @@ -123,19 +123,19 @@ public abstract class X509CRL extends CRL implements X509Extension { if( other instanceof X509CRL ) { try { - X509CRL x = (X509CRL) other; - if( getEncoded().length != x.getEncoded().length ) - return false; + X509CRL x = (X509CRL) other; + if( getEncoded().length != x.getEncoded().length ) + return false; - byte[] b1 = getEncoded(); - byte[] b2 = x.getEncoded(); + byte[] b1 = getEncoded(); + byte[] b2 = x.getEncoded(); - for( int i = 0; i < b1.length; i++ ) - if( b1[i] != b2[i] ) - return false; + for( int i = 0; i < b1.length; i++ ) + if( b1[i] != b2[i] ) + return false; - } catch( CRLException crle ) { - return false; + } catch( CRLException crle ) { + return false; } return true; } @@ -164,7 +164,7 @@ public abstract class X509CRL extends CRL implements X509Extension /** Verifies that this CRL was properly signed with the - PublicKey that corresponds to its private key. + PublicKey that corresponds to its private key. @param key PublicKey to verify with @@ -184,7 +184,7 @@ public abstract class X509CRL extends CRL implements X509Extension /** Verifies that this CRL was properly signed with the PublicKey that corresponds to its private key and uses - the signature engine provided by the provider. + the signature engine provided by the provider. @param key PublicKey to verify with @param sigProvider Provider to use for signature algorithm @@ -196,7 +196,7 @@ public abstract class X509CRL extends CRL implements X509Extension @throws SignatureException signature error */ public abstract void verify(PublicKey key, - String sigProvider) + String sigProvider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, @@ -221,7 +221,7 @@ public abstract class X509CRL extends CRL implements X509Extension /** Returns the issuer (issuer distinguished name) of the CRL. - The issuer is the entity who signed and issued the + The issuer is the entity who signed and issued the Certificate Revocation List. The ASN.1 DER encoding is: @@ -307,7 +307,7 @@ public abstract class X509CRL extends CRL implements X509Extension public abstract Set<? extends X509CRLEntry> getRevokedCertificates(); /** - Returns the DER ASN.1 encoded tbsCertList which is + Returns the DER ASN.1 encoded tbsCertList which is the basic information of the list and associated certificates in the encoded state. See top for more information. @@ -323,7 +323,7 @@ public abstract class X509CRL extends CRL implements X509Extension /** - Returns the signature for the CRL. + Returns the signature for the CRL. The ASN.1 DER encoding is: @@ -334,7 +334,7 @@ public abstract class X509CRL extends CRL implements X509Extension public abstract byte[] getSignature(); /** - Returns the signature algorithm used to sign the CRL. + Returns the signature algorithm used to sign the CRL. An examples is "SHA-1/DSA". The ASN.1 DER encoding is: @@ -371,9 +371,9 @@ public abstract class X509CRL extends CRL implements X509Extension /** Returns the AlgorithmParameters in the encoded form - for the signature algorithm used. + for the signature algorithm used. - If access to the parameters is need, create an + If access to the parameters is need, create an instance of AlgorithmParameters. @return byte array containing algorithm parameters, null diff --git a/libjava/classpath/java/security/cert/X509CRLEntry.java b/libjava/classpath/java/security/cert/X509CRLEntry.java index 4c9cada..ac5ef47 100644 --- a/libjava/classpath/java/security/cert/X509CRLEntry.java +++ b/libjava/classpath/java/security/cert/X509CRLEntry.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -42,8 +42,8 @@ import java.math.BigInteger; import java.util.Date; /** - Abstract class for entries in the CRL (Certificate Revocation - List). The ASN.1 definition for <I>revokedCertificates</I> is + Abstract class for entries in the CRL (Certificate Revocation + List). The ASN.1 definition for <I>revokedCertificates</I> is revokedCertificates SEQUENCE OF SEQUENCE { userCertificate CertificateSerialNumber, @@ -52,24 +52,24 @@ import java.util.Date; -- if present, shall be v2 } OPTIONAL, - CertificateSerialNumber ::= INTEGER + CertificateSerialNumber ::= INTEGER - Time ::= CHOICE { + Time ::= CHOICE { utcTime UTCTime, - generalTime GeneralizedTime } + generalTime GeneralizedTime } - Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension + Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension - Extension ::= SEQUENCE { - extnID OBJECT IDENTIFIER, + Extension ::= SEQUENCE { + extnID OBJECT IDENTIFIER, critical BOOLEAN DEFAULT FALSE, extnValue OCTET STRING } - - For more information consult rfc2459. - @author Mark Benvenuto + For more information consult rfc2459. + + @author Mark Benvenuto - @since JDK 1.2 + @since JDK 1.2 */ public abstract class X509CRLEntry implements X509Extension { @@ -93,19 +93,19 @@ public abstract class X509CRLEntry implements X509Extension { if( other instanceof X509CRLEntry ) { try { - X509CRLEntry xe = (X509CRLEntry) other; - if( getEncoded().length != xe.getEncoded().length ) - return false; + X509CRLEntry xe = (X509CRLEntry) other; + if( getEncoded().length != xe.getEncoded().length ) + return false; - byte[] b1 = getEncoded(); - byte[] b2 = xe.getEncoded(); + byte[] b1 = getEncoded(); + byte[] b2 = xe.getEncoded(); - for( int i = 0; i < b1.length; i++ ) - if( b1[i] != b2[i] ) - return false; + for( int i = 0; i < b1.length; i++ ) + if( b1[i] != b2[i] ) + return false; - } catch( CRLException crle ) { - return false; + } catch( CRLException crle ) { + return false; } return true; } diff --git a/libjava/classpath/java/security/cert/X509CertSelector.java b/libjava/classpath/java/security/cert/X509CertSelector.java index 4115fff..8c1230a 100644 --- a/libjava/classpath/java/security/cert/X509CertSelector.java +++ b/libjava/classpath/java/security/cert/X509CertSelector.java @@ -102,7 +102,7 @@ public class X509CertSelector implements CertSelector, Cloneable return (oid != null && oid.length > 2 && (oid[0] >= 0 && oid[0] <= 2) && (oid[1] >= 0 && oid[1] <= 39)); } - + private static GeneralName makeName(int id, String name) throws IOException { byte[] nameBytes = null; @@ -114,22 +114,22 @@ public class X509CertSelector implements CertSelector, Cloneable case uniformResourceIdentifier: nameBytes = name.getBytes("ASCII"); break; - + case iPAddress: InetAddress addr = InetAddress.getByName(name); nameBytes = addr.getAddress(); break; - + case registeredId: OID oid = new OID(name); nameBytes = oid.getDER(); break; - + case directoryName: X500Principal xname = new X500Principal(name); nameBytes = xname.getEncoded(); break; - + case ediPartyName: case x400Address: case otherName: @@ -138,7 +138,7 @@ public class X509CertSelector implements CertSelector, Cloneable } return new GeneralName(kind, nameBytes); } - + private int basicConstraints; private X509Certificate cert; private BigInteger serialNo; @@ -171,7 +171,7 @@ public class X509CertSelector implements CertSelector, Cloneable /** * Add a name to match in the NameConstraints extension. The argument is * the DER-encoded bytes of a GeneralName structure. - * + * * See the method {@link #addSubjectAlternativeName(int, byte[])} for the * format of the GeneralName structure. * @@ -208,9 +208,9 @@ public class X509CertSelector implements CertSelector, Cloneable /** * Add a name, as DER-encoded bytes, to the subject alternative names * criterion. - * + * * The name is a GeneralName structure, which has the ASN.1 format: - * + * * <pre> GeneralName ::= CHOICE { otherName [0] OtherName, @@ -242,7 +242,7 @@ public class X509CertSelector implements CertSelector, Cloneable * only recognize certain types of name that have convenient string * encodings. For robustness, you should use the {@link * #addSubjectAlternativeName(int, byte[])} method whenever possible. - * + * * This method can only decode certain name kinds of names as strings. * * @param id The type of name this is. Must be in the range [0,8]. @@ -417,7 +417,7 @@ public class X509CertSelector implements CertSelector, Cloneable n.add(name.name()); names.add(n); } - + return names; } return null; @@ -735,7 +735,7 @@ public class X509CertSelector implements CertSelector, Cloneable // ignored } } - + if (policies == null) return false; if (!policies.getPolicies().containsAll(policy)) @@ -766,7 +766,7 @@ public class X509CertSelector implements CertSelector, Cloneable } } } - + if (nc == null) return false; @@ -956,18 +956,18 @@ public class X509CertSelector implements CertSelector, Cloneable { // Check if the input is well-formed... new NameConstraints(nameConstraints); - + // But we just compare raw byte arrays. this.nameConstraints = nameConstraints != null ? (byte[]) nameConstraints.clone() : null; } - + /** - * Sets the pathToNames criterion. The argument is a collection of + * Sets the pathToNames criterion. The argument is a collection of * pairs, the first element of which is an {@link Integer} giving * the ID of the name, and the second element is either a {@link String} * or a byte array. - * + * * See {@link #addPathToName(int, byte[])} and {@link #addPathToName(int, String)} * for how these arguments are handled. * @@ -1249,7 +1249,7 @@ public class X509CertSelector implements CertSelector, Cloneable else this.sigId = null; } - + public String toString() { CPStringBuilder str = new CPStringBuilder(X509CertSelector.class.getName()); diff --git a/libjava/classpath/java/security/cert/X509Certificate.java b/libjava/classpath/java/security/cert/X509Certificate.java index b398e09..ab9e1be 100644 --- a/libjava/classpath/java/security/cert/X509Certificate.java +++ b/libjava/classpath/java/security/cert/X509Certificate.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -45,10 +45,10 @@ import java.util.List; /** * X509Certificate is the abstract class for X.509 certificates. - * This provides a stanard class interface for accessing all + * This provides a stanard class interface for accessing all * the attributes of X.509 certificates. * - * <p>In June 1996, the basic X.509 v3 format was finished by + * <p>In June 1996, the basic X.509 v3 format was finished by * ISO/IEC and ANSI X.9. The ASN.1 DER format is below: * * <blockquote><pre> @@ -58,22 +58,22 @@ import java.util.List; * signatureValue BIT STRING } * </pre></blockquote> * - * <p>These certificates are widely used in various Internet - * protocols to support authentication. It is used in + * <p>These certificates are widely used in various Internet + * protocols to support authentication. It is used in * Privacy Enhanced Mail (PEM), Transport Layer Security (TLS), * Secure Sockets Layer (SSL), code signing for trusted software * distribution, and Secure Electronic Transactions (SET). * - * <p>The certificates are managed and vouched for by - * <I>Certificate Authorities</I> (CAs). CAs are companies or - * groups that create certificates by placing the data in the + * <p>The certificates are managed and vouched for by + * <I>Certificate Authorities</I> (CAs). CAs are companies or + * groups that create certificates by placing the data in the * X.509 certificate format and signing it with their private * key. CAs serve as trusted third parties by certifying that * the person or group specified in the certificate is who - * they say they are. + * they say they are. * * <p>The ASN.1 defintion for <I>tbsCertificate</I> is - * + * * <blockquote><pre> * TBSCertificate ::= SEQUENCE { * version [0] EXPLICIT Version DEFAULT v1, @@ -116,7 +116,7 @@ import java.util.List; * critical BOOLEAN DEFAULT FALSE, * extnValue OCTET STRING } * </pre></blockquote> - * + * * Certificates are created with the CertificateFactory. * * <p>References: @@ -170,7 +170,7 @@ public abstract class X509Certificate Consult rfc2459 for more information. @throws CertificateExpiredException if the certificate expired - @throws CertificateNotYetValidException if the certificate is + @throws CertificateNotYetValidException if the certificate is not yet valid */ public abstract void checkValidity() @@ -178,14 +178,14 @@ public abstract class X509Certificate CertificateNotYetValidException; /** - Checks the validity of the X.509 certificate for the - specified time and date. It is valid if the specified - date and time are within the period specified by + Checks the validity of the X.509 certificate for the + specified time and date. It is valid if the specified + date and time are within the period specified by the certificate. - @throws CertificateExpiredException if the certificate expired + @throws CertificateExpiredException if the certificate expired based on the date - @throws CertificateNotYetValidException if the certificate is + @throws CertificateNotYetValidException if the certificate is not yet valid based on the date */ public abstract void checkValidity(Date date) @@ -203,13 +203,13 @@ public abstract class X509Certificate Consult rfc2459 for more information. - @return version number of certificate + @return version number of certificate */ public abstract int getVersion(); /** Gets the serial number for serial Number in - this Certifcate. It must be a unique number + this Certifcate. It must be a unique number unique other serial numbers from the granting CA. The ASN.1 DER encoding is: @@ -225,8 +225,8 @@ public abstract class X509Certificate public abstract BigInteger getSerialNumber(); /** - Returns the issuer (issuer distinguished name) of the - Certificate. The issuer is the entity who signed + Returns the issuer (issuer distinguished name) of the + Certificate. The issuer is the entity who signed and issued the Certificate. The ASN.1 DER encoding is: @@ -263,7 +263,7 @@ public abstract class X509Certificate public abstract Principal getIssuerDN(); /** - Returns the subject (subject distinguished name) of the + Returns the subject (subject distinguished name) of the Certificate. The subject is the entity who the Certificate identifies. @@ -331,7 +331,7 @@ public abstract class X509Certificate public abstract byte[] getSignature(); /** - Returns the signature algorithm used to sign the CRL. + Returns the signature algorithm used to sign the CRL. An examples is "SHA-1/DSA". The ASN.1 DER encoding is: @@ -370,9 +370,9 @@ public abstract class X509Certificate /** Returns the AlgorithmParameters in the encoded form - for the signature algorithm used. + for the signature algorithm used. - If access to the parameters is need, create an + If access to the parameters is need, create an instance of AlgorithmParameters. @return byte array containing algorithm parameters, null @@ -390,7 +390,7 @@ public abstract class X509Certificate -- If present, version shall be v2 or v3 UniqueIdentifier ::= BIT STRING - + Consult rfc2459 for more information. @return bit representation of <I>issuerUniqueID</I> @@ -406,7 +406,7 @@ public abstract class X509Certificate -- If present, version shall be v2 or v3 UniqueIdentifier ::= BIT STRING - + Consult rfc2459 for more information. @return bit representation of <I>subjectUniqueID</I> @@ -414,7 +414,7 @@ public abstract class X509Certificate public abstract boolean[] getSubjectUniqueID(); /** - Returns a boolean array representing the <I>KeyUsage</I> + Returns a boolean array representing the <I>KeyUsage</I> extension for the certificate. The KeyUsage (OID = 2.5.29.15) defines the purpose of the key in the certificate. @@ -441,15 +441,15 @@ public abstract class X509Certificate /** Returns the certificate constraints path length from the - critical BasicConstraints extension, (OID = 2.5.29.19). + critical BasicConstraints extension, (OID = 2.5.29.19). - The basic constraints extensions is used to determine if - the subject of the certificate is a Certificate Authority (CA) - and how deep the certification path may exist. The + The basic constraints extensions is used to determine if + the subject of the certificate is a Certificate Authority (CA) + and how deep the certification path may exist. The <I>pathLenConstraint</I> only takes affect if <I>cA</I> - is set to true. "A value of zero indicates that only an + is set to true. "A value of zero indicates that only an end-entity certificate may follow in the path." (rfc2459) - + The ASN.1 DER encoding is: id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 } @@ -477,7 +477,7 @@ public abstract class X509Certificate * * <p>The ASN.1 definition for this extension is: * - * <blockquote><pre> + * <blockquote><pre> * ExtendedKeyUsage ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId * * KeyPurposeId ::= OBJECT IDENTIFIER @@ -575,7 +575,7 @@ public abstract class X509Certificate { throw new UnsupportedOperationException(); } - + /** * Returns the X.500 distinguished name of this certificate's issuer. * diff --git a/libjava/classpath/java/security/cert/X509Extension.java b/libjava/classpath/java/security/cert/X509Extension.java index bd94737..a0c24f4 100644 --- a/libjava/classpath/java/security/cert/X509Extension.java +++ b/libjava/classpath/java/security/cert/X509Extension.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -40,37 +40,37 @@ package java.security.cert; import java.util.Set; /** - Public interface for the X.509 Extension. + Public interface for the X.509 Extension. + + This is used for X.509 v3 Certificates and CRL v2 (Certificate + Revocation Lists) for managing attributes assoicated with + Certificates, for managing the hierarchy of certificates, + and for managing the distribution of CRL. This extension + format is used to define private extensions. - This is used for X.509 v3 Certificates and CRL v2 (Certificate - Revocation Lists) for managing attributes assoicated with - Certificates, for managing the hierarchy of certificates, - and for managing the distribution of CRL. This extension - format is used to define private extensions. + Each extensions for a certificate or CRL must be marked + either critical or non-critical. If the certificate/CRL + system encounters a critical extension not recognized then + it must reject the certificate. A non-critical extension + may be just ignored if not recognized. - Each extensions for a certificate or CRL must be marked - either critical or non-critical. If the certificate/CRL - system encounters a critical extension not recognized then - it must reject the certificate. A non-critical extension - may be just ignored if not recognized. + The ASN.1 definition for this class is: - The ASN.1 definition for this class is: + Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension - Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension + Extension ::= SEQUENCE { + extnId OBJECT IDENTIFIER, + critical BOOLEAN DEFAULT FALSE, + extnValue OCTET STRING + -- contains a DER encoding of a value + -- of the type registered for use with + -- the extnId object identifier value + } - Extension ::= SEQUENCE { - extnId OBJECT IDENTIFIER, - critical BOOLEAN DEFAULT FALSE, - extnValue OCTET STRING - -- contains a DER encoding of a value - -- of the type registered for use with - -- the extnId object identifier value - } - - @author Mark Benvenuto + @author Mark Benvenuto - @since 1.2 + @since 1.2 */ public interface X509Extension { @@ -79,12 +79,12 @@ public interface X509Extension Returns true if the certificate contains a critical extension that is not supported. - @return true if has unsupported extension, false otherwise + @return true if has unsupported extension, false otherwise */ boolean hasUnsupportedCriticalExtension(); /** - Returns a set of the CRITICAL extension OIDs from the + Returns a set of the CRITICAL extension OIDs from the certificate/CRL that the object implementing this interface manages. @@ -94,7 +94,7 @@ public interface X509Extension Set<String> getCriticalExtensionOIDs(); /** - Returns a set of the NON-CRITICAL extension OIDs from the + Returns a set of the NON-CRITICAL extension OIDs from the certificate/CRL that the object implementing this interface manages. diff --git a/libjava/classpath/java/security/spec/AlgorithmParameterSpec.java b/libjava/classpath/java/security/spec/AlgorithmParameterSpec.java index 25506f5..bc877e3 100644 --- a/libjava/classpath/java/security/spec/AlgorithmParameterSpec.java +++ b/libjava/classpath/java/security/spec/AlgorithmParameterSpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -39,13 +39,13 @@ exception statement from your version. */ package java.security.spec; /** - A transparent interface for Algorithm Parameter Specifications. - It contains no member functions. It is used to group - algorithm parameter classes. + A transparent interface for Algorithm Parameter Specifications. + It contains no member functions. It is used to group + algorithm parameter classes. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ public interface AlgorithmParameterSpec { diff --git a/libjava/classpath/java/security/spec/DSAParameterSpec.java b/libjava/classpath/java/security/spec/DSAParameterSpec.java index 7e26329..f7f6731 100644 --- a/libjava/classpath/java/security/spec/DSAParameterSpec.java +++ b/libjava/classpath/java/security/spec/DSAParameterSpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -62,19 +62,19 @@ public class DSAParameterSpec implements AlgorithmParameterSpec, DSAParams * @param q the sub-prime * @param g the base */ - public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g) + public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g) { this.p = p; this.q = q; this.g = g; } - + /** * Returns p for the DSA algorithm. * * @return Returns the requested BigInteger */ - public BigInteger getP() + public BigInteger getP() { return this.p; } @@ -84,7 +84,7 @@ public class DSAParameterSpec implements AlgorithmParameterSpec, DSAParams * * @return Returns the requested BigInteger */ - public BigInteger getQ() + public BigInteger getQ() { return this.q; } @@ -98,4 +98,4 @@ public class DSAParameterSpec implements AlgorithmParameterSpec, DSAParams { return this.g; } -}
\ No newline at end of file +} diff --git a/libjava/classpath/java/security/spec/DSAPrivateKeySpec.java b/libjava/classpath/java/security/spec/DSAPrivateKeySpec.java index 7415fa1..19af107 100644 --- a/libjava/classpath/java/security/spec/DSAPrivateKeySpec.java +++ b/libjava/classpath/java/security/spec/DSAPrivateKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -40,14 +40,14 @@ package java.security.spec; import java.math.BigInteger; /** - DSA Private Key class Specification. Used to maintain the DSA - Private Keys. + DSA Private Key class Specification. Used to maintain the DSA + Private Keys. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ -public class DSAPrivateKeySpec implements KeySpec +public class DSAPrivateKeySpec implements KeySpec { private BigInteger x = null; private BigInteger p = null; @@ -62,7 +62,7 @@ public class DSAPrivateKeySpec implements KeySpec @param q the sub-prime @param g the base */ - public DSAPrivateKeySpec(BigInteger x, BigInteger p, BigInteger q, BigInteger g) + public DSAPrivateKeySpec(BigInteger x, BigInteger p, BigInteger q, BigInteger g) { this.x = x; this.p = p; @@ -75,7 +75,7 @@ public class DSAPrivateKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getX() + public BigInteger getX() { return this.x; } @@ -85,7 +85,7 @@ public class DSAPrivateKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getP() + public BigInteger getP() { return this.p; } @@ -95,7 +95,7 @@ public class DSAPrivateKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getQ() + public BigInteger getQ() { return this.q; } @@ -105,7 +105,7 @@ public class DSAPrivateKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getG() + public BigInteger getG() { return this.g; } diff --git a/libjava/classpath/java/security/spec/DSAPublicKeySpec.java b/libjava/classpath/java/security/spec/DSAPublicKeySpec.java index ac1310c..751844b 100644 --- a/libjava/classpath/java/security/spec/DSAPublicKeySpec.java +++ b/libjava/classpath/java/security/spec/DSAPublicKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -40,14 +40,14 @@ package java.security.spec; import java.math.BigInteger; /** - DSA Public Key class Specification. Used to maintain the DSA - Public Keys. + DSA Public Key class Specification. Used to maintain the DSA + Public Keys. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ -public class DSAPublicKeySpec implements KeySpec +public class DSAPublicKeySpec implements KeySpec { private BigInteger y = null; private BigInteger p = null; @@ -62,7 +62,7 @@ public class DSAPublicKeySpec implements KeySpec @param q the sub-prime @param g the base */ - public DSAPublicKeySpec(BigInteger y, BigInteger p, BigInteger q, BigInteger g) + public DSAPublicKeySpec(BigInteger y, BigInteger p, BigInteger q, BigInteger g) { this.y = y; this.p = p; @@ -75,7 +75,7 @@ public class DSAPublicKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getY() + public BigInteger getY() { return this.y; } @@ -85,7 +85,7 @@ public class DSAPublicKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getP() + public BigInteger getP() { return this.p; } @@ -95,7 +95,7 @@ public class DSAPublicKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getQ() + public BigInteger getQ() { return this.q; } @@ -105,7 +105,7 @@ public class DSAPublicKeySpec implements KeySpec @return Returns the requested BigInteger */ - public BigInteger getG() + public BigInteger getG() { return this.g; } diff --git a/libjava/classpath/java/security/spec/EncodedKeySpec.java b/libjava/classpath/java/security/spec/EncodedKeySpec.java index c5baf55..93e1583 100644 --- a/libjava/classpath/java/security/spec/EncodedKeySpec.java +++ b/libjava/classpath/java/security/spec/EncodedKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -39,12 +39,12 @@ exception statement from your version. */ package java.security.spec; /** - Encoded Key Specification class which is used to store - byte encoded keys. + Encoded Key Specification class which is used to store + byte encoded keys. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ public abstract class EncodedKeySpec implements KeySpec { @@ -56,7 +56,7 @@ public abstract class EncodedKeySpec implements KeySpec @param encodedKey A key to store */ - public EncodedKeySpec(byte[] encodedKey) + public EncodedKeySpec(byte[] encodedKey) { this.encodedKey = encodedKey; } @@ -66,7 +66,7 @@ public abstract class EncodedKeySpec implements KeySpec @returns the encoded key */ - public byte[] getEncoded() + public byte[] getEncoded() { return this.encodedKey; } @@ -75,8 +75,8 @@ public abstract class EncodedKeySpec implements KeySpec Returns the name of the key format used. This name is the format such as "PKCS#8" or "X.509" which - if it matches a Key class name of the same type can be - transformed using the apporiate KeyFactory. + if it matches a Key class name of the same type can be + transformed using the apporiate KeyFactory. @return a string representing the name */ diff --git a/libjava/classpath/java/security/spec/InvalidParameterSpecException.java b/libjava/classpath/java/security/spec/InvalidParameterSpecException.java index 481e11e..ff34565 100644 --- a/libjava/classpath/java/security/spec/InvalidParameterSpecException.java +++ b/libjava/classpath/java/security/spec/InvalidParameterSpecException.java @@ -60,7 +60,7 @@ public class InvalidParameterSpecException extends GeneralSecurityException /** * Constructs an InvalidParameterSpecException without a message string. */ - public InvalidParameterSpecException() + public InvalidParameterSpecException() { } diff --git a/libjava/classpath/java/security/spec/KeySpec.java b/libjava/classpath/java/security/spec/KeySpec.java index 93f1a6d..13c7dad 100644 --- a/libjava/classpath/java/security/spec/KeySpec.java +++ b/libjava/classpath/java/security/spec/KeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -39,14 +39,14 @@ exception statement from your version. */ package java.security.spec; /** - A transparent interface for Key Specifications. - It contains no member functions. It is used to group - key classes. + A transparent interface for Key Specifications. + It contains no member functions. It is used to group + key classes. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ -public interface KeySpec +public interface KeySpec { } diff --git a/libjava/classpath/java/security/spec/PKCS8EncodedKeySpec.java b/libjava/classpath/java/security/spec/PKCS8EncodedKeySpec.java index 4a4f1ec..53b68de 100644 --- a/libjava/classpath/java/security/spec/PKCS8EncodedKeySpec.java +++ b/libjava/classpath/java/security/spec/PKCS8EncodedKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -39,12 +39,12 @@ exception statement from your version. */ package java.security.spec; /** - PKCS8 Encoded Key Specification class which is used to store - "PKCS#8" byte encoded keys. + PKCS8 Encoded Key Specification class which is used to store + "PKCS#8" byte encoded keys. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ public class PKCS8EncodedKeySpec extends EncodedKeySpec { @@ -59,9 +59,9 @@ public class PKCS8EncodedKeySpec extends EncodedKeySpec } /** - Gets the encoded key in byte format. + Gets the encoded key in byte format. - @returns the encoded key + @returns the encoded key */ public byte[] getEncoded() { @@ -69,9 +69,9 @@ public class PKCS8EncodedKeySpec extends EncodedKeySpec } /** - Returns the name of the key format used which is "PKCS#8" + Returns the name of the key format used which is "PKCS#8" - @return a string representing the name + @return a string representing the name */ public final String getFormat() { diff --git a/libjava/classpath/java/security/spec/PSSParameterSpec.java b/libjava/classpath/java/security/spec/PSSParameterSpec.java index f2a83d9..92a6c9e 100644 --- a/libjava/classpath/java/security/spec/PSSParameterSpec.java +++ b/libjava/classpath/java/security/spec/PSSParameterSpec.java @@ -40,7 +40,7 @@ package java.security.spec; /** * An implementation of {@link AlgorithmParameterSpec} for the RSA PSS encoding * scheme. - * + * * @since 1.4 * @see AlgorithmParameterSpec * @see java.security.Signature @@ -58,7 +58,7 @@ public class PSSParameterSpec implements AlgorithmParameterSpec /** * Construct a new instance of <code>PSSParameterSpec</code> given a salt * length. - * + * * @param saltLen * the length in bits of the salt. * @throws IllegalArgumentException diff --git a/libjava/classpath/java/security/spec/RSAKeyGenParameterSpec.java b/libjava/classpath/java/security/spec/RSAKeyGenParameterSpec.java index ad55111..5a1dafe 100644 --- a/libjava/classpath/java/security/spec/RSAKeyGenParameterSpec.java +++ b/libjava/classpath/java/security/spec/RSAKeyGenParameterSpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -63,7 +63,7 @@ public class RSAKeyGenParameterSpec implements AlgorithmParameterSpec public static final BigInteger F4 = BigInteger.valueOf(65537L); /** - Create a new RSAKeyGenParameterSpec to store the RSA key's keysize + Create a new RSAKeyGenParameterSpec to store the RSA key's keysize and public exponent @param keysize Modulus size of key in bits @@ -74,7 +74,7 @@ public class RSAKeyGenParameterSpec implements AlgorithmParameterSpec this.keysize = keysize; this.publicExponent = publicExponent; } - + /** Return the size of the key. @@ -84,7 +84,7 @@ public class RSAKeyGenParameterSpec implements AlgorithmParameterSpec { return keysize; } - + /** Return the public exponent. diff --git a/libjava/classpath/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java b/libjava/classpath/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java index 9e8ad0d..09b8438 100644 --- a/libjava/classpath/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java +++ b/libjava/classpath/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java @@ -72,10 +72,10 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec /** * Constructs a new instance of <code>RSAMultiPrimePrivateCrtKeySpec</code> * given the various PKCS#1 v2.1 parameters. - * + * * <p>Note that <code>otherPrimeInfo</code> is cloned when constructing this * object.</p> - * + * * @param modulus * the modulus n. * @param publicExponent diff --git a/libjava/classpath/java/security/spec/RSAOtherPrimeInfo.java b/libjava/classpath/java/security/spec/RSAOtherPrimeInfo.java index 03cdca2..45dd53f 100644 --- a/libjava/classpath/java/security/spec/RSAOtherPrimeInfo.java +++ b/libjava/classpath/java/security/spec/RSAOtherPrimeInfo.java @@ -61,7 +61,7 @@ public class RSAOtherPrimeInfo /** * Constructs a new <code>RSAOtherPrimeInfo</code> given the PKCS#1 MPIs. - * + * * @param prime * the prime factor of n. * @param primeExponent diff --git a/libjava/classpath/java/security/spec/RSAPrivateCrtKeySpec.java b/libjava/classpath/java/security/spec/RSAPrivateCrtKeySpec.java index a904c30..6d327e6 100644 --- a/libjava/classpath/java/security/spec/RSAPrivateCrtKeySpec.java +++ b/libjava/classpath/java/security/spec/RSAPrivateCrtKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -40,13 +40,13 @@ package java.security.spec; import java.math.BigInteger; /** - RSA Private Certificate Key class Specification. Used to - maintain the RSA Private Certificate Keys with the - <I>Chinese Remainder Theorem</I>(CRT) as specified by PKCS#1. + RSA Private Certificate Key class Specification. Used to + maintain the RSA Private Certificate Keys with the + <I>Chinese Remainder Theorem</I>(CRT) as specified by PKCS#1. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ public class RSAPrivateCrtKeySpec extends RSAPrivateKeySpec { @@ -71,13 +71,13 @@ public class RSAPrivateCrtKeySpec extends RSAPrivateKeySpec @param crtCoefficient the CRT coefficient */ public RSAPrivateCrtKeySpec(BigInteger modulus, - BigInteger publicExponent, - BigInteger privateExponent, - BigInteger primeP, - BigInteger primeQ, - BigInteger primeExponentP, - BigInteger primeExponentQ, - BigInteger crtCoefficient) + BigInteger publicExponent, + BigInteger privateExponent, + BigInteger primeP, + BigInteger primeQ, + BigInteger primeExponentP, + BigInteger primeExponentQ, + BigInteger crtCoefficient) { super( modulus, privateExponent); this.publicExponent = publicExponent; diff --git a/libjava/classpath/java/security/spec/RSAPrivateKeySpec.java b/libjava/classpath/java/security/spec/RSAPrivateKeySpec.java index d29f261..f812766 100644 --- a/libjava/classpath/java/security/spec/RSAPrivateKeySpec.java +++ b/libjava/classpath/java/security/spec/RSAPrivateKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -40,12 +40,12 @@ package java.security.spec; import java.math.BigInteger; /** - RSA Private Key class Specification. Used to maintain the RSA - Private Keys. + RSA Private Key class Specification. Used to maintain the RSA + Private Keys. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ public class RSAPrivateKeySpec implements KeySpec { diff --git a/libjava/classpath/java/security/spec/RSAPublicKeySpec.java b/libjava/classpath/java/security/spec/RSAPublicKeySpec.java index 21283aa..acee6bc 100644 --- a/libjava/classpath/java/security/spec/RSAPublicKeySpec.java +++ b/libjava/classpath/java/security/spec/RSAPublicKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -40,12 +40,12 @@ package java.security.spec; import java.math.BigInteger; /** - RSA Public Key class Specification. Used to maintain the RSA - Public Keys. + RSA Public Key class Specification. Used to maintain the RSA + Public Keys. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ public class RSAPublicKeySpec implements KeySpec { diff --git a/libjava/classpath/java/security/spec/X509EncodedKeySpec.java b/libjava/classpath/java/security/spec/X509EncodedKeySpec.java index de35960..8b50aaa 100644 --- a/libjava/classpath/java/security/spec/X509EncodedKeySpec.java +++ b/libjava/classpath/java/security/spec/X509EncodedKeySpec.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -39,12 +39,12 @@ exception statement from your version. */ package java.security.spec; /** - X.509 Encoded Key Specification class which is used to store - "X.509" byte encoded keys. + X.509 Encoded Key Specification class which is used to store + "X.509" byte encoded keys. - @since JDK 1.2 + @since JDK 1.2 - @author Mark Benvenuto + @author Mark Benvenuto */ public class X509EncodedKeySpec extends EncodedKeySpec { |