FileDocCategorySizeDatePackage
XYZSigner.javaAPI DocExample1547Mon Jan 15 13:20:04 GMT 2001javasec.samples.appc

XYZSigner

public class XYZSigner extends Signer

Fields Summary
private int
trustLevel
Constructors Summary
public XYZSigner(String name, IdentityScope scope)

        super(name, scope);
        scope.addIdentity(this);
    
Methods Summary
public voidaddCertificate(java.security.Certificate cert)

        IdentityScope scope = getScope();
        if (scope != null) {
            Identity i = getScope().getIdentity(cert.getPublicKey());
            if (i != null && !equals(i))
                throw new KeyManagementException(
                                    "Duplicate public key");
        }
        super.addCertificate(cert);
    
public intgetTrust()

        return trustLevel;
    
public voidsetPublicKey(java.security.PublicKey key)

        IdentityScope scope = getScope();
        if (scope != null) {
            Identity i = getScope().getIdentity(key);
            if (i != null && !equals(i))
                throw new KeyManagementException(
                                    "Duplicate public key");
        }
        super.setPublicKey(key);
    
voidsetTrust(int x)

        if (x < 0 || x > 10)
            throw new IllegalArgumentException("Invalid trust level");
        trustLevel = x;
    
public java.lang.StringtoString()

        return super.toString() + " trust level: " + trustLevel;