home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / sun / security / provider / SystemIdentity.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  1.7 KB  |  64 lines

  1. package sun.security.provider;
  2.  
  3. import java.io.Serializable;
  4. import java.security.Certificate;
  5. import java.security.Identity;
  6. import java.security.IdentityScope;
  7. import java.security.InvalidParameterException;
  8. import java.security.KeyManagementException;
  9. import java.security.PublicKey;
  10.  
  11. public class SystemIdentity extends Identity implements Serializable {
  12.    boolean trusted = false;
  13.    private String info;
  14.  
  15.    public SystemIdentity(String var1, IdentityScope var2) throws InvalidParameterException, KeyManagementException {
  16.       super(var1, var2);
  17.       if (var2 == null) {
  18.          throw new InvalidParameterException("scope cannot be null");
  19.       }
  20.    }
  21.  
  22.    public boolean isTrusted() {
  23.       return this.trusted;
  24.    }
  25.  
  26.    protected void setTrusted(boolean var1) {
  27.       this.trusted = var1;
  28.    }
  29.  
  30.    void setIdentityInfo(String var1) {
  31.       super.setInfo(var1);
  32.    }
  33.  
  34.    String getIndentityInfo() {
  35.       return super.getInfo();
  36.    }
  37.  
  38.    void setIdentityPublicKey(PublicKey var1) throws KeyManagementException {
  39.       ((Identity)this).setPublicKey(var1);
  40.    }
  41.  
  42.    void addIdentityCertificate(Certificate var1) throws KeyManagementException {
  43.       ((Identity)this).addCertificate(var1);
  44.    }
  45.  
  46.    void clearCertificates() throws KeyManagementException {
  47.       Certificate[] var1 = ((Identity)this).certificates();
  48.  
  49.       for(int var2 = 0; var2 < var1.length; ++var2) {
  50.          ((Identity)this).removeCertificate(var1[var2]);
  51.       }
  52.  
  53.    }
  54.  
  55.    public String toString() {
  56.       String var1 = "not trusted";
  57.       if (this.trusted) {
  58.          var1 = "trusted";
  59.       }
  60.  
  61.       return super.toString() + "[" + var1 + "]";
  62.    }
  63. }
  64.