public class PublicServiceProvider extends V3Extension
PublicServiceProvider
Extension as
used in Austria for institutions that provide some kind of public service.
In this context this extension is called "Dienstleistereigenschaft" (see http://reference.e-government.gv.at,
Spezifikationen/Konventionen).
The PublicServiceProvider
extension is a private X509v3 extension, which
shall be used in certificates of public service providers in Austria. It shall be marked as
being not critical. Certificates containing the PublicServiceProvider
extension are allowed to be used only for services/applications that are
provided on behalf of a public authority. They cannot be used for private
commercial purposes.
The object identifier for the PublicServiceProvider
extension
is derived from the gv-at OID as used for the Austria adminstration:
gv-at ::= OBJECT IDENTIFIER ::= { iso(1) member-body(2) austria(40) (0) (10) }
id-PublicServiceProvider OBJECT IDENTIFIER ::= { gv-at organization(1) public(1) 2 }
which corresponds to the OID string "1.2.40.0.10.1.1.2".
The ASN.1 definition of the PublicServiceProvider
extension is specified
as follows:
PublicServiceProvider ::= NULL
Since the PublicServiceProvider extension has no specific value (only is presence
in a certificate is sufficient to recognize the certificate owner as provider of
some public service) a PublicServiceProvider extension can be created by simply
calling the default
constructor:
X509Certificate certificate = new X509Certificate(); ... PublicServiceProvider serviceProvider = new PublicServiceProvider(); certificate.addExtension(serviceProvider);Use method
getExtension
for getting
a PublicServiceProvider extension when parsing a certificate:
X509Certificate cert = ...; ... // look if PublicServiceProvider extension is included: PublicServiceProvider serviceProvider = cert.getExtension(PublicServiceProvider.oid); if (serviceProvider != null) { ... }
ObjectID
,
X509Certificate
,
X509Extensions
,
V3Extension
Modifier and Type | Field and Description |
---|---|
static ObjectID |
oid
The object identifier of this
PublicServiceProvider extension. |
critical
Constructor and Description |
---|
PublicServiceProvider()
Creates a new
PublicServiceProvider extension. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object otherObject)
Compares this object with the given one..
|
ObjectID |
getObjectID()
Returns the object ID of this
PublicServiceProvider extension. |
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object asn1Object)
Inits this
PublicServiceProvider implementation with an ASN1Object
representing the value of this extension. |
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
PublicServiceProvider
extension object. |
java.lang.String |
toString()
Returns a string that represents the contents of this extension.
|
getName, isCritical, setCritical
public static final ObjectID oid
PublicServiceProvider
extension.
The corresponding OID string is "1.2.40.0.10.1.1.2".public PublicServiceProvider()
PublicServiceProvider
extension.public ObjectID getObjectID()
PublicServiceProvider
extension.getObjectID
in class V3Extension
public void init(ASN1Object asn1Object) throws X509ExtensionException
PublicServiceProvider
implementation with an ASN1Object
representing the value of this extension.
The given ASN1Object may be 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
PublicServiceProvider 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 V3Extension
asn1Object
- The PublicServiceProvider extension value as ASN1Object (NULL).X509ExtensionException
- If the extension value is not an ASN.1 NULL objectpublic ASN1Object toASN1Object()
PublicServiceProvider
extension object.
The returned ASN1Object is either an ASN.1 NULL object:
PublicServiceProvider ::= NULL
toASN1Object
in class V3Extension
PublicServiceProvider
as ASN1Object (NULL).public int hashCode()
hashCode
in class V3Extension
public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
otherObject
- The other object to compare with.public java.lang.String toString()
toString
in class java.lang.Object