FileDocCategorySizeDatePackage
CertificationRequestInfo.javaAPI DocAndroid 1.5 API5694Wed May 06 22:41:06 BST 2009org.apache.harmony.security.pkcs10

CertificationRequestInfo

public class CertificationRequestInfo extends Object
CertificationRequestInfo ::= SEQUENCE { version Version, subject Name, subjectPublicKeyInfo SubjectPublicKeyInfo, attributes [0] IMPLICIT Attributes } Version ::= INTEGER Attributes ::= SET OF Attribute

Fields Summary
private int
version
private org.apache.harmony.security.x501.Name
subject
private org.apache.harmony.security.x509.SubjectPublicKeyInfo
subjectPublicKeyInfo
private List
attributes
private byte[]
encoding
public static final org.apache.harmony.security.asn1.ASN1Sequence
ASN1
Constructors Summary
public CertificationRequestInfo(int version, org.apache.harmony.security.x501.Name subject, org.apache.harmony.security.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, List attributes)

        this.version = version;
        this.subject = subject;
        this.subjectPublicKeyInfo = subjectPublicKeyInfo;
        this.attributes = attributes;
    
private CertificationRequestInfo(int version, org.apache.harmony.security.x501.Name subject, org.apache.harmony.security.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, List attributes, byte[] encoding)

        this(version, subject, subjectPublicKeyInfo, attributes);
        this.encoding = encoding;
    
Methods Summary
public java.util.ListgetAttributes()

return
Returns the attributes.

        return attributes;
    
public byte[]getEncoded()
Returns ASN.1 encoded form of this CertificationRequestInfo.

return
a byte array containing ASN.1 encode form.

        if (encoding == null) {
            encoding = ASN1.encode(this);
        }
        return encoding;
    
public org.apache.harmony.security.x501.NamegetSubject()

return
Returns the subject.

        return subject;
    
public org.apache.harmony.security.x509.SubjectPublicKeyInfogetSubjectPublicKeyInfo()

return
Returns the subjectPublicKeyInfo.

        return subjectPublicKeyInfo;
    
public intgetVersion()

return
Returns the version.

        return version;
    
public java.lang.StringtoString()

        StringBuffer res = new StringBuffer();
        res.append("-- CertificationRequestInfo:"); //$NON-NLS-1$
        res.append("\n version: "); //$NON-NLS-1$
        res.append(version);
        res.append("\n subject: "); //$NON-NLS-1$
        res.append(subject.getName(X500Principal.CANONICAL));
        res.append("\n subjectPublicKeyInfo: "); //$NON-NLS-1$
        res.append("\n\t algorithm: " //$NON-NLS-1$
                + subjectPublicKeyInfo.getAlgorithmIdentifier().getAlgorithm());
        res.append("\n\t public key: " + subjectPublicKeyInfo.getPublicKey()); //$NON-NLS-1$
        res.append("\n attributes: "); //$NON-NLS-1$
        if (attributes != null) {
            res.append(attributes.toString());
        } else {
            res.append("none"); //$NON-NLS-1$
        }
        res.append("\n-- CertificationRequestInfo End\n"); //$NON-NLS-1$
        return res.toString();