public class NetscapeRevocationUrl extends V3Extension
NetscapeRevocationUrl
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 NetscapeRevocationUrl
extension
is defined as:
netscape-revocation-url OBJECT IDENTIFIER ::= { netscape-cert-extension 3 }
which corresponds to the OID string "2.16.840.1.113730.1.3".
The
Netscape Certificate Specification specifies the NetscapeRevocationUrl
extension as IA5String that represents a relative or absolute URL that can be
used to check the revocation status of a certificate. The revocation check will be
performed as an HTTP GET method using a url that is the concatenation of revocation-url
and certificate-serial-number, where the certificate-serial-number is encoded as a
string consisting of an even number of ascii hexadecimal digits. If the number of
significant digits is odd, the string will have a single leading zero to ensure an even
number of digits is generated. For example, if the netscape-base-url is
https://www.certs-r-us.com/, the netscape-revocation-url is cgi-bin/check-rev.cgi?,
and the certificate serial number is 173420, the resulting URL would be:
https://www.certs-r-us.com/cgi-bin/check-rev.cgi?02a56c
The server should return a document with a Content-Type of application/x-netscape-revocation. The document should contain a single ascii digit, '1' if the certificate is not curently valid, and '0' if it is curently valid.
You may specify a particular (relative or absolute) URL directly when creating a
NetscapeRevocationUrl
extension, or you may use the default constructor
and supply the URL by using the setRevocationUrl
method,
e.g.:
NetscapeRevocationUrl netscapeRevocationUrl = new NetscapeRevocationUrl(); netscapeRevocationUrl.setRevocationUrl("cgi-bin/check-rev.cgi?");
V3Extension
,
X509Extensions
,
NetscapeBaseUrl
Modifier and Type | Field and Description |
---|---|
static ObjectID |
oid
The object ID of the X.509 extension NetscapeRevocationUrl.
|
critical
Constructor and Description |
---|
NetscapeRevocationUrl()
Default constructor.
|
NetscapeRevocationUrl(java.lang.String url)
Constructs a
NetscapeRevocationUrl extension with a specified URL. |
Modifier and Type | Method and Description |
---|---|
ObjectID |
getObjectID()
Returns the object ID of this
NetscapeRevocationUrl extension |
java.lang.String |
getRevocationUrl()
Returns the revocation url.
|
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object obj)
Inits this
NetscapeRevocationUrl implementation with an ASN1object
representing the value of this extension. |
void |
setRevocationUrl(java.lang.String url)
Sets the revocation url.
|
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
NetscapeRevocationUrl
extension object. |
java.lang.String |
toString()
Returns a string that represents the contents of this
NetscapeRevocationUrl extension. |
getName, isCritical, setCritical
public static final ObjectID oid
public NetscapeRevocationUrl()
NetscapeRevocationUrl
object.
Use the setRevocationUrl
method for
specifying a particular (absolute or relative) URL value, e.g.:
NetscapeRevocationUrl netscapeRevocationUrl = new NetscapeRevocationUrl(); netscapeRevocationUrl.setRevocationUrl("cgi-bin/check-rev.cgi?");
public NetscapeRevocationUrl(java.lang.String url)
NetscapeRevocationUrl
extension with a specified URL.
The (absolute or relative) URL is given as a String value, for instance:
NetscapeRevocationUrl netscapeRevocationUrl = new NetscapeRevocationUrl("cgi-bin/check-rev.cgi?");
url
- the revocation URL, as Stringpublic ObjectID getObjectID()
NetscapeRevocationUrl
extensiongetObjectID
in class V3Extension
public void init(ASN1Object obj)
NetscapeRevocationUrl
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
NetscapeRevocationUrl 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
obj
- the NetscapeRevocationUrl as ASN1Objectpublic ASN1Object toASN1Object()
NetscapeRevocationUrl
extension object.
The returned ASN1Object represents the IA5STRING (absolute or relative) URL value.
toASN1Object
in class V3Extension
NetscapeRevocationUrl
as ASN1Objectpublic void setRevocationUrl(java.lang.String url)
The (absolute or relative) URL value is given as String, e.g.:
NetscapeRevocationUrl netscapeRevocationUrl = new NetscapeRevocationUrl(); netscapeRevocationUrl.setRevocationUrl("cgi-bin/check-rev.cgi?");
url
- the revocation url, as Stringpublic java.lang.String getRevocationUrl()
setRevocationUrl(java.lang.String)
public int hashCode()
hashCode
in class V3Extension
public java.lang.String toString()
NetscapeRevocationUrl
extension.toString
in class java.lang.Object