public class NetscapeCaPolicyUrl extends V3Extension
NetscapeCaPolicyUrl Extension.
Each Netscape certificate extension is associated with a specific
certificateExtension object identifier, derived from:
netscape OBJECT IDENTIFIER ::= { 2 16 840 1 113730 }
netscape-cert-extension OBJECT IDENTIFIER :: = { netscape 1 }
The object identifier for the NetscapeCaPolicyUrl extension
is defined as:
netscape-ca-policy-url OBJECT IDENTIFIER ::= { netscape-cert-extension 8 }
which corresponds to the OID string "2.16.840.1.113730.1.8".
The
Netscape Certificate Specification specifies the NetscapeCaPolicyUrl
extension as IA5String that represents a relative or absolute URL that points to a
web page that describes the policies under which the certificate has been issued.
You may specify a particular (relative or absolute) URL directly when creating a
NetscapeCaPolicyUrl extension, or you may use the default constructor
and supply the URL by using the setCaPolicyUrl method,
e.g.:
NetscapeCaPolicyUrl netscapeCaPolicyUrl = new NetscapeCaPolicyUrl();
netscapeCaPolicyUrl.setCaPolicyUrl("http://ca.test.com/policy/home.html");
V3Extension,
X509Extensions,
NetscapeBaseUrl| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
oid
The object ID of the X.509 extension NetscapeCaPolicyUrl.
|
critical| Constructor and Description |
|---|
NetscapeCaPolicyUrl()
Default constructor.
|
NetscapeCaPolicyUrl(java.lang.String url)
Constructs a
NetscapeCaPolicyUrl extension with a specified URL. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCaPolicyUrl()
Returns the caPolicy url.
|
ObjectID |
getObjectID()
Returns the object ID of this
NetscapeCaPolicyUrl extension |
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object obj)
Inits this
NetscapeCaPolicyUrl implementation with an ASN1object
representing the value of this extension. |
void |
setCaPolicyUrl(java.lang.String url)
Sets the caPolicy url.
|
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
NetscapeCaPolicyUrl
extension object. |
java.lang.String |
toString()
Returns a string that represents the contents of this
NetscapeCaPolicyUrl extension. |
getName, isCritical, setCriticalpublic static final ObjectID oid
public NetscapeCaPolicyUrl()
NetscapeCaPolicyUrl object.
Use the setCaPolicyUrl method for
specifying a particular (absolute or relative) URL value, e.g.:
NetscapeCaPolicyUrl netscapeCaPolicyUrl = new NetscapeCaPolicyUrl();
netscapeCaPolicyUrl.setCaPolicyUrl("http://ca.test.com/policy/home.html");
public NetscapeCaPolicyUrl(java.lang.String url)
NetscapeCaPolicyUrl extension with a specified URL.
The (absolute or relative) URL is given as a String value, for instance:
NetscapeCaPolicyUrl netscapeCaPolicyUrl = new NetscapeCaPolicyUrl("http://ca.test.com/policy/home.html");
url - the caPolicy URL, as Stringpublic ObjectID getObjectID()
NetscapeCaPolicyUrl extensiongetObjectID in class V3Extensionpublic void init(ASN1Object obj)
NetscapeCaPolicyUrl implementation with an ASN1object
representing the value of this extension.
The given ASN1Object represents the IA5STRING (absolute or relative) URL value.
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
NetscapeCaPolicyUrl 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 V3Extensionobj - the NetscapeCaPolicyUrl as ASN1Objectpublic ASN1Object toASN1Object()
NetscapeCaPolicyUrl
extension object.
The returned ASN1Object represents the IA5STRING (absolute or relative) URL value.
toASN1Object in class V3ExtensionNetscapeCaPolicyUrl as ASN1Objectpublic void setCaPolicyUrl(java.lang.String url)
The (absolute or relative) URL value is given as String, e.g.:
NetscapeCaPolicyUrl netscapeCaPolicyUrl = new NetscapeCaPolicyUrl();
netscapeCaPolicyUrl.setCaPolicyUrl("http://ca.test.com/policy/home.html");
url - the caPolicy urlpublic java.lang.String getCaPolicyUrl()
setCaPolicyUrl(String)public int hashCode()
hashCode in class V3Extensionpublic java.lang.String toString()
NetscapeCaPolicyUrl extension.toString in class java.lang.Object