/[classpath]/classpath/java/security/Signature.java
ViewVC logotype

Diff of /classpath/java/security/Signature.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by mkoch, Sat May 8 06:02:00 2004 UTC revision 1.16 by rsdio, Mon Aug 16 07:16:27 2004 UTC
# Line 206  public abstract class Signature extends Line 206  public abstract class Signature extends
206    {    {
207      if (provider == null || provider.length() == 0)      if (provider == null || provider.length() == 0)
208        throw new IllegalArgumentException("Illegal provider");        throw new IllegalArgumentException("Illegal provider");
209        
210      Provider p = Security.getProvider(provider);      Provider p = Security.getProvider(provider);
211      if (p == null)      if (p == null)
212        throw new NoSuchProviderException(provider);        throw new NoSuchProviderException(provider);
# Line 251  public abstract class Signature extends Line 251  public abstract class Signature extends
251    
252      if (o instanceof SignatureSpi)      if (o instanceof SignatureSpi)
253        {        {
254          result = new DummySignature((SignatureSpi) o, algorithm);          result = new DummySignature((SignatureSpi) o, algorithm);
255        }        }
256      else if (o instanceof Signature)      else if (o instanceof Signature)
257        {        {
258          result = (Signature) o;          result = (Signature) o;
259          result.algorithm = algorithm;          result.algorithm = algorithm;
260        }        }
261      else      else
262        {        {
263          throw new NoSuchAlgorithmException(algorithm);          throw new NoSuchAlgorithmException(algorithm);
264        }        }
265      result.provider = provider;      result.provider = provider;
266      return result;      return result;
# Line 313  public abstract class Signature extends Line 313  public abstract class Signature extends
313      if (certificate.getType().equals("X509"))      if (certificate.getType().equals("X509"))
314        {        {
315          X509Certificate cert = (X509Certificate) certificate;          X509Certificate cert = (X509Certificate) certificate;
316          boolean[]array = cert.getKeyUsage();          boolean[]array = cert.getKeyUsage();
317          if (array != null && array[0] == false)          if (array != null && array[0] == false)
318            throw new InvalidKeyException(            throw new InvalidKeyException(
319                "KeyUsage of this Certificate indicates it cannot be used for digital signing");                "KeyUsage of this Certificate indicates it cannot be used for digital signing");
320        }        }
321      this.initVerify(certificate.getPublicKey());      this.initVerify(certificate.getPublicKey());
# Line 627  public abstract class Signature extends Line 627  public abstract class Signature extends
627     */     */
628    public Object clone() throws CloneNotSupportedException    public Object clone() throws CloneNotSupportedException
629    {    {
630      throw new CloneNotSupportedException();      return super.clone();
631    }    }
632  }  }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26