Top Description Fields Constructors Methods
org.bouncycastle.jce

public Class X509Principal

extends X509Name
implements Principal
Class Inheritance
All Implemented Interfaces
java.security.Principal
Imports
java.io.IOException, java.security.Principal, java.util.Hashtable, .Vector, org.bouncycastle.asn1.ASN1Encoding, .ASN1InputStream, .ASN1Sequence, org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.asn1.x509.X509Name

Deprecated

use the X500Name class.

a general extension of X509Name with a couple of extra methods and constructors.

Objects of this type can be created from certificates and CRLs using the PrincipalUtil class.

See Also
org.bouncycastle.jce.PrincipalUtil

Field Summary

Inherited from org.bouncycastle.asn1.x509.X509Name:
BUSINESS_CATEGORYCCNCOUNTRY_OF_CITIZENSHIPCOUNTRY_OF_RESIDENCEDATE_OF_BIRTHDCDefaultLookUpDefaultReverseDefaultSymbolsDMD_NAMEDN_QUALIFIEREEmailAddressGENDERGENERATIONGIVENNAMEINITIALSLNAMENAME_AT_BIRTHOOIDLookUpOUPLACE_OF_BIRTHPOSTAL_ADDRESSPOSTAL_CODEPSEUDONYMRFC1779SymbolsRFC2253SymbolsSERIALNUMBERSNSTSTREETSURNAMESymbolLookUpTTELEPHONE_NUMBERUIDUNIQUE_IDENTIFIERUnstructuredAddressUnstructuredName

Constructor Summary

AccessConstructor and Description
public
X509Principal(byte[] bytes)

Constructor from an encoded byte array.

public
X509Principal(X509Name name)
References Deprecated X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

Constructor from an X509Name object.

public
X509Principal(X500Name name)

Constructor from an X509Name object.

public
X509Principal(Hashtable<K, V> attributes)

constructor from a table of attributes.

public
X509Principal(Vector<E> ordering, Hashtable<K, V> attributes)

constructor from a table of attributes and a vector giving the specific ordering required for encoding or conversion to a string.

public
X509Principal(Vector<E> oids, Vector<E> values)

constructor from a vector of attribute values and a vector of OIDs.

public
X509Principal(String dirName)

takes an X509 dir name as a string of the format "C=AU,ST=Victoria", or some such, converting it into an ordered set of name attributes.

public
X509Principal(boolean reverse, String dirName)

Takes an X509 dir name as a string of the format "C=AU,ST=Victoria", or some such, converting it into an ordered set of name attributes.

public
X509Principal(boolean reverse, Hashtable<K, V> lookUp, String dirName)

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes.

Method Summary

Modifier and TypeMethod and Description
public byte[]
getEncoded()

Overrides org.bouncycastle.asn1.ASN1Object.getEncoded.

Implements org.bouncycastle.util.Encodable.getEncoded.

return a DER encoded byte array representing this object

public String
getName()

Implements java.security.Principal.getName.

Returns the name of this Principal.

private static ASN1Sequence
Inherited from org.bouncycastle.asn1.x509.X509Name:
equalsequalsgetInstancegetInstancegetOIDsgetValuesgetValueshashCodetoASN1PrimitivetoStringtoString

Constructor Detail

X509Principalback to summary
public X509Principal(byte[] bytes) throws IOException

Constructor from an encoded byte array.

X509Principalback to summary
public X509Principal(X509Name name)

References Deprecated

X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor from an X509Name object.

X509Principalback to summary
public X509Principal(X500Name name)

Constructor from an X509Name object.

X509Principalback to summary
public X509Principal(Hashtable<K, V> attributes)

constructor from a table of attributes.

it's is assumed the table contains OID/String pairs.

X509Principalback to summary
public X509Principal(Vector<E> ordering, Hashtable<K, V> attributes)

constructor from a table of attributes and a vector giving the specific ordering required for encoding or conversion to a string.

it's is assumed the table contains OID/String pairs.

X509Principalback to summary
public X509Principal(Vector<E> oids, Vector<E> values)

constructor from a vector of attribute values and a vector of OIDs.

X509Principalback to summary
public X509Principal(String dirName)

takes an X509 dir name as a string of the format "C=AU,ST=Victoria", or some such, converting it into an ordered set of name attributes.

X509Principalback to summary
public X509Principal(boolean reverse, String dirName)

Takes an X509 dir name as a string of the format "C=AU,ST=Victoria", or some such, converting it into an ordered set of name attributes. If reverse is false the dir name will be encoded in the order of the (name, value) pairs presented, otherwise the encoding will start with the last (name, value) pair and work back.

X509Principalback to summary
public X509Principal(boolean reverse, Hashtable<K, V> lookUp, String dirName)

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes. lookUp should provide a table of lookups, indexed by lowercase only strings and yielding a ASN1ObjectIdentifier, other than that OID. and numeric oids will be processed automatically.

If reverse is true, create the encoded version of the sequence starting from the last element in the string.

Method Detail

getEncodedback to summary
public byte[] getEncoded()

Overrides org.bouncycastle.asn1.ASN1Object.getEncoded.

Implements org.bouncycastle.util.Encodable.getEncoded.

return a DER encoded byte array representing this object

Returns:byte[]

Doc from org.bouncycastle.asn1.ASN1Object.getEncoded.

BER/DER byte encoded object.

getNameback to summary
public String getName()

Implements java.security.Principal.getName.

Doc from java.security.Principal.getName.

Returns the name of this Principal.

Returns:String

the name of this Principal.

readSequenceback to summary
private static ASN1Sequence readSequence(ASN1InputStream aIn) throws IOException