public class PublicAuthorityIdentifier extends V3Extension
PublicAuthorityIdentifier extension as
used for characterizing public authorities in Austrian E-Government. In this
context this extension is called "Verwaltungseigenschaft" (see http://reference.e-government.gv.at,
Spezifikationen/Konventionen).
The PublicAuthorityIdentifier extension is a private X509v3 extension, which
shall be used in certificates of public authorities in Austria. It shall be marked as
being not critical.
The object identifier for the PublicAuthorityIdentifier extension
is derived from the gv-at OID as used for the Austria administration:
gv-at ::= OBJECT IDENTIFIER ::= { iso(1) member-body(2) austria(40) (0) (10) }
id-PublicAuthorityIdentifier OBJECT IDENTIFIER ::= { gv-at organization(1) public(1) 1 }
which corresponds to the OID string "1.2.40.0.10.1.1.1".
The ASN.1 definition of the PublicAuthorityIdentifier extension is specified
as follows:
PublicAuthorityIdentifier ::= CHOICE {
isPublicAuthority alwaysTrue,
code DirectoryString }
alwaysTrue BOOLEAN ::= TRUE
DirectoryString ::= CHOICE {
teletexString TeletexString (SIZE (1..MAX)),
printableString PrintableString (SIZE (1..MAX)),
universalString UniversalString (SIZE (1..MAX)),
utf8String UTF8String (SIZE (1..MAX)),
bmpString BMPString (SIZE (1..MAX)) }
Attention!: The usage of PublicAuthorityIdentifier extensions without code
identifier string is deprecated! New certificates containing this extension must
have a non-empty authority identifier code field which shall be encoded
as UTF8String.
When creating a PublicAuthorityIdentifier
extension, specify the authority identifier code as String object:
X509Certificate certificate = new X509Certificate(); ... String code = ... PublicAuthorityIdentifier authorityIdentifier = new PublicAuthorityIdentifier(code); certificate.addExtension(authorityIdentifier);
ObjectID,
X509Certificate,
X509Extensions| Modifier and Type | Field and Description |
|---|---|
protected ASN1String |
code_
The code that identifies the public authority.
|
static ObjectID |
oid
The object identifier of this
PublicAuthorityIdentifier extension. |
critical| Constructor and Description |
|---|
PublicAuthorityIdentifier()
Creates an empty
PublicAuthorityIdentifier extension. |
PublicAuthorityIdentifier(ASN1String code)
Creates a new
PublicAuthorityIdentifier extension for the given
code value. |
PublicAuthorityIdentifier(java.lang.String code)
Creates a new
PublicAuthorityIdentifier extension for the given
code identifier value. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object otherObject)
Compares this object with the given one.
|
ASN1String |
getCode()
Gets the
code value of this PublicAuthorityIdentifier
extension. |
java.lang.String |
getCodeString()
Gets the
code value of this PublicAuthorityIdentifier
extension. |
ObjectID |
getObjectID()
Returns the object ID of this
PublicAuthorityIdentifier extension. |
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object asn1Object)
Inits this
PublicAuthorityIdentifier implementation with an ASN1Object
representing the value of this extension. |
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
PublicAuthorityIdentifier
extension object. |
java.lang.String |
toString()
Returns a string that represents the contents of this extension.
|
getName, isCritical, setCriticalpublic static final ObjectID oid
PublicAuthorityIdentifier extension.
The corresponding OID string is "1.2.40.0.10.1.1.1".protected ASN1String code_
public PublicAuthorityIdentifier()
PublicAuthorityIdentifier extension.
New applications shall NOT use this constructor because
the usage of the PublicAuthorityIdentifier extension without code
specification is depracted. Use the PublicAuthorityIdentifier(String code) constructor to create
a PublicAuthotityIdentifier extension with an authority identifier code.public PublicAuthorityIdentifier(java.lang.String code)
PublicAuthorityIdentifier extension for the given
code identifier value.
The code value will be encoded as UTF8String.
code - code identifier string of the authoritypublic PublicAuthorityIdentifier(ASN1String code)
PublicAuthorityIdentifier extension for the given
code value.code - the code identifier string of the authority as ASN.1 String;
applications shall use the UTF8String choice,
TeletexString, PrintableString, UniversalString and BMPString
are only supported for backwards compatibiltityjava.lang.IllegalArgumentException - if the supplied ASN.1 string is null or not a
TeletexString, PrintableString, UniversalString, UTF8String
or BMPStringpublic ObjectID getObjectID()
PublicAuthorityIdentifier extension.getObjectID in class V3Extensionpublic void init(ASN1Object asn1Object) throws X509ExtensionException
PublicAuthorityIdentifier implementation with an ASN1Object
representing the value of this extension.
The given ASN1Object is the one created by toASN1Object().
This method is used by the X509Extensions class when parsing the ASN.1 representation
of a certificate for properly initializing an included
PublicAuthorityIdentifier extension. This method initializes the
extension only with its value, but not with its critical
specification. For that reason, this method shall not be
explicitly called by an application.
init in class V3Extensionasn1Object - The PublicAuthorityIdentifier extension value as ASN1Object.X509ExtensionException - If the extension could not be parsedpublic ASN1Object toASN1Object()
PublicAuthorityIdentifier
extension object.toASN1Object in class V3ExtensionPublicAuthorityIdentifier as ASN1Object.public ASN1String getCode()
code value of this PublicAuthorityIdentifier
extension. Since old certificates may contain PublicAuthorityIdentifier
extensions without a code identifier, this method may return
null for old certificates.null, if there is no
identifier string in this extension.public java.lang.String getCodeString()
code value of this PublicAuthorityIdentifier
extension. Since old certificates may contain PublicAuthorityIdentifier
extensions without a code identifier, this method may return
null for old certificates.null, if there is no
identifier string in this extension.public int hashCode()
hashCode in class V3Extensionpublic boolean equals(java.lang.Object otherObject)
equals in class java.lang.ObjectotherObject - The other object to compare with.public java.lang.String toString()
toString in class java.lang.Object